/* World of Somnath — portfolio v2. Bengaluru street colour, Apple-grade motion. */
:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6d8;
  --ink: #17150f;
  --ink-2: #4a463d;
  --muted: #7a7466;
  --line: #d9d2c2;
  --yellow: #f5c400;
  --green: #1f8a4c;
  --red: #d9381e;
  --blue: #2340d9;
  --white: #fffdf7;
  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.label { font: 500 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.display { font-family: var(--display); font-stretch: 62%; font-weight: 850; letter-spacing: -.01em; line-height: .86; text-transform: uppercase; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }

/* ---------- Top bar (fixed: nothing can slide over it) ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 100; padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); transition: background .3s, color .3s, border-color .3s; }
.bar.dark { background: color-mix(in srgb, #0d0c0a 70%, transparent); color: #f4f1e8; border-color: rgba(255,255,255,.08); }
.bar .wrap { display: flex; align-items: center; gap: 14px; height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.logo .plate { font: 850 15px/1 var(--display); font-stretch: 70%; letter-spacing: .02em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 7px 9px 6px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--ink); }
.logo .sub { font: 400 12px var(--mono); opacity: .6; }
.bar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bar nav a { text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.bar nav a:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 500; text-decoration: none; border: 0; }
.pill.ink { background: var(--ink); color: var(--paper); }
.pill.yel { background: var(--yellow); color: var(--ink); }
.pill.line { box-shadow: inset 0 0 0 1.5px currentColor; background: transparent; }
.pill .arr { transition: transform .3s var(--ease); }
.pill:hover .arr { transform: translateX(4px); }
.bar.dark .pill.ink { background: var(--yellow); color: var(--ink); }
@media (max-width: 720px) { .logo .sub, .bar nav .hide-sm { display: none; } }
main { padding-top: calc(58px + env(safe-area-inset-top, 0px)); }

/* ---------- Street furniture ---------- */
.board { display: inline-block; background: var(--yellow); color: var(--ink); padding: .22em .38em .16em; border-radius: 4px; box-shadow: inset 0 0 0 3px var(--ink), 0 2px 0 rgba(0,0,0,.15); position: relative; }
.board::before, .board::after { content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .55; }
.board::before { left: 6px; } .board::after { right: 6px; }
.sticker { display: inline-flex; align-items: center; gap: 6px; background: var(--white); color: var(--ink); font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-radius: 6px; box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 var(--ink); transform: rotate(var(--r, -3deg)); white-space: nowrap; }
.sticker.y { background: var(--yellow); } .sticker.g { background: var(--green); color: #fff; } .sticker.r { background: var(--red); color: #fff; }
.tape { height: 18px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--ink) 18px 36px); }
.concept { display: inline-block; font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 5px 7px 4px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--ink); vertical-align: middle; }

