:root {
  --ink: #201f1c;
  --cream: #f5f1ec;
  --cream-alt: #ece4d8;
  --line: #ddd6cc;
  --accent: #8a7256;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* raises the bar against casual right-click-save / drag-out (not
   bulletproof — public assets are always fetchable via devtools — this
   just removes the obvious one-click paths); dragstart/contextmenu itself
   is prevented in script.js since CSS alone can't stop those events */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
  counter-reset: sect;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--accent);
  margin-bottom: .75em;
}
.section .eyebrow::before {
  counter-increment: sect;
  content: counter(sect, decimal-leading-zero) "\00a0\2022\00a0";
  color: var(--accent);
  font-weight: 600;
}
.contacts .eyebrow { color: #c9b79a; }
.contacts .eyebrow::before { color: #c9b79a; }

.section { padding: 110px 0; position: relative; }
.section.about, .section.services { background: var(--cream); }
.why { background: var(--cream-alt); }

.btn {
  display: inline-block;
  padding: 15px 32px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 40px;
  font-size: .95rem;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease, color .3s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px -12px rgba(32,31,28,.5);
  background: var(--accent);
  border-color: var(--accent);
}
.btn-outline { background: transparent; color: var(--ink); margin-top: 20px; }
.btn-outline:hover { color: #fff; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ===== header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 120;
  transition: background .35s ease, box-shadow .35s ease;
}
.site-header.scrolled {
  background: rgba(245,241,236,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -16px rgba(0,0,0,.35);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  transition: padding .35s ease;
}
.site-header.scrolled .header-inner { padding: 14px 24px; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  text-decoration: none;
  color: #fff;
  opacity: 0;
  transform: translateY(-6px);
  transition: color .35s ease, opacity .35s ease, transform .35s ease;
}
/* the big hero letterhead mark stands in for the logo until the header solidifies */
.site-header.scrolled .logo { color: var(--ink); opacity: 1; transform: translateY(0); }
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; object-fit: contain; }

.header-actions { display: flex; align-items: center; gap: 16px; }

/* ===== language dropdown: lives in the header on every breakpoint ===== */
.lang-select { position: relative; }
.lang-select-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  font: inherit;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: color .35s ease, border-color .35s ease, background .2s ease;
}
.site-header.scrolled .lang-select-btn { color: var(--ink); border-color: var(--line); }
.lang-select-btn:hover { background: rgba(255,255,255,.15); }
.site-header.scrolled .lang-select-btn:hover { background: var(--cream-alt); }
.lang-select-caret { width: 10px; height: 7px; transition: transform .25s ease; }
.lang-select.open .lang-select-caret { transform: rotate(180deg); }
.lang-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 10;
}
.lang-select.open .lang-select-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  font-size: .88rem;
  text-align: left;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lang-option:hover { background: var(--cream-alt); }
.lang-option.active { color: #fff; background: var(--ink); }

.menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .35s ease;
}
.site-header.scrolled .menu-btn { color: var(--ink); }
.menu-btn-bars { display: flex; flex-direction: column; gap: 5px; width: 26px; }
.menu-btn-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s ease, width .3s ease;
}
.menu-btn-bars i:last-child { width: 65%; align-self: flex-end; }
.menu-btn:hover .menu-btn-bars i:last-child { width: 100%; }

/* ===== menu: a compact anchored dropdown on desktop, full-screen only on mobile =====
   Position is set inline by script.js from the button's real bounding box —
   more robust than a CSS-relative wrapper, which breaks if any ancestor
   later gets a transform/filter. These are just a sane fallback. */
.menu-overlay {
  position: fixed;
  top: 74px;
  right: 24px;
  width: min(300px, calc(100vw - 48px));
  background: var(--ink);
  color: var(--cream);
  z-index: 200;
  border-radius: 14px;
  padding: 30px 30px 26px;
  opacity: 0;
  visibility: hidden;
  transform-origin: top right;
  transform: translateY(-6px) scale(.96);
  box-shadow: 0 30px 60px -22px rgba(0,0,0,.45);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.menu-overlay.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.menu-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  color: var(--cream);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s ease, transform .2s ease;
}
.menu-close:hover { opacity: 1; transform: rotate(90deg); }
.menu-links { display: flex; flex-direction: column; gap: 10px; }
.menu-links a {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--cream);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease, color .25s ease;
  transition-delay: calc(var(--i) * .06s);
}
.menu-overlay.open .menu-links a { opacity: 1; transform: translateY(0); }
.menu-links a:hover { color: var(--accent); }

