/* Layout: quiet frame, loud work. A Cosmos-style masonry wall of every piece,
   a Best work rail above it, case studies slide over as a sheet.
   Every value below is a token; site.js overwrites them from content/site.json. */
:root {
  --bg: #EEEFEC;
  --fg: #16171A;
  --muted: #62666D;
  --line: #D5D7D2;
  --tile: #E1E3DE;
  --accent: #C8006E;

  --f-display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-te: "Noto Sans Telugu", "Kohinoor Telugu", "Telugu Sangam MN", sans-serif;

  --title-scale: 1;
  --gap: 10px;
  --radius: 6px;
  --top-h: 56px;
  --ease: cubic-bezier(.2, .75, .1, 1);
  color-scheme: light;
}
html[data-resolved="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
html.locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: background-color .3s ease, color .3s ease;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 30; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1600px; margin-inline: auto; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; font-variation-settings: "wdth" 85; color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; text-wrap: balance; margin: 0; line-height: 1.02; }
h2 { font-size: calc(clamp(22px, 2.4vw, 32px) * var(--title-scale)); font-variation-settings: "wdth" 90; letter-spacing: -.01em; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top-in { max-width: 1600px; margin: 0 auto; height: var(--top-h); display: flex; align-items: center; gap: 20px; }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 17px; text-decoration: none; font-variation-settings: "wdth" 100; white-space: nowrap; transition: font-variation-settings .4s var(--ease); }
.brand:hover { font-variation-settings: "wdth" 130; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--fg); }
.tune-btn { border: 1px solid var(--line); background: var(--fg); color: var(--bg); padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap; }
@media (max-width: 560px) { .nav { display: none; } .tune-btn { margin-left: auto; } }

/* ---------- intro ---------- */
.intro { padding-block: clamp(40px, 8vw, 96px) clamp(28px, 4vw, 48px); }
.headline {
  font-size: calc(clamp(34px, 5.6vw, 84px) * var(--title-scale));
  font-variation-settings: "wdth" 82; font-weight: 750; letter-spacing: -.02em; max-width: 18ch;
}
.lede { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); margin: 18px 0 0; max-width: 52ch; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.jump button {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px 6px 14px;
  cursor: pointer; font-size: 14px; display: inline-flex; gap: 8px; align-items: baseline; transition: border-color .2s, background .2s;
}
.jump button:hover { border-color: var(--fg); }
.jump button span { font-family: var(--f-mono); font-size: 10px; color: var(--muted); }

/* ---------- best work rail ---------- */
.best { padding-block: 16px 56px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rail-nav { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer;
  display: inline-grid; place-items: center; font-size: 15px; transition: background .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--fg); }
.rail {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))) calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px));
  cursor: grab; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail.drag { cursor: grabbing; scroll-snap-type: none; }
