/* ===================================================================
   Signus Visuals — studio styles
   Bold / immersive layout · dark + light theming · EN/DE/FR/IT ready
   Recolour fast: change --accent below.
   =================================================================== */

/* ---------- THEME TOKENS ---------- */
:root {
  --maxw:    1240px;
  --radius:  3px;
  --gutter:  max(24px, 5vw);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, "Courier New", monospace;

  --ease:        cubic-bezier(.2, .7, .2, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);    /* expo-out — snappy, premium */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* tiny spring/overshoot */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* classic smooth */
}

/* Dark (default) — midnight slate */
[data-theme="dark"] {
  --bg:        #15181d;
  --bg-alt:    #1b1f26;
  --surface:   #20242c;
  --surface-2: #2a2f39;
  --text:      #eef0f2;
  --text-dim:  #8b919b;
  --border:    #2e333d;
  --accent:    #5e90c8;
  --accent-ink:#0e1014;
  --grain:     0.05;
  --shadow:    0 24px 60px -24px rgba(0,0,0,.78);
}

/* Light — cool off-white */
[data-theme="light"] {
  --bg:        #eef0f1;
  --bg-alt:    #ffffff;
  --surface:   #ffffff;
  --surface-2: #e4e7ea;
  --text:      #181b20;
  --text-dim:  #5c626c;
  --border:    #d3d7db;
  --accent:    #2f6398;
  --accent-ink:#ffffff;
  --grain:     0.04;
  --shadow:    0 24px 60px -28px rgba(20,25,35,.26);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

/* Lenis smooth-scroll (required boilerplate) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}

/* Film-grain texture overlay — a subtle non-generic touch */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; font-weight: 700; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- VIEWPORT PLACEHOLDER (looks like a render frame) ---------- */
.viewport {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg,
      var(--surface) 0, var(--surface) 14px,
      var(--surface-2) 14px, var(--surface-2) 28px);
  border: 1px solid var(--border);
  overflow: hidden;
}
.viewport__label {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border);
  padding: 4px 8px;
}
.viewport__hint {
  font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .04em; color: var(--text-dim);
  padding: 0 20px; text-align: center;
}
.viewport__corner {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}
.viewport img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.nav__logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase;
}
.nav__dot {
  width: 9px; height: 9px; background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-family: var(--font-mono); font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-dim); transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
/* animated underline on the plain nav links (not the CTA button) */
.nav__links a:not(.nav__cta) { position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1.5px; background: var(--accent);
  transition: width .25s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 9px 16px;
}
.nav__cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav__tools { display: flex; align-items: center; gap: 10px; }

