/* ==========================================================================
   Solomiia Chopyk — portfolio
   Layout and motion follow the dark/cream editorial style of the brief's
   reference: giant serif hero, sticky section titles, 3D work cards,
   tilted archive wall, marquee rows, pill footer.
   ========================================================================== */


/* ---------- brand fonts: Bogart Trial (serif) + e-Ukraine (sans) ----------
   WOFF2 files in assets/fonts/ (converted from the original TTF/OTF in assets/fonts/bogart-serif-font-family and assets/fonts/Шрифт).
   Digits and missing glyphs fall back to Source Serif 4 / Inter. */
@font-face { font-family: "Bogart Trial"; font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-002F, U+003A-10FFFF; /* the trial build has placeholder digits, so 0–9 come from the fallback serif */
  src: url("../assets/fonts/Bogart-Regular.woff2") format("woff2"); }
@font-face { font-family: "Bogart Trial"; font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-002F, U+003A-10FFFF; /* the trial build has placeholder digits, so 0–9 come from the fallback serif */
  src: url("../assets/fonts/Bogart-Italic.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 300; font-style: normal; font-display: swap; src: url("../assets/fonts/e-Ukraine-Light.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/e-Ukraine-Regular.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 500 600; font-style: normal; font-display: swap; src: url("../assets/fonts/e-Ukraine-Medium.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/e-Ukraine-Bold.woff2") format("woff2"); }
:root {
  --ink: #231815;          /* page dark — espresso */
  --black: #1A1210;        /* archive */
  --cream: #F5EFC6;        /* light sections — cream */
  --cream-2: #FBF7E1;
  --accent: #A5BCD6;       /* secondary — powder blue */
  --cocoa: #4A2E27;        /* secondary — cocoa: titles, step cards */
  --bone: #A5BCD6;         /* menu button */
  --brown: #4A2E27;        /* titles on cream */
  --muted: #7A6453;
  --line: rgba(35, 24, 21, .18);
  --line-dark: rgba(245, 239, 198, .16);

  --serif: "Bogart Trial", "Source Serif 4", "Times New Roman", serif;
  --display: "e-Ukraine", "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans: "e-Ukraine", "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--brown);
  font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--brown); color: var(--cream); }

/* ----- language switching: every text exists in both languages ----- */
html[lang="uk"] [data-l="en"],
html[lang="en"] [data-l="uk"] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label {
  font: 500 11px/1.2 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo {
  font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream); mix-blend-mode: difference;
}
.header-right { display: flex; align-items: center; gap: 12px; }

.lang {
  display: flex; align-items: center; gap: 2px;
  padding: 4px; border-radius: 99px;
  background: rgba(165, 188, 214, .92);
  backdrop-filter: blur(8px);
}
.lang button {
  font: 500 11px/1 var(--sans); letter-spacing: .08em;
  padding: 9px 11px; border-radius: 99px; color: var(--brown);
  transition: background .3s, color .3s;
}
html[lang="en"] .lang [data-set="en"],
html[lang="uk"] .lang [data-set="uk"] { background: var(--ink); color: var(--cream); }

.menu-btn {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--bone);
  display: grid; place-items: center;
  transition: transform .5s var(--ease), background .3s;
}
.menu-btn:hover { transform: scale(1.06); }
.menu-btn i {
  position: absolute; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform .5s var(--ease-io);
}
.menu-btn i:first-child { transform: translateY(-3.5px); }
.menu-btn i:last-child { transform: translateY(3.5px); }
.menu-btn { position: relative; }
body.menu-open .menu-btn { background: var(--cream); }
body.menu-open .menu-btn i:first-child { transform: rotate(45deg) scale(.7); }
body.menu-open .menu-btn i:last-child { transform: rotate(-45deg) scale(.7); }