.rail.drag * { pointer-events: none; }
.card {
  flex: 0 0 clamp(270px, 46vw, 720px); scroll-snap-align: start; border: 0; padding: 0; background: none; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
}
.card .m { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--tile); position: relative; }
.card .m > img, .card .m > video { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .m > img, .card:hover .m > video { transform: scale(1.04); }
.card .num { position: absolute; top: 12px; left: 12px; background: var(--bg); color: var(--fg); padding: 3px 8px; border-radius: 999px; }
.card .t { font-family: var(--f-display); font-weight: 700; font-size: calc(clamp(20px, 2vw, 28px) * var(--title-scale)); font-variation-settings: "wdth" 85; transition: font-variation-settings .5s var(--ease); line-height: 1.05; }
.card:hover .t { font-variation-settings: "wdth" 115; }
.card .o { color: var(--muted); font-size: 15px; max-width: 46ch; margin-top: -6px; }

/* ---------- wall ---------- */
.wall-sec { padding-block: 24px 72px; }
.wall-bar {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 12px; margin-bottom: 8px;
  background: var(--bg);
}
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer;
  font-size: 13px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip span { opacity: .55; margin-left: 4px; font-size: 11px; }

.wall { position: relative; min-height: 200px; transition: height .7s var(--ease); }
.tile {
  position: absolute; top: 0; left: 0; margin: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  transition: transform .75s var(--ease), width .75s var(--ease), opacity .45s ease;
}
.wall:not(.ready) .tile { transition: none; }
.tile.out { opacity: 0; pointer-events: none; }
.tile .m { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tile); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-radius .3s; }
.tile .m > img, .tile .m > video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .5s; }
.tile .m > img { opacity: 0; }
.tile .m > img.ok { opacity: 1; }
.wall.h-lift .tile:hover .m { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgb(0 0 0 / .45); }
.wall.h-zoom .tile:hover .m > img, .wall.h-zoom .tile:hover .m > video { transform: scale(1.06); }
.cap { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.3; }
.cap b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cap i { font-style: normal; font-family: var(--f-mono); font-size: 10px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.wall.c-below .cap { padding: 8px 2px 0; height: 30px; }
.wall.c-hover .cap, .wall.c-off .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 9px; border-radius: 0 0 var(--radius) var(--radius); color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / .62)); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.wall.c-hover .cap i { color: rgb(255 255 255 / .75); }
.wall.c-hover .tile:hover .cap, .wall.c-hover .tile:focus-visible .cap { opacity: 1; transform: none; }
.wall.c-off .cap { display: none; }
.wall.h-lift.c-hover .tile:hover .cap { transform: translateY(-4px); }
.wall .kind { position: absolute; top: 8px; right: 8px; font-family: var(--f-mono); font-size: 9px; letter-spacing: .06em; background: rgb(0 0 0 / .5); color: #fff; padding: 2px 6px; border-radius: 999px; }

/* live text tiles */
.tt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 8%; gap: 2px; container-type: inline-size; }
.tt .te { font-family: var(--f-te); font-size: clamp(22px, 19cqw, 220px); line-height: 1.3; transition: opacity .25s; text-wrap: balance; }
.tt .sub { font-family: var(--f-body); font-weight: 600; font-size: clamp(11px, 5.5cqw, 40px); opacity: .85; }
.tt .fname { position: absolute; left: 10px; bottom: 8px; font-family: var(--f-mono); font-size: 9px; opacity: .7; }

/* ---------- about ---------- */
.about { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; margin-top: 18px; }
.about-text { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.45; margin: 0; max-width: 34ch; }
.label { margin: 0 0 8px; text-transform: uppercase; }
.skills { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.skills li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.contact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.email { user-select: all; font-size: 16px; word-break: break-all; }
.about-links { display: flex; gap: 14px; }
.about-links a { color: var(--accent); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot { padding-block: 24px 40px; }

.small-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.small-btn:hover { border-color: var(--fg); }
.small-btn.solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- case study ---------- */
.case {
  position: fixed; inset: 0; z-index: 40;
  --c-bg: var(--bg); --c-fg: var(--fg); --c-muted: var(--muted); --c-line: var(--line); --c-accent: var(--accent); --c-display: var(--f-display); --c-weight: 700;
  color: var(--c-fg);
}
.case-bg { position: absolute; inset: 0; background: var(--c-bg); }
.case-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.case-bar {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); max-width: 1240px; margin: 0 auto;
}
.case-bar::before { content: ""; position: absolute; inset: 0 -100vw; background: color-mix(in srgb, var(--c-bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: -1; border-bottom: 1px solid color-mix(in srgb, var(--c-line) 60%, transparent); }
.back-btn { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 6px 0; white-space: nowrap; }
.back-btn:hover { color: var(--c-accent); }
.case-bar-title { font-family: var(--c-display); font-weight: var(--c-weight); font-size: 16px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; text-align: center; }
.case-bar-title.on { opacity: 1; transform: none; }
.case-nav { display: flex; gap: 6px; }
.case .icon-btn { border-color: var(--c-line); }
.case .icon-btn:hover { border-color: var(--c-fg); }
.case-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-accent); transform-origin: left; transform: scaleX(0); }

.case-body { max-width: 1240px; margin: 0 auto; padding-block: 24px 0; }
.ch { display: grid; gap: 28px 48px; align-items: start; margin-bottom: clamp(48px, 7vw, 96px); }
.ch.split { grid-template-columns: auto minmax(0, 1fr); }
.ch-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tile); transform-origin: top left; max-width: 100%; }
.ch.split .ch-media { width: min(46vw, calc(78vh * var(--arn))); }
.ch.stack .ch-media { width: min(100%, calc(70vh * var(--arn))); }
.ch-media > img, .ch-media > video { width: 100%; height: 100%; object-fit: cover; }
.ch-meta { min-width: 0; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; color: var(--c-muted); margin: 0 0 14px; text-transform: uppercase; }
.ch h1 { font-family: var(--c-display); font-weight: var(--c-weight); font-size: calc(clamp(40px, 6.4vw, 96px) * var(--title-scale)); letter-spacing: -.02em; font-variation-settings: "wdth" 80; }
.ch .one { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; margin: 18px 0 28px; max-width: 40ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 0 0 24px; border-top: 1px solid var(--c-line); padding-top: 16px; }
.facts dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { text-decoration: none; border: 1px solid var(--c-fg); border-radius: 999px; padding: 7px 14px; font-size: 14px; transition: background .2s, color .2s; }
.links a:hover { background: var(--c-fg); color: var(--c-bg); }
@media (max-width: 760px) {
  .ch.split { grid-template-columns: 1fr; }
  .ch.split .ch-media { width: min(100%, calc(64vh * var(--arn))); }
}