.menu-meta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(245,241,236,.15);
  font-size: .85rem;
  opacity: 0;
  transition: opacity .4s ease .25s;
}
.menu-overlay.open .menu-meta { opacity: .75; }
.menu-meta p { margin: 0 0 6px; }
.menu-meta a { text-decoration: none; }

/* ===== side progress dots (desktop scrollspy) ===== */
.progress-dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 90;
}
.progress-dots a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(32,31,28,.1);
  border: 1px solid rgba(32,31,28,.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5);
  position: relative;
  transition: background .25s ease, transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
/* while a dark section (hero / contacts) is behind the dots, flip to a light outline
   so they don't disappear against dark photos or the dark contact finale */
.progress-dots.on-dark a {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.progress-dots a::after {
  content: attr(aria-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--ink);
  color: var(--cream);
  padding: 4px 8px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.progress-dots a:hover::after { opacity: 1; }
.progress-dots a.active { background: var(--accent); border-color: var(--accent); transform: scale(1.3); }

/* ===== bottom tab bar (mobile only) ===== */
.bottom-tabs {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 110;
  background: rgba(245,241,236,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bottom-tabs a, .bottom-tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font: inherit;
  font-size: .68rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
}
.bottom-tabs .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background .25s ease, transform .25s ease;
}
.bottom-tabs a.active .dot { background: var(--accent); transform: scale(1.3); }

/* ===== hero ===== */
.hero {
  position: relative;
  color: #fff;
  padding: 200px 0 130px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: -3%; z-index: -2; }
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
  transition: transform .2s ease-out;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,20,18,.45), rgba(20,20,18,.65));
}
@keyframes kenburns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -1%); }
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 em { font-style: normal; }
.hero .eyebrow { color: rgba(255,255,255,.8); font-size: .85rem; }
.hero-sub { font-size: 1.2rem; }
.hero-text { max-width: 520px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* letterhead: the big brand mark shown at the very top of the hero, which
   visually "collapses" into the compact header logo as the page scrolls
   (see script.js — shrinks/fades in place, header logo cross-fades in) */
.hero-brand {
  text-align: center;
  margin: 0 auto 40px;
  transform-origin: center top;
  will-change: transform, opacity;
}
.hero-brand-mark {
  width: clamp(56px, 9vw, 104px);
  height: clamp(56px, 9vw, 104px);
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
  /* logo.svg's artwork is near-black; force it white to read on the dark hero photo */
  filter: brightness(0) invert(1);
}
.hero-brand-name {
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.hero-brand-tag {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #e3cca5;
  margin: 0 0 18px;
}
.hero-brand::after {
  content: '';
  display: block;
  width: 46px;
  height: 1px;
  background: rgba(255,255,255,.4);
  margin: 0 auto;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 14px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ===== about ===== */
.about-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: center;
}
.about-photo-wrap { perspective: 800px; }
.signature-row { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.signature {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}
.cv-link {
  font-size: .85rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  transition: color .2s ease, border-color .2s ease;
}
.cv-link:hover { color: var(--accent); }
.about-photo {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 3/4;
  display: block;
  transition: transform .1s linear;
}

/* ===== why us ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

/* ===== services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin: 40px 0;
}
.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 4px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 24px 40px -22px rgba(32,31,28,.4);
}
.service-num {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  color: var(--line);
  margin-bottom: 10px;
  transition: color .35s ease;
}
.service-card:hover .service-num { color: var(--accent); }

/* ===== works: tabs + horizontal strips ===== */
.work-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.work-tab {
  background: none;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 10px 20px;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.work-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.work-tab:not(.active):hover { border-color: var(--accent); color: var(--accent); }

.work-panel { display: none; position: relative; }
.work-panel.active { display: block; animation: fadeUp .5s ease; }
.work-location { display: block; color: var(--accent); font-size: .9rem; margin-bottom: 16px; }
.brand-highlight {
  font-family: Georgia, serif;
  color: var(--accent);
}

.work-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  cursor: grab;
  scrollbar-width: thin;
}
.work-strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.work-strip img {
  flex: 0 0 min(420px, 78vw);
  height: 60vh;
  max-height: 520px;
  object-fit: cover;
  border-radius: 4px;
  scroll-snap-align: start;
  cursor: zoom-in;
  transition: transform .5s ease;
}
.work-strip img:hover { transform: scale(1.02); }

/* two Grazhdansky Prospekt photos have their main subject (the toilet) right
   at an edge the default center-crop would cut off — bias the crop instead.
   Matched on data-full (the original filename), not src — src now points at
   a generated thumbs/*.jpg whose name doesn't carry the original extension. */
.work-strip img[data-full="projects/Grazhdansky Prospekt/2.png"] { object-position: right; }
.work-strip img[data-full="projects/Grazhdansky Prospekt/4.jpg"] { object-position: bottom; }

.work-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 2;
}
.work-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.08); }
.work-arrow.prev { left: -6px; }
.work-arrow.next { right: -6px; }