/* full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(35, 24, 21, .55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease-io), visibility 0s .6s;
  display: grid; grid-template-columns: 1fr minmax(280px, 46%);
}
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .6s var(--ease-io); }
.menu nav { grid-column: 2; align-self: center; display: flex; flex-direction: column; }
.menu nav a {
  font: 400 clamp(40px, 6.4vw, 92px)/.98 var(--display);
  text-transform: uppercase; letter-spacing: -.03em; color: var(--cream);
  overflow: hidden;
}
.menu nav a > span { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease); }
body.menu-open .menu nav a > span { transform: none; }
body.menu-open .menu nav a:nth-child(2) > span { transition-delay: .05s; }
body.menu-open .menu nav a:nth-child(3) > span { transition-delay: .1s; }
body.menu-open .menu nav a:nth-child(4) > span { transition-delay: .15s; }
.menu nav a:hover span { font-style: italic; font-family: var(--serif); letter-spacing: -.02em; text-transform: none; }
.menu-foot {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: flex-end; gap: 18px; padding: 0 var(--gutter);
  color: var(--cream);
}
.menu-foot a { opacity: .75; transition: opacity .3s; }
.menu-foot a:hover { opacity: 1; }

/* page transition curtain */
.curtain {
  position: fixed; inset: 0; z-index: 100; background: var(--cream);
  transform: translateY(100%); pointer-events: none;
}
.curtain.in { animation: curtainIn .7s var(--ease-io) forwards; }
.curtain.out { transform: none; animation: curtainOut .8s var(--ease-io) .05s forwards; }
@keyframes curtainIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes curtainOut { from { transform: none; } to { transform: translateY(-100%); } }

/* ==========================================================================
   Hero — giant serif line scrolls sideways while placeholders drift
   ========================================================================== */
.hero { position: relative; height: 380vh; background: var(--ink); }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-line {
  position: absolute; top: 50%; left: 0;
  margin: 0; white-space: nowrap;
  font: 400 clamp(110px, 17vw, 290px)/1 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: -.035em; color: var(--cream);
  transform: translate3d(18vw, -55%, 0);
  will-change: transform; z-index: 2;
}
.hero-line em { font-style: italic; color: var(--accent); }
.hero-line .dash { font-size: .5em; vertical-align: .32em; }
.hero-photo { width: var(--w); height: var(--h);
  /* in normal flow (stacked, then nudged by left/top) so each photo crosses the screen at its own moment */
  position: relative; display: block; z-index: 3; overflow: hidden;
  will-change: transform;
}
.hero-photo.behind { z-index: 1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  color: var(--cream); padding-bottom: 6px; z-index: 4;
}
.hero-scroll::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: left; animation: line 2.4s var(--ease-io) infinite;
}
@keyframes line { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); transform-origin: left; } 50.1% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
.hero-intro {
  position: absolute; left: var(--gutter); bottom: 26px; z-index: 4;
  color: var(--cream); opacity: .7; max-width: 260px;
}