/* Language switcher */
.lang { position: relative; }
.lang__btn {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .92rem; font-weight: 700;
  color: var(--text); background: transparent;
  border: 1px solid var(--border); cursor: pointer;
  padding: 11px 14px; letter-spacing: .05em;
  transition: border-color .2s, color .2s;
}
.lang__btn:hover { border-color: var(--accent); }
.lang__btn svg { transition: transform .25s var(--ease); }
.lang[data-open="true"] .lang__btn svg { transform: rotate(180deg); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  list-style: none; min-width: 148px;
  background: var(--bg-alt); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.lang[data-open="true"] .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu button {
  width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; color: var(--text-dim);
  font-family: var(--font-body); font-size: .9rem;
  padding: 10px 14px;
  transition: background .15s, color .15s;
}
.lang__menu button:hover { background: var(--surface); color: var(--text); }
.lang__menu button[aria-current="true"] { color: var(--accent); }
.lang__menu button[aria-current="true"]::before { content: "› "; }

/* Theme toggle */
.theme {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.theme:hover { border-color: var(--accent); color: var(--accent); }
.theme__sun, .theme__moon { grid-area: 1 / 1; width: 23px; height: 23px; }
[data-theme="dark"]  .theme__sun  { display: block; }
[data-theme="dark"]  .theme__moon { display: none; }
[data-theme="light"] .theme__sun  { display: none; }
[data-theme="light"] .theme__moon { display: block; }

/* Hamburger */
.nav__toggle {
  display: none; flex-direction: column; gap: 6px;
  width: 46px; height: 46px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); cursor: pointer;
}
.nav__toggle span {
  width: 18px; height: 2px; background: var(--text);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55;
  height: 2px; background: var(--accent);
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: 150px var(--gutter) 90px;
  position: relative;
  /* immersive gradient mesh — blue brand glow + warm sunset glow near the render */
  background:
    radial-gradient(48% 48% at 6% 6%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%),
    radial-gradient(55% 55% at 96% 88%, color-mix(in srgb, #e8896a 30%, transparent), transparent 62%),
    radial-gradient(40% 40% at 70% 10%, color-mix(in srgb, #8a6bd8 18%, transparent), transparent 60%),
    var(--bg);
}
.hero__inner { max-width: 640px; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 26px;
}
.hero__index { color: var(--accent); }
.hero__eyebrow > span:last-child { position: relative; padding-left: 12px; }
.hero__eyebrow > span:last-child::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1px; height: 14px; background: var(--border); transform: translateY(-50%);
}
.hero__title {
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1.02;
}
.caret {
  display: inline-block; width: .5ch; height: .82em;
  background: var(--accent); margin-left: .12em;
  vertical-align: -.04em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.hero__lead {
  color: var(--text-dim); font-size: 1.1rem;
  max-width: 540px; margin-top: 28px;
}
.hero__actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.hero__viewport {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 5;            /* portrait frame suits the tall bottle */
  border-radius: var(--radius);
  justify-self: end;             /* sits at the right edge of its column */
}
/* very subtle, slow drift — starts at scale 1 so nothing is cropped initially */
.hero__viewport img { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: center; }
@keyframes kenburns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.055); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--radius);
  font-family: var(--font-mono); font-weight: 700;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .45s var(--ease-spring), background .25s, border-color .25s,
              color .25s, box-shadow .4s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn__arrow { transition: transform .35s var(--ease-out); display: inline-block; }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn--primary:hover { box-shadow: 0 12px 32px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- MARQUEE ---------- */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden; padding: 16px 0;
}
.marquee__track {
  display: flex; gap: 0; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee__item {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 0 22px; white-space: nowrap; color: var(--text);
}
.marquee__item::after { content: "✦"; color: var(--accent); margin-left: 44px; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- SECTIONS ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 110px var(--gutter); }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: 56px; }
.section__kicker {
  font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section__num {
  color: var(--accent-ink); background: var(--accent);
  padding: 2px 8px; font-weight: 700;
}
.section__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  text-transform: uppercase; letter-spacing: -.02em;
}
.section__sub { color: var(--text-dim); margin-top: 14px; max-width: 460px; }

/* ---------- WORK GALLERY (composed asymmetric wall) ----------
   Square renders (1080×1080) always sit in square frames so they are
   never stretched or cropped; object-fit: cover keeps every image's
   aspect intact. Asymmetry comes from tile SIZE, not from distorting
   shape. The wall is a vertical stack of composition blocks (pair /
   wide / trio), each with its own rhythm but a shared, consistent gap. */
.work-grid {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: clamp(24px, 4vw, 40px);
}
/* Base tile: square unless a modifier says otherwise */
.card { aspect-ratio: 1 / 1; }

/* PAIR — perfume + insulated bottle, both true 1:1 squares so the square
   source renders are shown fully (no crop, no stretch). The two equal
   squares together span the full width = the same width as the wide
   supplement tile below. */
.work-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.work-pair .card { aspect-ratio: 1 / 1; }

/* WIDE — supplement packaging is composed 16:9, so it gets a 16:9 frame
   (the square source crops its letterbox bars away) and full width. */
.card--wide { aspect-ratio: 16 / 9; }

/* TRIO — Ellium line as an asymmetric block: one tall render on the left,
   two stacked on the right. The two small squares set the row heights;
   the tall card spans both rows and stretches to match exactly. */
.work-trio {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.work-trio .card--tall { grid-row: 1 / span 2; aspect-ratio: auto; }

.card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease);
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 70%, var(--border)); }
.card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.1s var(--ease-out);
  will-change: transform;
}
.card:hover .card__img { transform: scale(1.08); }

