/* Akram Atmani — portfolio.
   Tokens, type scale and interaction timings follow the Kynora family (hamzawahbi.com). */
:root {
  --ivory: #f0ece2;
  --secondary: #e7e2d6;
  --ink: #0c0c0c;
  --vermillion: #e5452b;
  --fg: var(--ink);
  --bg: var(--ivory);
  --font: "Archivo", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
:root, .contact, .site-footer, .panel.dark {
  --fg-70: color-mix(in srgb, var(--fg) 70%, transparent);
  --fg-60: color-mix(in srgb, var(--fg) 60%, transparent);
  --fg-50: color-mix(in srgb, var(--fg) 50%, transparent);
  --fg-40: color-mix(in srgb, var(--fg) 40%, transparent);
  --fg-25: color-mix(in srgb, var(--fg) 25%, transparent);
  --fg-10: color-mix(in srgb, var(--fg) 10%, transparent);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
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; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.label { letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.v { color: var(--vermillion); }
.container { max-width: 1024px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 767px) { .container { padding: 0 24px; } }
:focus-visible { outline: 2px solid var(--vermillion); outline-offset: 3px; }

/* ── Header ───────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; font-size: 14px; }
.wordmark { font-size: 20px; font-weight: 700; letter-spacing: -.025em; line-height: 1; text-transform: none; white-space: nowrap; }
.site-header .grow { flex: 1; }
.site-header nav { display: flex; gap: 32px; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-header .grow2 { flex-grow: 1; transition: flex-grow .3s; }
.site-header .loc { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; color: var(--fg-70); max-width: 12rem; transition: all .3s; }
.site-header .loc::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); }
.site-header.scrolled .grow2 { flex-grow: 0; }
.site-header.scrolled .loc { opacity: 0; max-width: 0; }
@media (max-width: 767px) {
  .site-header .bar { padding-top: 16px; padding-bottom: 16px; font-size: 12px; }
  .wordmark { font-size: 18px; }
  .site-header nav, .site-header .grow2 { display: none; }
  .site-header .loc { font-size: 11px; }
  .site-header.scrolled .loc { opacity: 1; max-width: 12rem; }
}

/* ── Reveal (opacity 0, y 8 → in view, .5s easeOut) ── */
.r { opacity: 0; transform: translateY(var(--ry, 8px)); transition: opacity .5s ease-out var(--rd, 0s), transform .5s ease-out var(--rd, 0s); }
.r.in { opacity: 1; transform: none; }

/* ── Hero ─────────────────────────────────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 80px 0 32px; }
.avatar { width: 208px; height: 208px; border-radius: 50%; overflow: hidden; background: #fd9862; display: grid; place-items: center; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .mono { font-size: 76px; font-weight: 800; letter-spacing: -.05em; color: var(--ivory); }
.avatar::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .25; mix-blend-mode: overlay; }
.hero h1 { margin: 36px auto 0; padding-bottom: 4px; font-weight: 700; line-height: 1.05; letter-spacing: -.025em; }
.hero h1 .l1 { display: block; font-size: 96px; }
.hero h1 .role { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--fg-50); font-size: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 .role img { width: 96px; opacity: .5; }
.hero h1 .l2 { margin-top: 28px; display: block; font-size: 36px; font-weight: 500; font-style: italic; letter-spacing: -.02em; }
.socials { margin-top: 28px; display: flex; gap: 24px; justify-content: center; }
.socials a { color: var(--fg-40); transition: color .15s; }
.socials a:hover { color: var(--vermillion); }
.socials svg { width: 20px; height: 20px; }
.summary { margin: 24px auto 0; max-width: 36rem; font-size: 16px; line-height: 1.625; color: var(--fg-70); }
.scroll-btn { margin: 40px auto 0; display: block; padding: 8px; color: var(--fg-50); transition: color .15s; }
.scroll-btn:hover { color: var(--fg); }
.scroll-btn svg { width: 24px; height: 24px; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(5px); } }
@media (max-width: 767px) {
  .hero { padding-top: 48px; }
  .avatar { width: 160px; height: 160px; }
  .avatar .mono { font-size: 58px; }
  .hero h1 { margin-top: 32px; }
  .hero h1 .l1 { font-size: 44px; }
  .hero h1 .role { font-size: 11px; gap: 8px; margin-top: 12px; }
  .hero h1 .role img { width: 64px; }
  .hero h1 .l2 { font-size: 4.1vw; margin-top: 24px; }
  .summary { font-size: 14px; }
}

/* ── Screens ribbon (replaces the logo strip) ── */
.ribbon-wrap { margin-top: 64px; }
.ribbon-label { text-align: center; color: var(--vermillion); font-size: 14px; margin-bottom: 40px; }
.ribbon { position: relative; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; padding: 12px 0 28px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
.ribbon-track { display: flex; align-items: flex-end; gap: 28px; width: max-content; padding: 0 14px; animation: marquee 80s linear infinite; will-change: transform; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ribbon figure { margin: 0; flex: none; position: relative; transition: transform .5s var(--ease); }
.ribbon figure:hover { transform: translateY(-8px) rotate(0deg) !important; }
.ribbon .d { width: 420px; aspect-ratio: 16/10; background: var(--bg); box-shadow: 8px 8px 0 var(--fg); overflow: hidden; }
.ribbon .d img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.ribbon .p { width: 150px; }
.ribbon .f { width: 300px; border-radius: 10px; overflow: hidden; box-shadow: 8px 8px 0 var(--fg); background: #fff; }
.ribbon figcaption { position: absolute; left: 0; bottom: -22px; font-size: 10px; color: var(--fg-50); white-space: nowrap; }
@media (max-width: 767px) { .ribbon .d { width: 280px; } .ribbon .p { width: 110px; } .ribbon .f { width: 210px; } .ribbon-wrap { margin-top: 48px; } }

/* ── Phone frame ─────────────────────────── */
.phone { container-type: inline-size; }
.phone .bezel { border-radius: 16cqw; background: #000; padding: 3cqw; box-shadow: 0 2cqw 5cqw -1cqw rgba(2,6,23,.45); }
.phone .screen { position: relative; overflow: hidden; border-radius: 13cqw; aspect-ratio: 1206/2622; background: #1a1513; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ── Sections ─────────────────────────────── */
.section { margin-top: 144px; scroll-margin-top: 96px; }
.sec-label { display: flex; align-items: center; gap: 12px; min-height: 28px; margin-bottom: 48px; font-size: 14px; }
.sec-label .sq { display: inline-block; width: 12px; height: 12px; background: var(--vermillion); animation: sq 4s ease-in-out infinite; }
@keyframes sq { 0% { transform: rotate(0); } 33%, 66% { transform: rotate(90deg); } 100% { transform: rotate(0); } }
.counter { display: inline-block; line-height: 1; transition: font-size .12s var(--ease); }
@media (max-width: 767px) { .section { margin-top: 96px; } .sec-label { font-size: 12px; margin-bottom: 32px; min-height: 24px; } }

/* ── Case cards ───────────────────────────── */
.card { display: block; }
.stage { position: relative; overflow: hidden; background: var(--secondary); isolation: isolate; }
.stage .bd { position: absolute; inset: 0; opacity: .5; z-index: -1; }
.stage .bd::before { content: ""; position: absolute; inset: 0; opacity: .9; background-image:
  radial-gradient(130% 100% at 12% 8%, color-mix(in srgb, var(--hue, var(--vermillion)) 34%, transparent), transparent 62%),
  radial-gradient(130% 130% at 92% 96%, color-mix(in srgb, var(--ink) 22%, transparent), transparent 62%); }
.stage .bd::after { content: ""; position: absolute; inset: 0; opacity: .6; mix-blend-mode: overlay; background-image: var(--grain); }
.stage .mono { position: absolute; inset: 0; display: grid; place-items: center; z-index: -1; font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--fg-10); font-size: 9vw; user-select: none; }
.stage .tl, .stage .br { position: absolute; z-index: 3; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.stage .tl { left: 12px; top: 12px; display: flex; align-items: center; gap: 8px; color: var(--fg-70); }
.stage .tl::before { content: ""; width: 8px; height: 8px; background: var(--fg); }
.stage .br { right: 12px; bottom: 12px; color: var(--fg-50); }
.stage .lock { position: absolute; z-index: 3; right: 12px; top: 12px; display: flex; align-items: center; gap: 6px; background: var(--fg); color: var(--bg); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; }
.stage .lock svg { width: 11px; height: 11px; }
.lead .stage { aspect-ratio: 16/7; display: flex; align-items: center; justify-content: center; padding: 64px; }
.frame { background: var(--bg); box-shadow: 10px 10px 0 var(--fg); transform: rotate(-2deg); transition: transform .5s var(--ease); width: 100%; max-width: 42rem; }
.frame img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; }
.card:hover .frame, .card[data-active] .frame { transform: rotate(0); }
.lead .stage .frame.side { position: absolute; width: 34%; max-width: none; right: 7%; top: 58%; transform: rotate(3deg); transition-delay: .05s; }
.card:hover .frame.side, .card[data-active] .frame.side { transform: rotate(0) translateY(-6px); }
.lead .stage .frame.main { margin-right: 18%; }
/* phones fan */
.fan { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.fan .phone { position: absolute; width: 17%; transform-origin: 50% 110%; transition: transform .6s var(--ease); }
.fan .phone:nth-child(1) { transform: translateX(-120%) rotate(-12deg); }
.fan .phone:nth-child(2) { transform: translateX(-60%) rotate(-6deg); }
.fan .phone:nth-child(3) { transform: translateX(0) rotate(0); z-index: 2; }
.fan .phone:nth-child(4) { transform: translateX(60%) rotate(6deg); }
.fan .phone:nth-child(5) { transform: translateX(120%) rotate(12deg); }
.card:hover .fan .phone:nth-child(1), .card[data-active] .fan .phone:nth-child(1) { transform: translateX(-230%) rotate(-4deg); }
.card:hover .fan .phone:nth-child(2), .card[data-active] .fan .phone:nth-child(2) { transform: translateX(-115%) rotate(-2deg); }
.card:hover .fan .phone:nth-child(3), .card[data-active] .fan .phone:nth-child(3) { transform: translateY(-4%); }
.card:hover .fan .phone:nth-child(4), .card[data-active] .fan .phone:nth-child(4) { transform: translateX(115%) rotate(2deg); }
.card:hover .fan .phone:nth-child(5), .card[data-active] .fan .phone:nth-child(5) { transform: translateX(230%) rotate(4deg); }
.lead.hive .stage { aspect-ratio: 16/8; padding: 0; }
/* grid cards */
.grid-wrap { position: relative; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 40px; margin-top: 64px; }
.grid-wrap.collapsed .case-grid { max-height: 39rem; overflow: hidden; }
.grid-wrap .fade { pointer-events: none; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 85%, transparent), transparent); display: none; }
.grid-wrap.collapsed .fade { display: block; }
.small .stage { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 40px; }
.small .frame { max-width: 24rem; }
.small .phone-tilt { width: 34%; transform: rotate(-3deg); transform-origin: top; transition: transform .5s var(--ease); }
.card:hover .phone-tilt, .card[data-active] .phone-tilt { transform: rotate(0) scale(1.08); }
.collage { position: relative; width: 100%; height: 100%; }
.collage img { position: absolute; border-radius: 8px; box-shadow: 6px 6px 0 var(--fg); background: #fff; transition: transform .6s var(--ease); }
.card .collage img:nth-child(1) { width: 58%; left: 4%; top: 8%; transform: rotate(-3deg); }
.card .collage img:nth-child(2) { width: 50%; right: 2%; top: 30%; transform: rotate(2deg); }
.card .collage img:nth-child(3) { width: 44%; left: 18%; bottom: 4%; transform: rotate(-1deg); }
.card:hover .collage img, .card[data-active] .collage img { transform: rotate(0) !important; }
.card:hover .collage img:nth-child(2), .card[data-active] .collage img:nth-child(2) { transform: translate(4%, -4%) !important; }
/* meta */
.meta { margin-top: 16px; }
.meta .kick { margin-bottom: 8px; font-size: 12px; color: var(--vermillion); }
.meta h3 { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; font-size: 30px; transition: all .15s; }
.lead .meta h3 { font-size: 36px; }
.meta h3 svg { flex: none; width: 20px; height: 20px; margin-top: .2em; transition: transform .15s; }
.lead .meta h3 svg { width: 24px; height: 24px; }
.card:hover .meta h3, .card[data-active] .meta h3 { font-style: italic; }
.card:hover .meta h3 svg, .card[data-active] .meta h3 svg { transform: translate(2px, -2px); }
.meta p { margin: 4px 0 0; font-size: 14px; color: var(--fg-70); max-width: 44rem; }
.meta .credit { margin-top: 8px; font-size: 11px; color: var(--fg-40); }
.case-gap { margin-top: 56px; }
.more-btn { margin: 32px auto 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-60); transition: color .15s; }
.more-btn:hover { color: var(--fg); }
.more-btn svg { width: 16px; height: 16px; transition: transform .15s; }
.more-btn:hover svg { transform: translateY(2px); }
.more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 767px) {
  .lead .stage { aspect-ratio: 16/10; padding: 24px; }
  .lead.hive .stage { aspect-ratio: 4/3; }
  .lead .stage .frame.side { display: none; }
  .lead .stage .frame.main { margin-right: 0; }
  .fan .phone { width: 24%; }
  .case-grid { grid-template-columns: 1fr; gap: 56px; margin-top: 48px; }
  .grid-wrap.collapsed .case-grid { max-height: 54rem; }
  .small .stage { padding: 24px; }
  .stage .mono { font-size: 26vw; }
  .meta h3, .lead .meta h3 { font-size: 24px; }
  .lead .meta h3 { font-size: 30px; }
}

/* ── Websites list ───────────────────────── */
.sites-intro { margin: 0 0 32px; max-width: 36rem; color: var(--fg-70); }
.site-list { list-style: none; margin: 0; padding: 0; position: relative; }
.site-list li + li { border-top: 1px solid var(--fg-10); }
.site-list li.hidden { display: none; }
.site-list a { display: block; }
.site-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; transition: transform .45s var(--spring); }
.site-list a:hover .site-row { transform: translateX(12px); }
.site-row .l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.site-row .logo { width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.site-row .logo img { max-width: 28px; max-height: 28px; object-fit: contain; }
.site-row .name { font-size: 20px; font-weight: 500; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all .15s; }
.site-list a:hover .name { font-style: italic; }
.site-row .r2 { display: flex; align-items: center; gap: 16px; flex: none; }
.site-row .ind { font-size: 12px; color: var(--fg-40); }
.site-row svg { width: 16px; height: 16px; color: var(--fg-25); opacity: 0; transition: opacity .15s; }
.site-list a:hover svg { opacity: 1; }
.list-wrap { position: relative; }
.list-wrap.collapsed::after { content: ""; pointer-events: none; position: absolute; inset: auto 0 0 0; height: 96px; background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 85%, transparent), transparent); }
.preview { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; width: 320px; aspect-ratio: 4/3; background: var(--fg); border: 1px solid var(--fg); box-shadow: 8px 8px 0 var(--fg); overflow: hidden; opacity: 0; will-change: transform, opacity; }
.preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.preview .bar { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; gap: 8px; background: var(--fg); color: var(--bg); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; }
.preview .ld { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; letter-spacing: .08em; color: color-mix(in srgb, var(--bg) 60%, transparent); }
@media (hover: none), (max-width: 767px) { .preview { display: none; } }
@media (max-width: 767px) { .site-row { padding: 14px 0; gap: 12px; } .site-row .name { font-size: 16px; } .site-row .ind { font-size: 10px; } .site-row .l { gap: 12px; } }

/* ── Background ───────────────────────────── */
.bg-grid { display: grid; grid-template-columns: 15rem 1fr; column-gap: 64px; }
.bg-grid h2 { position: sticky; top: 112px; align-self: start; margin: 0; font-size: 48px; font-weight: 600; line-height: .95; letter-spacing: -.025em; }
.bg-grid h2 em { font-weight: 500; color: var(--vermillion); }
.job + .job { margin-top: 56px; }
.job .jlogo { display: block; width: fit-content; margin-bottom: 20px; transition: opacity .15s; }
.job .jlogo:hover { opacity: .7; }
.jmono { display: inline-flex; align-items: center; height: 32px; margin-bottom: 20px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.job.edu { padding-top: 40px; border-top: 1px solid var(--fg-10); }
.job .jlogo img { height: 32px; width: auto; max-width: 200px; object-fit: contain; }
.job .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 16px; }
.job h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.job .org { width: 100%; order: 3; margin: 4px 0 0; font-size: 14px; color: var(--fg-60); }
.job .when { font-size: 12px; color: var(--fg-50); }
.job .sum { margin: 12px 0 0; max-width: 42rem; line-height: 1.625; color: var(--fg-70); }
.bullets { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--fg-70); }
.bullets li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--vermillion); }
.job .bullets { display: none; }
.jobs.open .job .bullets { display: grid; }
@media (max-width: 767px) { .bg-grid { grid-template-columns: 1fr; } .bg-grid h2 { position: static; font-size: 36px; margin-bottom: 48px; } .job .when { width: 100%; order: 4; margin-top: 8px; font-size: 11px; } }