/* photo placeholders (swap for real photos — see PHOTOS.md) */
.ph {
  position: relative; display: flex; align-items: flex-end;
  background:
    repeating-linear-gradient(135deg, rgba(245,239,198,.04) 0 10px, transparent 10px 20px),
    var(--ph, #3a2a24);
  color: rgba(245, 239, 198, .78);
}
.ph::before {
  content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(245, 239, 198, .25);
}
.ph > span {
  position: relative; padding: 14px; font: 500 10px/1.35 var(--sans);
  letter-spacing: .06em; text-transform: uppercase;
}
.ph b { display: block; font-weight: 600; margin-bottom: 3px; color: var(--cream); }

/* ==========================================================================
   About — word-by-word reveal
   ========================================================================== */
.about { position: relative; z-index: 2; background: var(--cream); padding: 22vh var(--gutter) 16vh; }
.about-text {
  max-width: 1020px; margin: 0 auto; text-align: center;
  font: 400 clamp(22px, 2.6vw, 38px)/1.22 var(--sans);
  letter-spacing: -.02em; color: var(--brown);
}
.about-text .w { opacity: .16; transition: opacity .25s linear; }
.about-text .w.on { opacity: 1; }
.about-grid {
  max-width: 1180px; margin: 14vh auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  border-top: 1px solid var(--line); padding-top: 28px;
}
.about-grid h3 { margin: 0 0 14px; }
.about-grid ul { margin: 0; padding: 0; list-style: none; }
.about-grid li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.about-cta { display: flex; justify-content: center; gap: 12px; margin-top: 64px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: 99px;
  background: var(--ink); color: var(--cream);
  font: 500 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  transition: transform .5s var(--ease), background .3s, color .3s;
  position: relative; overflow: hidden;
}
.pill:hover { transform: translateY(-2px); }
.pill.light { background: var(--cream); color: var(--ink); }
.pill.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.pill .arrow { transition: transform .4s var(--ease); }
.pill:hover .arrow { transform: translateX(4px); }
.pill[data-todo] { opacity: .6; }

/* ==========================================================================
   Works — sticky title, 3D cards flying over it
   ========================================================================== */
.works { position: relative; background: var(--cream); }
/* default (reduced motion / no JS): title, then one even column of cards */
.works-sticky { padding: 18vh 0 16vh; }
.big-title {
  margin: 0; font: 400 clamp(84px, 20vw, 330px)/.84 var(--display);
  text-transform: uppercase; letter-spacing: -.05em; color: var(--brown);
  text-align: center; white-space: nowrap;
}
.works .big-title { font-size: clamp(64px, 15.5vw, 260px); }
.works-list {
  position: relative; padding: 10vh var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; gap: 10vh;
}
.work-card { width: min(680px, 88vw); }
.work-card a {
  display: block; background: var(--cream-2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(35, 24, 21, .35);
}

/* stacked scene (JS adds .stack): sticky stage, cards rise from below,
   flatten over the title, then slide up and shrink as the next one covers them */
.works.stack { height: calc(100vh + (var(--n) + .6) * var(--step)); height: calc(100svh + (var(--n) + .6) * var(--step)); --step: 85vh; }
.works.stack .works-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0;
  display: grid; place-items: center; overflow: hidden; perspective: 1300px;
}
.works.stack .big-title { grid-area: 1 / 1; }
.works.stack .works-list { display: contents; }
.works.stack .work-card {
  grid-area: 1 / 1; width: min(46vw, 680px, calc((100svh - 240px) * 1.42));
  transform: translate3d(0, 110vh, 0); transform-origin: 50% 50%;
  will-change: transform; backface-visibility: hidden;
}
.work-media {
  position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; background: #E6DDAE;
}
.work-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: opacity .6s var(--ease), transform 1.2s var(--ease);
}
.work-media img.hover { opacity: 0; }
.work-card a:hover .work-media img.hover { opacity: 1; }
.work-card a:hover .work-media img { transform: scale(1.04); }
.work-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  background: var(--accent); color: var(--ink); border-radius: 99px;
  padding: 6px 11px; font: 600 9px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
}
.work-name {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  color: var(--cream); text-align: center; padding: 20px;
  font: 400 clamp(26px, 3vw, 44px)/1 var(--display); text-transform: uppercase; letter-spacing: -.03em;
  background: linear-gradient(180deg, rgba(35, 24, 21, .62), rgba(35, 24, 21, .78));
  text-shadow: 0 2px 18px rgba(35, 24, 21, .5);
  opacity: 0; transition: opacity .5s var(--ease);
}
.work-card a:hover .work-name { opacity: 1; }
.work-tag { transition: opacity .4s var(--ease); }
.work-card a:hover .work-tag { opacity: 0; } /* the hover title already names the type */
.work-info {
  background: var(--cream-2); padding: 16px 18px 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px;
}
.work-info h3 { margin: 0; font: 500 17px/1.2 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.work-info .num { color: var(--muted); }
.work-info p { grid-column: 1 / -1; margin: 2px 0 0; font-size: 14px; color: var(--brown); }
.work-info .type { grid-column: 1 / -1; color: var(--muted); }

/* ==========================================================================
   Archive wall — tilted, columns drifting in opposite directions
   ========================================================================== */
.archive { position: relative; height: 240vh; background: var(--black); }
.archive-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1300px; }
.archive-wall {
  position: absolute; left: 50%; top: 50%; width: 150vw;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
  transform: translate(-50%, -50%) rotateX(38deg) rotateZ(-14deg);
  transform-style: preserve-3d;
}
.archive-col { display: flex; flex-direction: column; gap: 14px; will-change: transform; }
.archive-col img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 2px; }
.archive-col img.tall { aspect-ratio: 3 / 4; }
.archive-caption {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; z-index: 2;
  display: flex; justify-content: flex-end; color: var(--cream);
}
.archive-sticky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,13,11,.6), transparent 25%, transparent 70%, rgba(20,13,11,.75)); pointer-events: none; }