/* entrance: hero media morphs from the tile, everything else rises in */
.case.entering .case-bg { animation: fadeIn .45s ease both; }
.case.entering .case-bar, .case.entering .ch-meta, .case.entering .blocks, .case.entering .next { animation: rise .7s var(--ease) both; }
.case.entering .ch-meta { animation-delay: .18s; }
.case.entering .blocks { animation-delay: .28s; }
.case.leaving .case-bg { animation: fadeIn .4s ease reverse both; }
.case.leaving .case-bar, .case.leaving .ch-meta, .case.leaving .blocks, .case.leaving .next { animation: fadeIn .2s ease reverse both; }
.case.swap .case-body { animation: rise .55s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* blocks */
.blocks { display: grid; gap: clamp(48px, 7vw, 96px); }
.blk.rv { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .9s var(--ease); }
.blk.rv.in { opacity: 1; transform: none; }
.b-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 48px; }
.b-text h3 { font-family: var(--c-display); font-weight: var(--c-weight); font-size: calc(clamp(22px, 2.2vw, 32px) * var(--title-scale)); font-variation-settings: "wdth" 88; }
.b-text p { margin: 0; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.6; max-width: 62ch; }
@media (max-width: 760px) { .b-text { grid-template-columns: 1fr; } }
figure { margin: 0; }
figcaption { font-size: 13px; color: var(--c-muted); margin-top: 10px; }
.b-image .frame { border-radius: var(--radius); overflow: hidden; background: var(--tile); margin-inline: auto; width: min(100%, calc(82vh * var(--arn))); }
.b-image img, .b-video video { width: 100%; height: 100%; object-fit: cover; }
.b-video .frame { border-radius: var(--radius); overflow: hidden; background: #000; }
.b-quote { font-family: var(--c-display); font-weight: var(--c-weight); font-size: calc(clamp(26px, 3.4vw, 52px) * var(--title-scale)); line-height: 1.12; letter-spacing: -.01em; max-width: 26ch; margin: 0; text-wrap: balance; }
.b-quote::before { content: "\201C"; color: var(--c-accent); }
.b-quote::after { content: "\201D"; color: var(--c-accent); }
.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; border-top: 1px solid var(--c-line); padding-top: 20px; }
.b-stats .n { font-family: var(--c-display); font-size: calc(clamp(44px, 6vw, 88px) * var(--title-scale)); font-weight: var(--c-weight); line-height: 1; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 75; }
.b-stats .l { color: var(--c-muted); font-size: 14px; margin-top: 8px; max-width: 24ch; }

.b-gallery .strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; cursor: grab; }
.b-gallery .strip.drag { cursor: grabbing; scroll-snap-type: none; }
.b-gallery .strip.drag * { pointer-events: none; }
.b-gallery figure { flex: 0 0 auto; height: clamp(260px, 62vh, 620px); scroll-snap-align: start; }
.b-gallery .frame { height: calc(100% - 28px); aspect-ratio: var(--ar); border-radius: var(--radius); overflow: hidden; background: var(--tile); }
.b-gallery img { width: 100%; height: 100%; object-fit: cover; }
.b-gallery figcaption { margin-top: 8px; }