/* ---------- Devices ---------- */
.phone { --w: 300px; width: var(--w); max-width: 100%; aspect-ratio: 9 / 19.5; border-radius: calc(var(--w) * .16); background: #0c0c0c; padding: calc(var(--w) * .035);
  box-shadow: 0 0 0 1.5px #3a3a3a inset, 0 0 0 3px #1b1b1b, 0 40px 80px -30px rgba(0,0,0,.55), 0 18px 30px -18px rgba(0,0,0,.4); position: relative; flex: none; }
.phone::after { content: ""; position: absolute; top: calc(var(--w) * .055); left: 50%; translate: -50% 0; width: 30%; height: calc(var(--w) * .085); background: #000; border-radius: 999px; z-index: 3; }
.phone .scr { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .125); overflow: hidden; background: #fff; isolation: isolate; }
.phone .scr > img, .phone .scr > video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .scr > .tall { position: absolute; inset: 0 0 auto 0; width: 100%; height: auto; object-fit: initial; will-change: transform; }
.phone.flat::after { display: none; }
.phone.contain .scr { background: #f2f2f2; } .phone.contain .scr > img { object-fit: contain; }
.browser { width: 100%; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 40px 90px -40px rgba(0,0,0,.5), 0 12px 30px -16px rgba(0,0,0,.25); }
.browser .chrome { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: #ecebe7; border-bottom: 1px solid #ddd9cf; }
.browser .chrome i { width: 11px; height: 11px; border-radius: 50%; background: #d4d0c6; } .browser .chrome i:nth-child(1) { background: #ff5f57; } .browser .chrome i:nth-child(2) { background: #febc2e; } .browser .chrome i:nth-child(3) { background: #28c840; }
.browser .chrome .url { margin-inline: auto; font: 400 12px var(--mono); color: #6b675e; background: #fff; padding: 4px 14px; border-radius: 6px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser .vp { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f7f7f7; }
.browser .vp > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.browser .vp > .tall { position: absolute; inset: 0 0 auto 0; height: auto; object-fit: initial; will-change: transform; }

/* ---------- Motion primitives ---------- */
.rv { opacity: 0; transform: translateY(40px) scale(.985); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.rv-l { opacity: 0; transform: translateX(-40px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.rv-l.in { opacity: 1; transform: none; }
.rv-zoom { opacity: 0; transform: scale(.88); transition: opacity 1.1s var(--ease), transform 1.4s var(--ease); }
.rv-zoom.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv, .rv-l, .rv-zoom { opacity: 1; transform: none; transition: none; } .marquee .track { animation: none !important; } }

/* ---------- Work page: hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 8vh, 96px) 0; overflow: hidden; }
.hero .top { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero h1 { font-size: clamp(64px, 15vw, 232px); margin-top: 22px; }
.hero h1 .board { font-size: .84em; transform: rotate(-1.4deg); }
.hero h1 .row { display: block; }
.hero h1 .row:nth-child(2) { padding-left: 6vw; }
.hero .intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; margin-top: 34px; align-items: end; }
.hero .intro p { font-size: clamp(18px, 1.9vw, 24px); line-height: 1.4; color: var(--ink-2); max-width: 34ch; }
.hero .intro p b { color: var(--ink); font-weight: 600; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .hero .intro { grid-template-columns: minmax(0, 1fr); } .hero .cta { justify-content: flex-start; } }
.marquee { margin-top: clamp(40px, 7vh, 80px); display: grid; gap: 14px; transform: rotate(-2.5deg); width: 110vw; margin-left: -5vw; }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: slide var(--t, 60s) linear infinite; }
.marquee .track.rev { animation-direction: reverse; }
.marquee:hover .track { animation-play-state: paused; }
.marquee figure { margin: 0; flex: none; height: clamp(150px, 20vw, 240px); aspect-ratio: var(--ar, .75); border-radius: 10px; overflow: hidden; background: var(--paper-2); box-shadow: 0 0 0 2px var(--ink); transform: rotate(var(--r, 0deg)); }
.marquee figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@keyframes slide { to { transform: translateX(-50%); } }
.clock { font: 500 12px var(--mono); }

/* ---------- Section headings ---------- */
.sec-h { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: clamp(64px, 10vh, 120px) 28px; }
.sec-h h2 { font-size: clamp(48px, 9vw, 128px); }
.sec-h p { max-width: 40ch; color: var(--ink-2); }

/* ---------- Case bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15vw, 210px); gap: 14px; }
.tile { --bg: #222; --fg: #fff; position: relative; grid-column: span var(--c, 4); grid-row: span var(--rw, 2); border-radius: 22px; overflow: hidden; background: var(--bg); color: var(--fg); text-decoration: none; isolation: isolate; transition: transform .6s var(--ease), box-shadow .6s var(--ease); box-shadow: 0 0 0 2px var(--ink); }
.tile:hover { transform: translateY(-4px) rotate(var(--hr, -.4deg)); box-shadow: 0 0 0 2px var(--ink), 8px 10px 0 var(--ink); }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 18px; display: flex; justify-content: space-between; align-items: end; gap: 12px; z-index: 5; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent) 40%, transparent); }
.tile .cap h3 { font-family: var(--display); font-stretch: 65%; font-weight: 850; text-transform: uppercase; font-size: clamp(26px, 2.8vw, 42px); line-height: .9; }
.tile .cap .k { font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.tile .num { position: absolute; top: 14px; left: 14px; z-index: 5; }
.tile .num .board { font: 850 16px/1 var(--display); font-stretch: 70%; }
.tile .tags { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.tile .art { position: absolute; inset: 0; z-index: 1; }
.tile .art > * { position: absolute; transition: transform .9s var(--ease); }
.tile:hover .art > * { transform: translate(var(--hx, 0), var(--hy, -10px)) rotate(var(--hrot, 0deg)) scale(var(--hs, 1.02)); }
.tile .art .phone { --w: 150px; }
.tile .art img.free { border-radius: 10px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.tile .go { width: 44px; height: 44px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; flex: none; transition: transform .4s var(--ease); }
.tile:hover .go { transform: rotate(-45deg); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 170px; } .tile { grid-column: span 6 !important; grid-row: span 3 !important; } }

/* ---------- Archive ---------- */
.filters { position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 50; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-block: 1.5px solid var(--ink); }
.filters .row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 12px; }
.filters .row::-webkit-scrollbar { display: none; }
.filters .row + .row { padding-top: 0; }
.chip { flex: none; display: inline-flex; align-items: baseline; gap: 7px; border: 0; background: var(--white); border-radius: 999px; padding: 8px 15px; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--ink); white-space: nowrap; }
.chip .n { font: 400 11px var(--mono); opacity: .55; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.row.types .chip { font-size: 13px; padding: 6px 12px; }
.row.types .chip[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.arch-group { padding-top: 40px; }
.arch-group > h3 { display: flex; align-items: baseline; gap: 14px; font-size: clamp(30px, 4vw, 54px); padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.arch-group > h3 .label { margin-left: auto; color: var(--muted); }
.arch-sub { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.arch-sub h4 { margin: 0; font-size: 16px; font-weight: 600; }
.arch-sub h4 .label { display: block; color: var(--muted); margin-top: 4px; }
@media (max-width: 820px) { .arch-sub { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 20px 14px; }
@media (max-width: 560px) { .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
.card { display: flex; flex-direction: column; gap: 8px; background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.card .th { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--paper-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 20%, transparent); }
.card .th img, .card .th video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s var(--ease), opacity .4s; }
.card .th.fit img { object-fit: contain; padding: 10%; }
.card .th.svg img { object-fit: contain; padding: 14%; background: #fff; }
.card .th video { opacity: 0; }
.card:hover .th img { transform: scale(1.05); }
.card.playing .th video { opacity: 1; }
.card .badge { position: absolute; left: 8px; bottom: 8px; z-index: 2; background: rgba(15,14,11,.8); color: #fff; font: 500 11px/1 var(--mono); padding: 6px 8px; border-radius: 4px; display: inline-flex; gap: 6px; align-items: center; }
.card .concept { position: absolute; top: 8px; left: 8px; z-index: 2; }
.card .t { font-weight: 500; font-size: 14.5px; line-height: 1.3; }
.card .p { font: 400 12px var(--mono); color: var(--muted); margin-top: -4px; }

/* ---------- Viewer dialog ---------- */
dialog.viewer { width: min(1100px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
dialog.viewer::backdrop { background: rgba(15, 14, 11, .7); backdrop-filter: blur(4px); }
@media (min-width: 900px) { dialog.viewer { height: calc(100dvh - 48px); margin-top: 24px; border-radius: 16px; box-shadow: 0 0 0 2px var(--ink); } }
.vw { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.vw-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px var(--gutter); border-bottom: 1.5px solid var(--ink); }
.vw-head .txt { flex: 1; min-width: 0; }
.vw-head h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; }
.vw-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.ib { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); display: grid; place-items: center; }
.ib:disabled { opacity: .3; }
.vw-body { overflow-y: auto; padding: 22px var(--gutter) 60px; overscroll-behavior: contain; }
.stack { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.stack figure { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stack img, .stack video { border-radius: 8px; max-height: 82dvh; width: auto; max-width: 100%; height: auto; background: var(--paper-2); }
.stack img.tallimg { max-height: none; width: min(100%, 480px); }
.stack figcaption { font: 400 12px var(--mono); color: var(--muted); }
.stack.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); align-items: start; }
.stack.gal img { width: 100%; max-height: none; }
body.lock { overflow: hidden; }

/* ---------- Contact / footer ---------- */
.contact { margin-top: clamp(80px, 12vh, 140px); background: var(--ink); color: var(--paper); border-radius: 28px 28px 0 0; padding-block: clamp(56px, 10vh, 110px) 40px; }
.contact h2 { font-size: clamp(54px, 10vw, 150px); }
.contact h2 .board { transform: rotate(-1.5deg); }
.contact .grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; margin-top: 40px; align-items: end; }
.contact .lines { display: grid; gap: 10px; font-size: clamp(18px, 2vw, 24px); }
.contact .lines a { text-decoration: none; border-bottom: 1.5px solid rgba(244,241,232,.25); }
.contact .lines a:hover { border-color: var(--yellow); }
.contact .copy { border: 0; background: none; color: var(--yellow); font: 400 12px var(--mono); margin-left: 10px; }
.contact .foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 20px; border-top: 1px solid rgba(244,241,232,.15); font-size: 13px; opacity: .7; }
@media (max-width: 720px) { .contact .grid { grid-template-columns: minmax(0, 1fr); } }

/* =================== CASE STUDY PAGES =================== */
.case { --bg: #111; --fg: #fff; --acc: var(--yellow); }
.c-hero { background: var(--bg); color: var(--fg); position: relative; overflow: hidden; min-height: calc(100svh - 58px); display: grid; grid-template-rows: auto 1fr; }
.c-hero .wrap { position: relative; z-index: 2; }
.c-hero .meta .sticker { white-space: normal; line-height: 1.3; max-width: 100%; }
.c-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: clamp(28px, 6vh, 64px); }
.c-hero h1 { font-size: clamp(64px, 13vw, 210px); margin-top: 18px; }
.c-hero .line { font-size: clamp(20px, 2.4vw, 32px); line-height: 1.25; max-width: 30ch; margin-top: 22px; opacity: .92; font-weight: 500; letter-spacing: -.01em; }
.c-hero .facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.c-hero .facts div { display: grid; gap: 2px; }
.c-hero .facts .label { opacity: .6; }
.c-hero .facts span:last-child { font-size: 15px; }
.c-hero .stage { position: relative; min-height: clamp(320px, 52vh, 620px); margin-top: 36px; }
.c-hero .stage > * { position: absolute; will-change: transform; }
.c-hero .glow { position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--acc) 55%, transparent), transparent 70%); filter: blur(40px); opacity: .55; z-index: 0; pointer-events: none; }

.c-sec { padding-block: clamp(72px, 14vh, 160px); }
.c-sec.dark { background: #0d0c0a; color: #f4f1e8; }
.c-sec.tint { background: color-mix(in srgb, var(--acc) 14%, var(--paper)); }
.c-sec.brand { background: var(--bg); color: var(--fg); }
.eyebrow { display: inline-block; margin-bottom: 18px; }
.c-h { font-family: var(--sans); font-weight: 700; letter-spacing: -.035em; font-size: clamp(36px, 5.4vw, 80px); line-height: 1.02; max-width: 18ch; }
.c-h.center { margin-inline: auto; text-align: center; }
.c-p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: color-mix(in srgb, currentColor 72%, transparent); max-width: 52ch; margin-top: 20px; }
.c-p.center { margin-inline: auto; text-align: center; }
.lede { text-align: center; }
.lede .c-h { margin-inline: auto; max-width: 20ch; }
.lede .c-p { margin-inline: auto; }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.trio > div { background: var(--white); color: var(--ink); border-radius: 20px; padding: 26px; box-shadow: 0 0 0 2px var(--ink); }
.trio .label { display: block; margin-bottom: 12px; color: var(--muted); }
.trio p { font-size: 16.5px; line-height: 1.5; }
@media (max-width: 860px) { .trio { grid-template-columns: minmax(0, 1fr); } }

/* scrollytelling */
.scrolly { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.scrolly .steps { display: grid; }
.scrolly .step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .6s var(--ease); }
.scrolly .step.on { opacity: 1; }
.scrolly .step .n { margin-bottom: 14px; }
.scrolly .step h3 { font-size: clamp(28px, 3.4vw, 48px); letter-spacing: -.03em; line-height: 1.04; font-weight: 700; }
.scrolly .step p { margin-top: 14px; font-size: 18px; color: color-mix(in srgb, currentColor 72%, transparent); max-width: 40ch; }
.scrolly .stage { position: sticky; top: calc(58px + 6vh); height: calc(88vh - 58px); display: grid; place-items: center; }
.scrolly .stage .layer { grid-area: 1 / 1; opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .7s var(--ease), transform .9s var(--ease); display: grid; place-items: center; width: 100%; height: 100%; }
.scrolly .stage .layer.on { opacity: 1; transform: none; }
.scrolly .stage .phone { --w: min(320px, 34vh); }
.scrolly .stage .browser { max-height: 100%; }
.scrolly.browserish { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
@media (max-width: 860px) {
  .scrolly, .scrolly.browserish { grid-template-columns: minmax(0, 1fr); }
  .scrolly .stage { position: sticky; top: calc(58px + 12px); height: 56vh; z-index: 1; order: -1; }
  .scrolly .stage .phone { --w: min(230px, 26vh); }
  .scrolly .step { min-height: 64vh; position: relative; z-index: 2; }
  .scrolly .step > div { background: color-mix(in srgb, var(--paper) 92%, transparent); padding: 18px; border-radius: 14px; box-shadow: 0 0 0 1.5px var(--ink); }
  .c-sec.dark .scrolly .step > div, .c-sec.brand .scrolly .step > div { background: color-mix(in srgb, #0d0c0a 90%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
}

/* before / after */
.ba-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: center; margin-top: 48px; }
.ba-wrap.flip { grid-template-columns: auto minmax(0, 1fr); }
.ba-wrap.flip .ba-copy { order: 2; }
@media (max-width: 860px) { .ba-wrap, .ba-wrap.flip { grid-template-columns: minmax(0, 1fr); justify-items: center; } .ba-wrap.flip .ba-copy { order: 0; } }
.ba { position: relative; --pos: 50%; user-select: none; touch-action: pan-y; }
.ba .phone { --w: min(340px, 78vw); }
.ba .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba .scr { position: relative; }
.ba .scr .after img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 6; }
.ba .handle::before { content: ""; position: absolute; inset: 0 -1.5px; background: var(--yellow); box-shadow: 0 0 0 1px var(--ink); }
.ba .handle span { position: absolute; top: 50%; left: 0; translate: -50% -50%; width: 46px; height: 46px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--ink), 0 8px 20px rgba(0,0,0,.35); display: grid; place-items: center; font: 700 14px var(--mono); color: var(--ink); }
.ba .tag { position: absolute; top: 14%; z-index: 5; }
.ba .tag.l { left: -10px; --r: -4deg; } .ba .tag.r { right: -10px; --r: 4deg; }
.ba input { position: absolute; inset: 0; opacity: 0; cursor: ew-resize; z-index: 7; width: 100%; height: 100%; margin: 0; }

/* rail */
.rail { display: flex; gap: clamp(16px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 40px var(--gutter) 30px; margin-top: 24px; scrollbar-width: none; cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.drag { cursor: grabbing; scroll-snap-type: none; }
.rail > figure { margin: 0; scroll-snap-align: center; flex: none; display: grid; gap: 12px; justify-items: center; }
.rail > figure figcaption { font: 400 12px var(--mono); opacity: .7; max-width: 28ch; text-align: center; }
.rail .phone { --w: clamp(200px, 22vw, 270px); }
.rail .sq { width: clamp(220px, 26vw, 340px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.rail .sq img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.rail .sq.cover img { object-fit: cover; padding: 0; }
.rail .card45 { width: clamp(240px, 28vw, 360px); aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px -24px rgba(0,0,0,.5); }
.rail .card45 img { width: 100%; height: 100%; object-fit: cover; }
.rail .win { width: clamp(300px, 46vw, 680px); }
.rail img { -webkit-user-drag: none; user-select: none; }
.rail-hint { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.rail-nav { display: flex; gap: 8px; }

/* films */
.films { display: flex; gap: clamp(16px, 2.4vw, 32px); justify-content: center; flex-wrap: wrap; margin-top: 56px; }
.films figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.films figcaption { font: 400 12px var(--mono); opacity: .75; text-align: center; max-width: 26ch; }
.films .phone { --w: clamp(200px, 21vw, 270px); }
.films .phone .scr { background: #000; }
.wide { margin-top: 56px; border-radius: 22px; overflow: hidden; background: #000; position: relative; box-shadow: 0 50px 100px -40px rgba(0,0,0,.6); }
.wide video { width: 100%; height: auto; }
.snd { position: absolute; right: 14px; bottom: 14px; z-index: 4; background: rgba(15,14,11,.75); color: #fff; border: 0; border-radius: 999px; padding: 9px 14px; font: 500 12px var(--mono); backdrop-filter: blur(6px); display: inline-flex; gap: 8px; align-items: center; }
.phone .snd { right: 50%; translate: 50% 0; bottom: 18px; }

/* tall browser */
.tallsec .browser .vp { aspect-ratio: 16 / 10; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 60px); align-items: center; margin-top: 56px; }
.duo .phone { --w: clamp(220px, 22vw, 300px); }
@media (max-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr); justify-items: center; } }

/* switcher */
.sw { --brand: #234a87; margin-top: 48px; border-radius: 28px; background: color-mix(in srgb, var(--brand) 12%, #fff); box-shadow: 0 0 0 2px var(--ink); padding: clamp(18px, 3vw, 36px); transition: background .6s var(--ease); }
.sw .brands { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sw .brands button { border: 0; border-radius: 999px; padding: 10px 16px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.sw .brands button i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px rgba(0,0,0,.2); }
.sw .brands button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sw .stage { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .9fr); gap: clamp(16px, 3vw, 40px); align-items: center; margin-top: 30px; }
.sw .col { display: grid; gap: 10px; justify-items: center; }
.sw .col .label { opacity: .65; }
.sw .swap { position: relative; width: 100%; display: grid; place-items: center; }
.sw .swap img { grid-area: 1 / 1; transition: opacity .5s var(--ease), transform .7s var(--ease); }
.sw .swap img.out { opacity: 0; transform: translateY(16px) scale(.97); }
.sw .popup img { max-height: 460px; width: auto; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); }
.sw .widget img { width: 100%; border-radius: 8px; box-shadow: 0 16px 30px -18px rgba(0,0,0,.5); background: #fff; }
.sw .pdp .phone { --w: min(250px, 60vw); }
.sw .note { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 22px; }
@media (max-width: 900px) { .sw .stage { grid-template-columns: minmax(0, 1fr); } .sw .popup img { max-height: 380px; } }

/* facts */
.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin-top: 48px; }
.factgrid > div { border-radius: 18px; padding: 22px; background: var(--white); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); display: grid; gap: 8px; align-content: start; }
.factgrid b { font-family: var(--display); font-stretch: 62%; font-weight: 850; font-size: clamp(44px, 5vw, 68px); line-height: .85; letter-spacing: -.01em; }
.factgrid span { font-size: 14px; color: var(--ink-2); }

/* gallery */
.gal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
.gal figure { margin: 0; grid-column: span var(--s, 4); display: grid; gap: 8px; align-content: start; }
.gal figure .im { border-radius: 16px; overflow: hidden; background: var(--paper-2); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ink) 25%, transparent); }
.gal figure img { width: 100%; height: auto; }
.gal figure.contain .im { background: #fff; display: grid; place-items: center; aspect-ratio: 1; }
.gal figure.contain img { width: 70%; }
.gal figcaption { font: 400 12px var(--mono); opacity: .7; }
@media (max-width: 760px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gal figure { grid-column: span 1; } .gal figure.full { grid-column: span 2; } }

/* flip cards (MokshaVastra) */
.flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 18px; margin-top: 48px; }
@media (max-width: 560px) { .flips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .flip .nm { font-size: 13px; } }
.flip { perspective: 1000px; background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 10px; }
.flip .in3d { position: relative; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.flip:hover .in3d, .flip.on .in3d { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--acc) 30%, #1b1916), #0d0c0a); box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.flip .face img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 20px 22px rgba(0,0,0,.5)); }
.flip .face.back { transform: rotateY(180deg); }
.flip .nm { font: 600 15px var(--sans); color: #f4f1e8; }
.flip .nm span { display: block; font: 400 11px var(--mono); opacity: .6; letter-spacing: .08em; text-transform: uppercase; }

/* compare table */
.cmp { margin-top: 48px; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 2px var(--ink); background: var(--white); }
.cmp-scroll { overflow-x: auto; }
.cmp table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.cmp thead th { font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--paper); }
.cmp tbody th { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); width: 18%; }
.cmp tr:last-child td, .cmp tr:last-child th { border-bottom: 0; }

/* flow steps */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-top: 48px; counter-reset: f; }
.flow > div { position: relative; border-radius: 18px; padding: 22px 18px; background: color-mix(in srgb, var(--acc) 16%, #fff); box-shadow: 0 0 0 2px var(--ink); color: var(--ink); }
.flow > div::before { counter-increment: f; content: "0" counter(f); font: 600 12px var(--mono); display: block; margin-bottom: 30px; }
.flow h4 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.flow p { font-size: 14px; color: var(--ink-2); }

/* quote */
.quote { font-family: var(--sans); font-weight: 600; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.08; letter-spacing: -.035em; max-width: 22ch; margin-inline: auto; text-align: center; }
.quote::before { content: "“"; display: block; font-family: var(--display); font-size: 2em; line-height: .6; color: var(--acc); }
.quote-by { text-align: center; margin-top: 20px; opacity: .65; }

/* youtube */
.yt { margin-top: 48px; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px var(--ink), 0 40px 90px -40px rgba(0,0,0,.6); }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }

/* links */
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.c-hero .links .pill.line { color: var(--fg); }

/* next case */
.next { display: block; text-decoration: none; background: var(--ink); color: var(--paper); padding-block: clamp(60px, 12vh, 120px); }
.next .label { opacity: .6; }
.next h2 { font-size: clamp(56px, 11vw, 170px); margin-top: 14px; transition: letter-spacing .6s var(--ease); }
.next:hover h2 { letter-spacing: .02em; }
.next .row { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.note-s { font: 400 12px var(--mono); opacity: .6; margin-top: 18px; }