/* ==========================================================================
   Services — journal-style rows with hover marquee
   ========================================================================== */
/* pinned section + the one that slides over it (see js: pins) */
main > [data-pin] { position: sticky; top: var(--pin-top, 0px); z-index: 0; transform-origin: 50% calc(100% - 50svh); }
main > [data-pin]::before {
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: #0d0908; opacity: calc(var(--cover, 0) * .6);
}
.services { z-index: 1; box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .55); }
.process { z-index: 2; }
.contact { z-index: 3; box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .55); }

.services { background: var(--ink); color: var(--cream); padding: 14vh var(--gutter) 10vh; position: relative; overflow: hidden; }
.services .big-title, .process .big-title { color: var(--cream); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: clamp(18px, 3.5vh, 40px); gap: 24px; }
.section-head .big-title { text-align: left; }
.section-head .label { opacity: .6; flex: 0 0 240px; text-align: right; margin: 0 0 1em; }
.services .big-title, .process .big-title { font-size: clamp(54px, 12vw, 200px); }
.svc { border-top: 1px solid var(--line-dark); }
.svc:last-child { border-bottom: 1px solid var(--line-dark); }
.svc-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center;
  padding: 26px 0; cursor: default; position: relative;
}
.svc-row .label { opacity: .55; }
.svc-title { overflow: hidden; white-space: nowrap; }
.svc-title .track { display: inline-flex; gap: .5em; will-change: transform; }
.svc-title span { font: 400 clamp(30px, 4.6vw, 70px)/1.05 var(--serif); letter-spacing: -.02em; }
.svc-title span.dot { opacity: .4; }
.svc:hover .svc-title .track { animation: marquee 9s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.svc-body {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .7s var(--ease), opacity .5s, padding .5s;
}
.svc:hover .svc-body, .svc:focus-within .svc-body, .svc.open .svc-body { max-height: 220px; opacity: 1; padding-bottom: 26px; }
.svc-body p { margin: 0; max-width: 620px; color: rgba(245,239,198,.78); font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags > span { border: 1px solid var(--line-dark); border-radius: 99px; padding: 7px 12px; font: 500 11px/1 var(--sans); letter-spacing: .04em; }

/* ==========================================================================
   Process — horizontal strip of steps
   ========================================================================== */
.process { background: var(--ink); color: var(--cream); padding: 10vh 0 18vh; overflow: hidden; }
.process .section-head { padding: 0 var(--gutter); }
.steps {
  display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px;
  padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none;
}
.steps::-webkit-scrollbar { display: none; }
.step {
  position: relative; min-height: 300px; padding: 22px;
  background: var(--cocoa); display: flex; flex-direction: column; justify-content: space-between;
  transition: background .5s var(--ease), transform .6s var(--ease);
}
.step:hover { background: var(--cream); color: var(--ink); transform: translateY(-6px); }
.step .n { font: 400 64px/1 var(--serif); font-style: italic; opacity: .9; }
.step h3 { margin: 0 0 10px; font: 500 20px/1.15 var(--sans); letter-spacing: -.01em; }
.step p { margin: 0; font-size: 14px; opacity: .7; }
.step:not(:last-child)::after {
  content: "→"; position: absolute; right: -12px; top: 50%; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; background: var(--cream); color: var(--ink);
  display: grid; place-items: center; font-size: 12px; transform: translateY(-50%);
}

/* ==========================================================================
   Contact / footer
   ========================================================================== */
.contact { background: var(--black); color: var(--cream); padding: 20vh var(--gutter) 26px; text-align: center; position: relative; overflow: hidden; }
.contact-kicker { font: 400 clamp(26px, 3.4vw, 52px)/1.1 var(--serif); letter-spacing: -.02em; margin: 0 0 4vh; }
.contact-kicker em { font-style: italic; }
.contact .big-title { color: var(--cream); font-size: clamp(46px, 10.5vw, 180px); white-space: normal; }
.contact-pills { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 5vh 0 18vh; }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.ph > span { display: none; }
.avatar.ph::before { inset: 4px; border-radius: 50%; }
.contact-pills button.pill { border: 0; cursor: pointer; }
.contact .pill.ghost { color: var(--cream); }

/* ---------- brief form pop-up ---------- */
body.brief-open { overflow: hidden; }
/* height/top are also set from js (visualViewport) so the pop-up always matches the visible screen on iPhone */
dialog.brief {
  position: fixed; top: 0; left: 0; right: 0; bottom: auto; z-index: 1000;
  width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 24px; border: 0; background: transparent; color: var(--ink); box-sizing: border-box;
  display: none; grid-template-rows: minmax(0, 1fr); place-items: center; overflow: hidden;
}
dialog.brief[open] { display: grid; }
dialog.brief::backdrop { background: rgba(26, 18, 16, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.brief-box {
  position: relative; width: min(720px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-sizing: border-box;
  background: var(--cream); border-radius: 28px; padding: 44px clamp(22px, 4.5vw, 52px) 30px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}
dialog.brief[open] .brief-box { animation: brief-in .55s var(--ease) both; }
@keyframes brief-in { from { opacity: 0; transform: translateY(28px) scale(.98); } }
.brief-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--ink); cursor: pointer; transition: transform .4s var(--ease);
}
.brief-close:hover { transform: rotate(90deg); }
.brief-close i { position: absolute; left: 13px; right: 13px; top: 21px; height: 2px; background: var(--cream); transform: rotate(45deg); }
.brief-close i + i { transform: rotate(-45deg); }
.brief-title { font: 400 clamp(30px, 4.2vw, 46px)/1.04 var(--serif); letter-spacing: -.02em; margin: 0 56px 10px 0; color: var(--ink); }
.brief-intro { margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.brief-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.brief-chips { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.brief-chips legend, .brief-field > span { display: block; padding: 0; margin: 0 0 10px; font: 500 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.brief-field > span em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); }
.brief-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.brief-chips label { position: relative; cursor: pointer; }
.brief-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.brief-chips label > span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 99px;
  box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; transition: background .25s, color .25s, box-shadow .25s;
}
.brief-chips label:hover > span { box-shadow: inset 0 0 0 1px var(--ink); }
.brief-chips input:checked + span { background: var(--ink); color: var(--cream); box-shadow: none; }
.brief-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.brief-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.brief-field { display: block; margin: 0 0 18px; }
.brief-field input, .brief-field textarea {
  display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px;
  background: var(--cream-2); color: var(--ink); font: 400 16px/1.4 var(--sans); padding: 13px 16px;
  transition: border-color .25s, box-shadow .25s;
}
.brief-field textarea { resize: vertical; min-height: 92px; }
.brief-field small { display: block; margin-top: 7px; font-size: 13px; color: var(--muted); }
.brief-field input::placeholder, .brief-field textarea::placeholder { color: var(--muted); opacity: .75; }
.brief-field input:focus, .brief-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(165, 188, 214, .55); }
.brief-submit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.brief-submit .pill { border: 0; cursor: pointer; }
.brief-req { font-size: 13px; color: var(--muted); }
.send-busy { display: none; }
dialog.busy .send-idle { display: none; }
dialog.busy .send-busy { display: inline; }
dialog.busy .brief-submit .pill { opacity: .6; pointer-events: none; }
.brief-error { display: none; margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(74, 46, 39, .1); color: var(--cocoa); font-size: 14px; }
dialog.failed .brief-error { display: block; }
.brief-done { display: none; padding: 10px 0 6px; }
.brief-done .pill { border: 0; cursor: pointer; margin-top: 4px; }
dialog.sent .brief-form { display: none; }
dialog.sent .brief-done { display: block; }
.brief-direct { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.brief-direct .label { color: var(--muted); }
.brief-direct > div { display: flex; gap: 8px; flex-wrap: wrap; }
.pill.small { height: 42px; padding: 0 18px; font-size: 11px; }
@media (max-width: 640px) {
  dialog.brief { padding: 12px 0 0; place-items: end stretch; }
  .brief-box { width: 100%; max-height: 100%; border-radius: 24px 24px 0 0; padding: 34px 18px calc(26px + env(safe-area-inset-bottom)); }
  dialog.brief[open] .brief-box { animation-name: brief-up; }
  .brief-row { grid-template-columns: 1fr; }
  .brief-close { top: 14px; right: 14px; }
}
@keyframes brief-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { dialog.brief[open] .brief-box { animation: none; } }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; opacity: .6; }

/* ==========================================================================
   Reveal helpers
   ========================================================================== */
.rv { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-img { clip-path: inset(12% 0 0 0); transition: clip-path 1.4s var(--ease); }
.rv-img.in { clip-path: inset(0 0 0 0); }
.split-line { display: block; overflow: hidden; }
.split-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.in .split-line > span, .split-line.in > span { transform: none; }

/* ==========================================================================
   CASE PAGES
   ========================================================================== */
.case-hero { background: var(--ink); color: var(--cream); padding: 170px var(--gutter) 0; position: relative; }
.case-hero .back { display: inline-flex; gap: 8px; align-items: center; opacity: .7; margin-bottom: 7vh; transition: opacity .3s; }
.case-hero .back:hover { opacity: 1; }
.case-title {
  margin: 0; font: 400 clamp(52px, 10.5vw, 176px)/.88 var(--display);
  text-transform: uppercase; letter-spacing: -.05em;
}
.case-sub { margin: 26px 0 0; max-width: 760px; font: 400 clamp(20px, 2.2vw, 32px)/1.2 var(--serif); letter-spacing: -.01em; opacity: .9; }
.case-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px;
  margin-top: 8vh; padding: 22px 0; border-top: 1px solid var(--line-dark);
}
.case-meta .label { opacity: .5; margin-bottom: 8px; }
.case-meta p { margin: 0; font-size: 15px; }
.case-meta a { text-decoration: underline; text-underline-offset: 3px; }
.case-cover { padding: 0 var(--gutter) 0; background: linear-gradient(var(--ink) 55%, var(--cream) 55%); }
.case-cover figure { margin: 0; overflow: hidden; will-change: transform; backface-visibility: hidden; transform-origin: center top; contain: paint; }
.case-cover img { width: 100%; height: auto; }
.case-cover .tall-crop { max-height: 88vh; object-fit: cover; object-position: top; }

.case-body { background: var(--cream); padding: 14vh var(--gutter) 6vh; }
.block {
  display: grid; grid-template-columns: minmax(180px, 1fr) 2.2fr; gap: 32px;
  padding: 7vh 0; border-top: 1px solid var(--line);
  max-width: 1360px; margin: 0 auto;
}
.block > .label { color: var(--muted); padding-top: 8px; }
.block .lead { margin: 0 0 18px; font: 400 clamp(24px, 2.6vw, 38px)/1.18 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.block p { margin: 0 0 14px; font-size: 18px; max-width: 760px; }
.role-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.role-list > span { border: 1px solid var(--brown); border-radius: 99px; padding: 9px 14px; font: 500 12px/1 var(--sans); letter-spacing: .04em; color: var(--ink); }
.decisions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.decision { padding: 20px 0; border-bottom: 1px solid var(--line); }
.decision h4 { margin: 0 0 8px; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.decision p { font-size: 16px; margin: 0; }
.swatches { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.swatch { width: 64px; }
.swatch i { display: block; height: 64px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch small { display: block; margin-top: 6px; font: 500 10px/1.2 var(--sans); letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.specimen { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.specimen div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.specimen b { font-weight: 400; font-size: 26px; color: var(--ink); line-height: 1.1; }
.specimen small { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* galleries */
.gallery { max-width: 1440px; margin: 0 auto; padding: 4vh 0 2vh; }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 9vh 0 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.gallery-head h3 { margin: 0; font: 400 clamp(28px, 3.4vw, 48px)/1 var(--display); text-transform: uppercase; letter-spacing: -.04em; color: var(--ink); }
.gallery-head .label { color: var(--muted); }
figure.shot { margin: 0; }
figure.shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 640px; }
figure.shot figcaption b { color: var(--ink); font-weight: 600; }

.browser { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(35, 24, 21, .35); }
.browser .bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #EEE7C8; }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #D6CCA8; }
.browser .bar span { margin-left: 12px; font: 500 10px/1 var(--sans); color: var(--muted); letter-spacing: .02em; }
.browser img { width: 100%; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 18px; }
.span-2 { grid-column: span 2; }

.phones { display: flex; gap: 24px; overflow-x: auto; padding: 10px 2px 26px; scrollbar-width: thin; }
.phone {
  flex: 0 0 auto; width: clamp(180px, 19vw, 260px);
  border-radius: 34px; padding: 9px; background: #1A1210;
  box-shadow: 0 30px 50px -28px rgba(35, 24, 21, .5);
}
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.phone.app img { aspect-ratio: 786 / 1704; }
.phones figure { margin: 0; }
.phones figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); max-width: 240px; }

.paper { background: #E9E1B8; padding: clamp(18px, 4vw, 60px); display: grid; place-items: center; }
.paper img { box-shadow: 0 25px 45px -20px rgba(35, 24, 21, .45); background: #fff; }
.spread { display: grid; grid-template-columns: 1fr 1fr; max-width: 1100px; width: 100%; }
.spread img { width: 100%; }
.spread img:first-child { box-shadow: -14px 25px 45px -20px rgba(35,24,21,.45); }
.single img { max-height: 86vh; width: auto; }
.detail { overflow: hidden; aspect-ratio: 4 / 3; background: #fff; }
.detail img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 2.2)); transform-origin: var(--o, 30% 30%); }
.scroller { height: 80vh; overflow-y: auto; background: #fff; border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(35,24,21,.35); }
.scroller img { width: 100%; }
.ph-light { --ph: #E6DDAE; color: var(--brown); min-height: 320px; }
.ph-light b { color: var(--ink); }
.ph-light::before { border-color: rgba(35,24,21,.3); }

.scenarios { counter-reset: sc; margin: 0; padding: 0; list-style: none; }
.scenarios li { counter-increment: sc; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.scenarios li::before { content: "0" counter(sc); font: 400 22px/1.2 var(--serif); font-style: italic; color: var(--muted); }
.scenarios b { color: var(--ink); font-weight: 600; }

.summary { background: var(--cream); padding: 6vh var(--gutter) 16vh; }
.summary-inner { max-width: 1360px; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 7vh; display: grid; grid-template-columns: minmax(180px, 1fr) 2.2fr; gap: 32px; }
.summary-inner > .label { color: var(--muted); }
.summary-quote { margin: 0 0 30px; font: 400 clamp(30px, 3.8vw, 58px)/1.08 var(--serif); letter-spacing: -.02em; color: var(--ink); }
.outcomes { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.outcomes li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.outcomes li::before { content: "✓"; margin-right: 10px; color: var(--ink); }
.case-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }

.next { position: relative; display: block; background: var(--ink); color: var(--cream); padding: 16vh var(--gutter); overflow: hidden; text-align: center; }
.next .label { opacity: .6; }
.next h2 { margin: 18px 0 0; font: 400 clamp(52px, 11vw, 190px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.05em; position: relative; z-index: 2; transition: letter-spacing .8s var(--ease); }
.next:hover h2 { letter-spacing: -.03em; }
.next-img { position: absolute; left: 50%; top: 50%; width: min(440px, 60vw); aspect-ratio: 16 / 10.5; transform: translate(-50%, -50%) scale(.6) rotate(-4deg); opacity: 0; transition: transform .9s var(--ease), opacity .6s; z-index: 1; }
.next-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.next:hover .next-img { opacity: .9; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
.next p { position: relative; z-index: 2; margin: 22px auto 0; max-width: 520px; opacity: .7; }

.note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .big-title { white-space: normal; }
  .menu { grid-template-columns: 1fr; padding: 0 var(--gutter); }
  .menu nav { grid-column: 1; }
  .menu-btn { width: 56px; height: 56px; }
  .hero { height: 300vh; }
  .hero-line { font-size: clamp(96px, 30vw, 200px); }
  .hero-intro { display: none; }
  .hero-photo { width: calc(var(--w) * 2.3); height: calc(var(--h) * 2.3); }
  .hero-photo:nth-of-type(n+7) { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .works.stack .work-card { width: 88vw; }
  .works.stack { --step: 75vh; }
  .archive-wall { width: 220vw; grid-template-columns: repeat(4, 1fr); }
  .archive-col:nth-child(5) { display: none; }
  .svc-row, .svc-body { grid-template-columns: 1fr; gap: 10px; }
  .svc-body { max-height: none; opacity: 1; padding-bottom: 24px; }
  .svc-title { white-space: normal; }
  .svc-title .track > span:not(:first-child) { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head { gap: 8px; }
  .section-head .label { text-align: left; flex: none; margin: 0; }
  .services { padding-top: 80px; }
  .steps { grid-template-columns: repeat(5, 78vw); scroll-snap-type: x mandatory; }
  .step { scroll-snap-align: start; min-height: 260px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .block, .summary-inner { grid-template-columns: 1fr; gap: 14px; }
  .decisions, .outcomes { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: auto; }
  .spread { grid-template-columns: 1fr; }
  .single img { max-height: none; width: 100%; }
  .browser .bar { height: 22px; }
}
@media (max-width: 520px) {
  .lang button { padding: 8px 9px; }
  .header-right { gap: 8px; }
  .pill { height: 50px; padding: 0 20px; }
  .case-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .rv-img, .split-line > span { opacity: 1; transform: none; clip-path: none; }
}

/* case cover: desktop + phone mockup */
.mock { position: relative; padding: 0 clamp(40px, 9vw, 150px) clamp(30px, 5vw, 70px) 0; }
.mock.solo { padding: 0; }
.mock-phone { position: absolute; right: 0; bottom: 0; width: clamp(120px, 17vw, 250px); }
.mock-phone img { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 26px; width: 100%; }
@media (max-width: 900px) { .mock { padding: 0 0 40px 0; } .mock-phone { width: 30vw; right: -4px; bottom: 0; } }
.grid-3 .ph-light { min-height: 0; aspect-ratio: 16 / 9; }

/* ---------- 404 ---------- */
.not-found {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px;
  padding: 120px var(--gutter) 80px; background: var(--ink); color: var(--cream);
}
.not-found .label { color: var(--accent); }
.nf-title { margin: 0; max-width: 14ch; font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: 1.02; }