/* overlay caption — slides up on hover */
.card__caption {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 22px;
  background: linear-gradient(to top,
    rgba(0,0,0,.78) 0%,
    rgba(0,0,0,.18) 46%,
    transparent 70%);
  opacity: 1;                 /* titles always visible, like a case-study card */
  transition: background .45s var(--ease-out);
}
.card__num {
  align-self: flex-start;
  font-family: var(--font-display); font-weight: 700;
  font-size: 3rem; line-height: 1;
  color: rgba(255,255,255,.08);
  transition: color .55s var(--ease-out);
}
.card:hover .card__num { color: rgba(255,255,255,.4); }
.card__info { }
.card__title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: #fff; margin: 0;
}
.card__tag {
  font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.7); margin: 5px 0 0;
  display: inline-flex; align-items: center; gap: 7px;
}
/* small "view" cue after the tag, slides in on hover */
.card__tag::after {
  content: "View →"; color: #fff; opacity: 0;
  transform: translateX(-4px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.card:hover .card__tag::after { opacity: .9; transform: none; }

/* "expand / open" affordance, top-right of each tile */
.card__expand {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  font-size: 1rem; color: #fff;
  background: color-mix(in srgb, #000 42%, transparent);
  border: 1px solid rgba(255,255,255,.28); border-radius: 50%;
  opacity: 0; transform: translateY(-6px) scale(.9);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), background .25s;
  backdrop-filter: blur(4px);
}
.card:hover .card__expand { opacity: 1; transform: none; }
.card:hover .card__expand:hover,
.card .card__expand:hover { background: var(--accent); color: var(--accent-ink); }
@media (hover: none) { .card__expand { opacity: .85; transform: none; } }

/* Gentle fade-in as each render finishes loading (JS adds .is-loaded).
   Scoped to .js so images are never hidden when JavaScript is off.
   IMPORTANT: keep `transform` in the transition list so the hover
   zoom on cards/triptych still tweens smoothly (opacity-only here
   would override the zoom and make it snap instantly). */
.js .card__img { opacity: 0; transition: opacity .8s var(--ease-out), transform 1.1s var(--ease-out); }
.js .about__media img,
.js .hero__viewport img { opacity: 0; transition: opacity .8s var(--ease-out); }
.js .card__img.is-loaded,
.js .about__media img.is-loaded,
.js .hero__viewport img.is-loaded { opacity: 1; }

/* ---------- SERVICES ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 0; }
.service {
  border: 1px solid var(--border); border-right: 0;
  padding: 36px 30px 44px;
  transition: background .25s;
  position: relative;
}
.service:last-child { border-right: 1px solid var(--border); }
.service:hover { background: var(--surface); }
.service::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 0; height: 3px; background: var(--accent);
  transition: width .55s var(--ease-out);
}
.service:hover::before { width: 100%; }
.service__num {
  font-family: var(--font-mono); font-weight: 700;
  font-size: .9rem; color: var(--accent);
  display: inline-block;
  transition: letter-spacing .45s var(--ease-out), opacity .3s;
}
.service:hover .service__num { letter-spacing: .14em; }
.service h3 { margin: 18px 0 12px; font-size: 1.4rem; text-transform: uppercase; letter-spacing: -.01em;
  transition: color .3s; }
.service:hover h3 { color: var(--accent); }
.service p { color: var(--text-dim); font-size: .97rem; }

/* ---------- PROCESS ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 0; }
.step {
  position: relative;
  border: 1px solid var(--border); border-right: 0;
  padding: 34px 28px 42px;
}
.step:last-child { border-right: 1px solid var(--border); }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 100%; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.step:hover::before { transform: scaleX(1); }
.step__num {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 700; font-size: .85rem;
  color: var(--accent-ink); background: var(--accent);
  padding: 3px 9px;
}
.step h3 { margin: 18px 0 10px; font-size: 1.2rem; text-transform: uppercase; letter-spacing: -.01em; }
.step p { color: var(--text-dim); font-size: .93rem; }

/* ---------- ABOUT (editorial text block — deliberately NOT card-based,
   so it reads differently from the numbered "How it works" steps) ---------- */
.about { max-width: 760px; }
.about__text > p {
  color: var(--text); margin-bottom: 18px; max-width: 680px;
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.5; font-weight: 400;
}
.about__text > p:first-of-type { margin-top: 22px; }
.about__text > p + p { color: var(--text-dim); font-size: 1.05rem; line-height: 1.65; }
/* Facts as a single inline meta row, not boxed columns */
.about__facts {
  list-style: none; margin-top: 38px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 14px 36px;
}
.about__facts li {
  display: flex; flex-direction: column; gap: 5px;
  color: var(--text); font-size: 1rem;
}
.about__facts strong {
  font-family: var(--font-mono); font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  font-size: .72rem; color: var(--accent);
}

/* ---------- SOCIALS ---------- */
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.social {
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 26px;
  border: 1px solid var(--border); border-right: 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  transition: background .2s, color .2s;
}
.social:last-child { border-right: 1px solid var(--border); }
.social:hover { background: var(--accent); color: var(--accent-ink); }
.social__name { display: inline-flex; align-items: center; gap: 12px; }
.social__icon { flex: none; }
.social__go { font-size: 1.2rem; transition: transform .2s var(--ease); }
.social:hover .social__go { transform: translate(3px, -3px); }
.feed__note { color: var(--text-dim); font-size: .85rem; margin-top: 20px; }

/* ---------- CONTACT ---------- */
.contact { max-width: 640px; }
.contact__title { margin-top: 14px; }
.contact__sub { color: var(--text-dim); margin: 16px 0 36px; }
.contact__form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
}
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 15px;
  color: var(--text); font-family: inherit; font-size: .96rem;
  resize: vertical;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.contact__form .btn { justify-self: start; border-style: solid; }
.contact__alt { color: var(--text-dim); margin-top: 26px; font-size: .95rem; }
.contact__alt a { color: var(--accent); border-bottom: 1px solid var(--accent); }
.contact__consent { color: var(--text-dim); font-size: .82rem; margin: -4px 0 2px; }
.contact__consent a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
/* Submit status message — appears after sending */
.contact__status {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .03em;
  margin: 0; min-height: 1.2em; opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.contact__status.show { opacity: 1; transform: none; }
.contact__status.is-ok { color: var(--accent); }
.contact__status.is-err { color: #e06b6b; }
.contact__form.sent .field,
.contact__form.sent .contact__consent,
.contact__form.sent > .btn { display: none; }

/* ---------- FOOTER ---------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 36px var(--gutter);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.footer__brand { display: flex; align-items: center; gap: 8px; color: var(--text); }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { color: var(--text-dim); transition: color .2s; position: relative; }
.footer__links a:hover { color: var(--accent); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 96%, #000);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox__img {
  max-width: 92vw; max-height: 88vh; border: 1px solid var(--border);
  transform: scale(.94);
  transition: transform .45s var(--ease);
}
.lightbox.open .lightbox__img { transform: none; }
.lightbox__close {
  position: absolute; top: 22px; right: 30px;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); font-size: 1.8rem; cursor: pointer; line-height: 1;
  transition: border-color .2s, color .2s;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- FAQ (CSS grid-rows accordion — smooth, no JS height math) ---------- */
.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 4px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); transition: color .3s var(--ease-out);
}
.faq__q::after {
  content: "+"; flex: none;
  font-family: var(--font-mono); font-weight: 400; font-size: 1.5rem;
  color: var(--accent);
  transition: transform .45s var(--ease-spring), color .3s;
}
.faq__item.open .faq__q::after { transform: rotate(45deg); }
.faq__q:hover { color: var(--accent); }
/* Animated panel: grid row goes 0fr → 1fr; inner clips the overflow */
.faq__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .42s var(--ease-out);
}
.faq__item.open .faq__a { grid-template-rows: 1fr; }
.faq__a-in { overflow: hidden; }
.faq__a p {
  margin: 0; padding: 0 4px 26px; max-width: 760px;
  color: var(--text-dim); font-size: 1rem; line-height: 1.65;
}