/* ── Contact ──────────────────────────────── */
.contact { --fg: var(--ivory); --bg: var(--ink); background: var(--ink); color: var(--ivory); margin-top: 144px; padding: 128px 0 96px; scroll-margin-top: 0; }
.contact h2 { margin: 0; font-size: 48px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; }
.contact h2 em { display: block; color: var(--vermillion); font-weight: 500; }
.contact form { margin-top: 48px; max-width: 30rem; }
.contact textarea { width: 100%; resize: none; background: transparent; border: 0; border-bottom: 1px solid var(--fg-25); color: var(--fg); font: inherit; padding: 8px 0 28px; outline: none; transition: border-color .15s; }
.contact textarea::placeholder { color: var(--fg-40); }
.contact textarea:focus { border-color: var(--fg); }
.send { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; font-size: 12px; transition: background .15s, color .15s; }
.send:hover { background: var(--vermillion); color: var(--ivory); }
.send svg { width: 14px; height: 14px; }
.clinks { margin-top: 48px; display: grid; gap: 10px; font-size: 12px; }
.clinks a { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-50); width: fit-content; transition: color .15s; }
.clinks a:hover { color: var(--fg); }
.clinks svg { width: 14px; height: 14px; }
.contact { padding-bottom: 0; }
.site-footer { background: var(--ink); color: var(--ivory); --fg: var(--ivory); padding: 0 0 32px; }
.fwm { container-type: inline-size; overflow: hidden; padding-top: 96px; }
.fw { display: block; white-space: nowrap; font-size: 13.6cqw; font-weight: 800; letter-spacing: -.04em; line-height: .9; padding-bottom: .06em; user-select: none; }
.fw .ch { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 35ms); }
.fwm.in .fw .ch { transform: none; }
.fwm:hover .fw .v { display: inline-block; animation: dot 1.2s var(--ease); }
@keyframes dot { 30% { transform: translateY(-18%); } 60% { transform: translateY(4%); } }
.frow { margin-top: 20px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--ivory) 14%, transparent); display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 12px; color: color-mix(in srgb, var(--ivory) 60%, transparent); }
.frow nav { display: flex; gap: 24px; }
.frow a, .totop { transition: color .15s; }
.frow a:hover, .totop:hover { color: var(--ivory); }
.totop { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: inherit; }
.totop svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.totop:hover svg { transform: translateY(-3px); }
@media (max-width: 767px) { .fwm { padding-top: 72px; } .frow { flex-wrap: wrap; font-size: 10px; gap: 14px 20px; } .frow nav { order: 3; width: 100%; gap: 18px; } }
@media (max-width: 767px) { .contact { margin-top: 96px; padding: 96px 0 0; } .contact h2 { font-size: 36px; } }