/* ===== contacts (dark finale) ===== */
.contacts { background: var(--ink); color: var(--cream); }
.contacts-inner { max-width: 640px; }
/* the default .btn is the same ink color as this section's own background,
   so it needs its own resting state to stay visible without a hover */
.contacts .btn { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.contacts .btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.contacts h2 { color: #fff; }
.contact-list { list-style: none; padding: 0; margin: 0 0 30px; }
.contact-list li { margin-bottom: 12px; color: #cfc9bf; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--accent); color: #fff; }

/* ===== footer ===== */
.site-footer {
  background: var(--ink);
  color: #cfc9bf;
  padding: 40px 0;
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer p { margin: 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-inner a { color: #cfc9bf; text-decoration: none; border-bottom: 1px solid var(--accent); }
.footer-inner a:hover { color: #fff; }
.social-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-inner a.social-icon { border-bottom: none; }
.social-icon { display: flex; color: #cfc9bf; transition: color .2s ease; }
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover { color: #fff; }

/* ===== scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.hero .reveal { opacity: 1; transform: translateY(0); animation: fadeUp .8s ease backwards; }
.hero p.eyebrow.reveal { animation-delay: .05s; }
.hero h1.reveal { animation-delay: .15s; }
.hero .hero-sub.reveal { animation-delay: .3s; }
.hero .hero-text.reveal { animation-delay: .45s; }
.hero .hero-actions.reveal { animation-delay: .6s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.services-grid.in-view .service-card { animation: fadeUp .6s ease backwards; }
.services-grid.in-view .service-card:nth-child(1) { animation-delay: .05s; }
.services-grid.in-view .service-card:nth-child(2) { animation-delay: .15s; }
.services-grid.in-view .service-card:nth-child(3) { animation-delay: .25s; }
.services-grid.in-view .service-card:nth-child(4) { animation-delay: .35s; }
.services-grid.in-view .service-card:nth-child(5) { animation-delay: .45s; }
.why-grid.in-view .service-card { animation: fadeUp .6s ease backwards; }
.why-grid.in-view .service-card:nth-child(1) { animation-delay: .05s; }
.why-grid.in-view .service-card:nth-child(2) { animation-delay: .12s; }
.why-grid.in-view .service-card:nth-child(3) { animation-delay: .19s; }
.why-grid.in-view .service-card:nth-child(4) { animation-delay: .26s; }
.why-grid.in-view .service-card:nth-child(5) { animation-delay: .33s; }
.why-grid.in-view .service-card:nth-child(6) { animation-delay: .4s; }

/* ===== back to top + contact fab ===== */
.back-to-top, .contact-fab {
  position: fixed;
  right: 26px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 90;
  transition: opacity .3s ease, transform .3s ease, background .3s ease, border-color .3s ease, visibility .3s;
}
.back-to-top {
  bottom: 26px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  /* single fixed fill + a contrasting border so it stays legible whether the
     section behind it is light or the same dark ink as the button itself */
  border: 2px solid var(--cream);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.contact-fab {
  bottom: 84px;
  background: var(--accent);
  animation: pulse 2.6s ease infinite;
}
.contact-fab:hover { background: var(--ink); animation: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(138,114,86,.45); }
  50% { box-shadow: 0 0 0 10px rgba(138,114,86,0); }
}
.back-to-top:hover { background: var(--accent); border-color: var(--accent); }

/* hide both once the footer (with its own links) scrolls into view, so they
   never sit on top of — and block clicks on — the footer's Behance link */
#backToTop.near-footer, #contactFab.near-footer {
  opacity: 0;
  visibility: hidden;
}

/* ===== lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,9,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 3px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .8;
  transition: opacity .2s ease, transform .2s ease;
}
.lightbox-close:hover { opacity: 1; transform: scale(1.1); }
.lightbox-close { top: 26px; right: 30px; font-size: 2.2rem; line-height: 1; }
/* hover must keep translateY(-50%) too, or scaling overwrites it and the button jumps out from under the cursor */
.lightbox-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 10px 16px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* ===== contact modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10,10,9,.7);
  backdrop-filter: blur(4px);
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 48px 44px;
  width: 100%;
  max-width: 460px;
  transform: scale(.94) translateY(14px);
  transition: transform .35s ease;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.5);
}
.modal-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 44px; right: 44px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent), var(--ink));
}
.modal.open .modal-panel { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  opacity: .7;
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
.modal-close:hover { opacity: 1; background: var(--line); transform: rotate(90deg); }
.modal-panel .eyebrow { margin-bottom: .4em; }
.modal-panel h3 { margin-bottom: .3em; }
.modal-panel > p.hint { color: #77716a; font-size: .92rem; margin-bottom: 1.6em; }
.contact-form-frame {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  height: 420px; /* fallback before the iframe reports its real height */
}

.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}
.contact-form input, .contact-form textarea {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: .96rem;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #a39c90; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(138,114,86,.18);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form .req { color: var(--accent); }

/* inline validation — replaces Zoho's default alert() popups */
.field.has-error input, .field.has-error textarea {
  border-color: #b5502f;
  box-shadow: 0 0 0 3px rgba(181,80,47,.15);
}
.field-error {
  min-height: 1.1em;
  font-size: .78rem;
  color: #b5502f;
}
.form-error-banner {
  display: none;
  background: #fbece8;
  color: #8a3b2b;
  border: 1px solid #e2b3a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
}
.form-error-banner.show { display: block; }

/* Zoho's Web-to-Contact form: reuses the .contact-form / .field styling above */
.form-actions { margin-top: 6px; }
.form-actions .btn {
  width: 100%;
  border: none;
  cursor: pointer;
  text-align: center;
  padding: 15px 32px;
}

/* ===== responsive: distinct mobile treatment ===== */
@media (max-width: 760px) {
  .section { padding: 70px 0; }
  .hero { padding: 130px 0 90px; }
  .about-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }

  /* desktop-only chrome hidden on mobile */
  .progress-dots { display: none; }
  .menu-btn span:first-child { display: none; }

  /* on mobile a full-screen takeover is the expected pattern (the bottom tab
     bar handles quick nav; this menu is the secondary/overflow one) */
  .menu-overlay {
    position: fixed;
    top: 0; right: 0; left: 0; bottom: 0;
    width: auto;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 8vw;
    transform: translateY(-2%) scale(1);
  }
  .menu-overlay.open { transform: translateY(0) scale(1); }
  .menu-close { top: 28px; right: 24px; font-size: 2.2rem; }
  .menu-links a { font-size: clamp(2.2rem, 9vw, 3.6rem); transform: translateY(20px); }
  .menu-overlay.open .menu-links a { transform: translateY(0); }
  .menu-meta { margin-top: 40px; font-size: 1rem; }

  .header-actions { gap: 10px; }
  .lang-select-btn { padding: 6px 9px; font-size: .72rem; }
  .lang-select-menu { left: auto; right: 0; }

  /* app-style bottom tab bar replaces the drawer/menu paradigm */
  .bottom-tabs { display: flex; }
  body { padding-bottom: 64px; }

  .work-strip img { flex-basis: 82vw; height: 46vh; }
  .work-arrow { width: 38px; height: 38px; font-size: 1.3rem; }
  .lightbox-nav { font-size: 2.2rem; padding: 8px 10px; }
  .modal-panel { padding: 34px 26px; }
  .back-to-top { bottom: 78px; }
  /* the bottom tab bar already has a Contact entry — no need for a second trigger */
  .contact-fab { display: none; }
}

/* ===== wide desktop: use the extra room instead of just centering a narrow column ===== */
@media (min-width: 1200px) {
  .container { max-width: 1240px; }
  .services-grid { grid-template-columns: repeat(5, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .work-strip img { flex-basis: 460px; height: 66vh; max-height: 620px; }
  .about-inner { grid-template-columns: 380px 1fr; gap: 90px; }
}