/* ---------- NAV ACTIVE LINK ---------- */
.nav__links a.nav-active:not(.nav__cta) { color: var(--text); }
.nav__links a.nav-active:not(.nav__cta)::after { width: 100%; }

/* ---------- REVEAL ANIMATION ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; }

/* Staggered children: container is the trigger, children animate in sequence.
   Per-child transitionDelay is set in main.js. */
[data-stagger] > * {
  opacity: 0; transform: translateY(28px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
}
[data-stagger].in > * { opacity: 1; transform: none; }

/* ---------- FULL-BLEED IMAGE REVEAL (scale settle) ----------
   As the work tiles scroll into view, the image eases down from a gentle
   zoom to its resting scale — a slow, Happy-Finish-style settle. The img
   already carries a transform transition (see the .is-loaded block), so
   this just rides on it. Hover zoom still works afterwards because reveal
   lands on transform:none. */
[data-stagger]:not(.in) .card__img,
[data-reveal]:not(.in) .card__img { transform: scale(1.14); }

/* ---------- SECTION HEAD — distinct 3-part reveal ---------- */
/* section__head uses data-stagger; JS skips setting uniform delays on it. */
.section__head[data-stagger] > *:nth-child(1) { /* kicker — slides from left */
  opacity: 0; transform: translateX(-18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.section__head[data-stagger] > *:nth-child(2) { /* title — clip wipe up */
  opacity: 0;
  clip-path: inset(0 0 55% 0);
  transform: translateY(14px);
  transition: opacity .85s .09s var(--ease-out),
              clip-path .85s .09s var(--ease-out),
              transform .85s .09s var(--ease-out);
}
.section__head[data-stagger] > *:nth-child(3) { /* sub — gentle fade-up */
  opacity: 0; transform: translateY(12px);
  transition: opacity .7s .22s var(--ease-out),
              transform .7s .22s var(--ease-out);
}
.section__head[data-stagger].in > *:nth-child(1) { opacity: 1; transform: none; }
.section__head[data-stagger].in > *:nth-child(2) { opacity: 1; clip-path: inset(0 0 0% 0); transform: none; }
.section__head[data-stagger].in > *:nth-child(3) { opacity: 1; transform: none; }

/* ---------- HERO TITLE LINE MASK ---------- */
.hero__title-line {
  display: block; overflow: hidden;
  line-height: 1.0; padding-bottom: .06em; /* prevents descender clip */
}
/* Title text slides up from behind the mask */
.hero__inner[data-reveal] .hero__title-line > * {
  display: block;
  transform: translateY(108%) skewY(1.8deg);
  transition: transform 1.15s var(--ease-out);
}
.hero__inner[data-reveal] .hero__title-line:nth-child(2) > * {
  transition-delay: .14s;
}
/* Exempt the h1 itself from the parent stagger — lines animate independently */
.hero__inner[data-reveal] > *:nth-child(2) {
  opacity: 1 !important; transform: none !important; transition: none !important;
}
.hero__inner[data-reveal].in .hero__title-line > * {
  transform: none;
}

/* Hero inner: each child animates in instead of the whole block */
.hero__inner[data-reveal] { opacity: 1; transform: none; transition: none !important; }
.hero__inner[data-reveal] > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .78s var(--ease), transform .78s var(--ease);
}
.hero__inner[data-reveal] > *:nth-child(1) { transition-delay: .06s; }
.hero__inner[data-reveal] > *:nth-child(2) { transition-delay: .18s; }
.hero__inner[data-reveal] > *:nth-child(3) { transition-delay: .32s; }
.hero__inner[data-reveal] > *:nth-child(4) { transition-delay: .46s; }
.hero__inner[data-reveal].in > * { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  /* hero stacks: text on top, product image below */
  .hero {
    grid-template-columns: 1fr; gap: 34px; align-items: start;
    min-height: auto; padding: 128px var(--gutter) 70px;
  }
  .hero__viewport { justify-self: start; max-width: 440px; aspect-ratio: 1 / 1; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .services, .socials, .process { grid-template-columns: 1fr; }
  .service, .step { border-right: 1px solid var(--border); }
  .service:not(:last-child), .step:not(:last-child) { border-bottom: 0; }
  .social { border-right: 1px solid var(--border); }
  .social:not(:last-child) { border-bottom: 0; }
}
@media (max-width: 640px) {
  /* work wall collapses to a single clean column on phones */
  .work-pair { grid-template-columns: 1fr; }
  .work-trio { grid-template-columns: 1fr; }
  .work-trio .card--tall { grid-row: auto; aspect-ratio: 1 / 1; }
  /* about facts stack into a single column */
  .about__facts { flex-direction: column; gap: 16px; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; top: 0; right: 0;
    height: 100vh; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; gap: 26px;
    background: var(--bg-alt); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .35s var(--ease);
    z-index: 55;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1rem; }
  .nav__toggle { display: flex; }
}

/* ---------- REDUCED MOTION ----------
   We intentionally keep the decorative animations (hover zoom, marquee,
   accordion) running even when the OS requests reduced motion — they are
   core to the brand feel. We only drop smooth-scroll, which can cause
   long jarring jumps. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