/* ── Case study pages ─────────────────────── */
.cs-hero { padding: 64px 0 0; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-60); transition: color .15s; }
.back:hover { color: var(--fg); }
.back svg { width: 14px; height: 14px; transition: transform .15s; }
.back:hover svg { transform: translateX(-3px); }
.cs-hero h1 { margin: 32px 0 0; font-size: 80px; font-weight: 700; line-height: 1; letter-spacing: -.035em; }
.cs-hero .sub { margin: 16px 0 0; font-size: 32px; font-weight: 500; font-style: italic; letter-spacing: -.02em; line-height: 1.15; }
.cs-hero .credit { margin-top: 16px; font-size: 12px; color: var(--fg-50); }
.cs-hero .cta { margin-top: 28px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--fg); padding: 9px 14px; font-size: 12px; transition: background .15s, color .15s; }
.cs-hero .cta:hover { background: var(--fg); color: var(--bg); }
.cs-hero .cta svg { width: 14px; height: 14px; }
.cs-visual { margin-top: 56px; }
.cs-visual .stage { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; padding: 56px; }
.cs-visual .frame { max-width: none; width: 86%; }
.facts { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--fg-10); border-bottom: 1px solid var(--fg-10); }
.facts div { padding: 18px 16px 20px 0; }
.facts div + div { padding-left: 16px; border-left: 1px solid var(--fg-10); }
.facts dt { font-size: 11px; color: var(--fg-50); }
.facts dd { margin: 6px 0 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.prose { margin-top: 96px; display: grid; grid-template-columns: 15rem 1fr; column-gap: 64px; row-gap: 56px; }
.prose h2 { margin: 0; font-size: 14px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.prose h2::before { content: ""; width: 10px; height: 10px; background: var(--vermillion); flex: none; }
.prose p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--fg-70); }
.prose p + p { margin-top: 16px; }
.prose p strong { color: var(--fg); font-weight: 600; }
.prose .bullets li { font-size: 16px; }
.feature { margin-top: 144px; }
.feature .kick { font-size: 12px; color: var(--vermillion); }
.feature h2 { margin: 10px 0 0; font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; max-width: 44rem; }
.feature > .container > p, .feature .lede { margin: 18px 0 0; max-width: 42rem; font-size: 17px; line-height: 1.65; color: var(--fg-70); }
.feature .bullets { max-width: 42rem; }
.fig { margin: 48px 0 0; }
.fig .shot { position: relative; display: block; width: 100%; background: var(--bg); box-shadow: 10px 10px 0 var(--fg); cursor: zoom-in; transition: transform .5s var(--ease); }
.fig .shot img { width: 100%; }
.fig .shot:hover { transform: translate(-2px, -2px); box-shadow: 12px 12px 0 var(--fg); }
.fig figcaption, .cap { display: flex; justify-content: space-between; gap: 12px; background: var(--fg); color: var(--bg); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; margin-top: 48px; }
.bento .fig { margin: 0; }
.bento .w6 { grid-column: span 6; } .bento .w4 { grid-column: span 4; } .bento .w3 { grid-column: span 3; } .bento .w2 { grid-column: span 2; }
.bleed { width: min(1320px, 100% - 48px); margin-left: auto; margin-right: auto; }
.panel { background: var(--secondary); padding: 56px; position: relative; isolation: isolate; overflow: hidden; }
.panel.dark { background: #1c1713; --fg: var(--ivory); }
.panel::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .25; mix-blend-mode: overlay; z-index: -1; pointer-events: none; }
.phones { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; scrollbar-width: thin; }
.phones .ph { flex: none; width: 210px; scroll-snap-align: start; }
.phones .ph .phone { width: 100%; }
.phones .ph span { display: block; margin-top: 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-60); }
.phones.big .ph { width: 250px; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: start; }
.flow .ph { position: relative; }
.flow .ph:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 40%; color: var(--fg-40); font-size: 14px; }
.flow .ph span { display: block; margin-top: 10px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-60); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--fg-10); margin-top: 48px; border: 1px solid var(--fg-10); }
.stats div { background: var(--bg); padding: 22px 18px; }
.stats b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.stats span { display: block; margin-top: 8px; font-size: 12px; color: var(--fg-60); line-height: 1.45; }
.next { margin-top: 160px; border-top: 1px solid var(--fg-10); padding-top: 40px; }
.next a { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.next .label { font-size: 12px; color: var(--fg-50); }
.next h3 { margin: 6px 0 0; font-size: 44px; font-weight: 600; letter-spacing: -.03em; transition: all .15s; }
.next a:hover h3 { font-style: italic; }
.next svg { width: 32px; height: 32px; transition: transform .15s; }
.next a:hover svg { transform: translate(4px, -4px); }
/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--ink) 88%, transparent); display: grid; place-items: center; padding: 32px; opacity: 0; pointer-events: none; transition: opacity .25s; cursor: zoom-out; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb img { max-width: 100%; max-height: 100%; box-shadow: 10px 10px 0 var(--vermillion); transform: scale(.96); transition: transform .35s var(--ease); background: #fff; }
.lb.open img { transform: none; }
@media (max-width: 767px) {
  .cs-hero { padding-top: 40px; }
  .cs-hero h1 { font-size: 48px; }
  .cs-hero .sub { font-size: 22px; }
  .cs-visual .stage { aspect-ratio: 4/3; padding: 20px; }
  .cs-visual .frame { width: 100%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--fg-10); }
  .prose { grid-template-columns: 1fr; row-gap: 16px; margin-top: 64px; }
  .prose h2 { margin-top: 32px; }
  .prose p { font-size: 16px; }
  .feature { margin-top: 96px; }
  .feature h2 { font-size: 32px; }
  .bento { grid-template-columns: 1fr; gap: 24px; }
  .bento > * { grid-column: auto !important; }
  .panel { padding: 24px; }
  .flow { grid-template-columns: repeat(5, 62%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .flow .ph { scroll-snap-align: start; }
  .phones .ph, .phones.big .ph { width: 160px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .next h3 { font-size: 30px; }
}

/* ── Password gate ───────────────────────── */
.gate { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 48px 0; }
.gate-card { width: min(440px, 100%); }
.gate-card .lockmark { width: 56px; height: 56px; background: var(--fg); color: var(--bg); display: grid; place-items: center; box-shadow: 6px 6px 0 var(--vermillion); }
.gate-card .lockmark svg { width: 24px; height: 24px; }
.gate-card h1 { margin: 32px 0 0; font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.gate-card p { margin: 14px 0 0; color: var(--fg-70); font-size: 15px; line-height: 1.6; }
.gate-card form { margin-top: 32px; display: flex; gap: 0; }
.gate-card input { flex: 1; min-width: 0; font: inherit; font-size: 15px; background: transparent; border: 1px solid var(--fg); border-right: 0; padding: 12px 14px; color: var(--fg); outline: none; }
.gate-card input:focus { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.gate-card button { background: var(--fg); color: var(--bg); padding: 0 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; transition: background .15s; }
.gate-card button:hover { background: var(--vermillion); }
.gate-card .err { margin-top: 12px; min-height: 18px; font-size: 13px; color: var(--vermillion); }
.gate-card.shake form { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.gate-card .ask { margin-top: 28px; font-size: 13px; color: var(--fg-50); }
.gate-card .ask a { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .r { opacity: 1; transform: none; transition: none; }
  .ribbon-track, .scroll-btn svg, .sec-label .sq { animation: none; }
}