.b-compare .cmp { position: relative; margin-inline: auto; width: min(100%, calc(76vh * var(--arn))); aspect-ratio: var(--ar); border-radius: var(--radius); overflow: hidden; touch-action: pan-y; cursor: ew-resize; user-select: none; --x: 50%; }
.b-compare .cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.b-compare .cmp .a { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.b-compare .handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }
.b-compare .knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 20px; letter-spacing: 2px; line-height: 1; box-shadow: 0 4px 16px rgb(0 0 0 / .25); border: 0; cursor: ew-resize; }
.b-compare .tag { position: absolute; top: 12px; font-family: var(--f-mono); font-size: 10px; background: rgb(0 0 0 / .55); color: #fff; padding: 3px 8px; border-radius: 999px; }
.b-compare .tag.l { left: 12px; } .b-compare .tag.r { right: 12px; }
.b-compare figcaption { text-align: center; }

.b-switcher .sw { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.b-switcher .stage { position: relative; aspect-ratio: var(--ar); border-radius: var(--radius); overflow: hidden; background: var(--tile); }
.b-switcher .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.b-switcher .opts { display: flex; flex-direction: column; gap: 4px; }
.b-switcher .opts button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--c-muted); transition: color .2s, background .2s; }
.b-switcher .opts button[aria-pressed="true"] { color: var(--c-fg); background: color-mix(in srgb, var(--c-fg) 8%, transparent); }
@media (max-width: 760px) { .b-switcher .sw { grid-template-columns: 1fr; } .b-switcher .opts { flex-direction: row; flex-wrap: wrap; } }

.b-tester .tst { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.b-tester .ctl { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--c-line); }
.b-tester .ctl .fonts { display: flex; flex-wrap: wrap; gap: 6px; }
.b-tester .ctl button { border: 1px solid var(--c-line); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.b-tester .ctl button[aria-pressed="true"] { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
.b-tester .ctl label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-muted); margin-left: auto; }
.b-tester .txt { padding: 24px 18px 32px; font-family: var(--f-te); font-size: 72px; line-height: 1.5; outline: none; min-height: 1.6em; overflow-wrap: anywhere; }
.b-tester .txt:focus-visible { background: color-mix(in srgb, var(--c-accent) 5%, transparent); }

.b-figma .ph { border: 1.5px dashed var(--c-line); border-radius: var(--radius); aspect-ratio: 16 / 9; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; color: var(--c-muted); }
.b-figma .ph strong { color: var(--c-fg); font-family: var(--c-display); font-size: 22px; }
.b-figma iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: var(--tile); }

.next { margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--c-line); padding-block: 28px 64px; }
.next button { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 6px; width: 100%; }
.next .t { font-family: var(--c-display); font-weight: var(--c-weight); font-size: calc(clamp(40px, 8vw, 128px) * var(--title-scale)); line-height: 1; letter-spacing: -.02em; font-variation-settings: "wdth" 75; transition: font-variation-settings .7s var(--ease), color .3s; }
.next .o { color: var(--c-muted); font-size: 15px; }
.next button:hover .t { font-variation-settings: "wdth" 120; color: var(--c-accent); }

/* ---------- customize panel ---------- */
.tune {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(340px, 100vw);
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgb(0 0 0 / .3);
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px);
  animation: slideIn .35s var(--ease);
}
@keyframes slideIn { from { transform: translateX(100%); } }
.tune-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tune-body { overflow-y: auto; padding: 8px 16px 32px; }
.tune fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 14px 0; display: grid; gap: 8px; }
.tune legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.tune legend + * { clear: both; }
.tune label, .tune .lbl { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.tune label.check { justify-content: flex-start; gap: 8px; color: var(--fg); font-size: 14px; align-items: center; }
.tune select, .tune input[type="text"], .tune textarea { width: 100%; border: 1px solid var(--line); background: var(--tile); border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.tune textarea { font-family: var(--f-mono); font-size: 10px; resize: vertical; }
.tune input[type="range"] { width: 100%; accent-color: var(--accent); }
.tune .row { display: flex; gap: 6px; align-items: center; }
.tune .row input { flex: 1; min-width: 0; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 5px 6px; font-size: 12px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatches label { flex-direction: column; gap: 4px; align-items: stretch; }
.swatches input[type="color"] { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: none; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.45; }

/* edit-text mode */
body.editing [data-edit] { outline: 1.5px dashed var(--accent); outline-offset: 4px; border-radius: 2px; cursor: text; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity .25s, transform .35s var(--ease); z-index: 80; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .blk.rv { opacity: 1; transform: none; }
}
