/* First Saff brand study. Built in the app's design language (docs/DESIGN.md): Anek Latin, Saff Blue for action,
   tinted blue surfaces, white sheets on a light grey backdrop separated by bands, soft radii. */
@font-face { font-family: Anek; src: url(fonts/AnekLatin-400Regular.woff) format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Anek; src: url(fonts/AnekLatin-500Medium.woff) format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: Anek; src: url(fonts/AnekLatin-600SemiBold.woff) format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: Anek; src: url(fonts/AnekLatin-700Bold.woff) format('woff'); font-weight: 700; font-display: swap; }

:root {
  --blue: #1F6BFF; --blue-pressed: #1859D9; --tint: #EAF1FF; --tint-2: #DCE7FF; --blue-ink: #1A56D6;
  --deep: #1240D8; --night: #0B1A3D; --night-2: #060C26;
  --gold: #FFD04F; --gold-ink: #7A4F00; --gold-soft: #FFF4D6;
  --ink: #1D1D1F; --ink-2: #6E6E75; --ink-3: #A8A8AD;
  --white: #FFFFFF; --backdrop: #F4F4F4; --tile: #F0F0F0; --hairline: #E6E6E6;
  --green: #1FA35B; --green-soft: #E5F6EC; --red: #F0453A; --red-soft: #FDECEB;
  --r-sheet: 22px; --r-card: 16px; --r-btn: 14px; --r-chip: 10px;
  --wrap: 1120px; --gutter: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--backdrop); color: var(--ink); font-family: Anek, system-ui, sans-serif; font-weight: 400;
  font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-pressed); }
b, strong { font-weight: 600; }
.ar { font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", serif; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- top bar */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom: 1px solid var(--hairline); }
.bar .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.bar .brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); font-weight: 700; font-size: 20px; }
.bar .brand img { width: 30px; height: 30px; }
.bar nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; mask-image: linear-gradient(90deg,#000 92%,transparent); }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { flex: none; padding: 6px 12px; border-radius: var(--r-chip); color: var(--ink-2); font-weight: 500; font-size: 15px; }
.bar nav a.on { background: var(--ink); color: #fff; }
.bar nav a:hover:not(.on) { background: var(--tile); color: var(--ink); }

/* ---- hero */
.hero { background: radial-gradient(90% 120% at 75% 30%, #1E3FA8 0%, #0B1A4F 52%, var(--night-2) 100%); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; min-height: 640px; padding-top: 70px; padding-bottom: 70px; }
.eyebrow { font-weight: 600; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: #8FB0FF; }
.hero h1 { font-weight: 600; font-size: clamp(46px, 7vw, 86px); line-height: .98; letter-spacing: -.01em; margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lede { color: #C3D0F2; font-size: 21px; max-width: 560px; margin: 0; }
.hero .icon { justify-self: center; width: min(440px, 80vw); filter: drop-shadow(0 40px 60px rgba(0,8,40,.55)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 40px; max-width: 600px; }
.stats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-card); padding: 14px 14px 12px; }
.stats b { display: block; font-size: 32px; font-weight: 600; line-height: 1; color: #fff; }
.stats span { font-size: 14px; color: #A9B9E3; line-height: 1.25; display: block; margin-top: 6px; }

/* ---- sections: white sheets on the backdrop, separated by bands like the app */
.sheet { background: var(--white); margin-top: 8px; padding: 84px 0; }
.sheet.alt { background: var(--backdrop); }
.chapter { display: inline-flex; align-items: center; gap: 8px; background: var(--tint); color: var(--blue); font-weight: 600; font-size: 14px;
  padding: 5px 12px 4px; border-radius: 999px; letter-spacing: .02em; }
h2 { font-weight: 600; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.01em; margin: 16px 0 16px; max-width: 820px; }
h3 { font-weight: 600; font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
h4 { font-weight: 600; font-size: 18px; margin: 0 0 4px; }
.lede { font-size: 21px; color: var(--ink-2); max-width: 740px; margin: 0 0 40px; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; line-height: 1.45; }
.cap { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); } .g6 { grid-template-columns: repeat(6, 1fr); }
.card { background: var(--backdrop); border-radius: var(--r-sheet); padding: 24px; }
.sheet.alt .card { background: var(--white); }
.card.tint { background: var(--tint); }
.card.gold { background: var(--gold-soft); }
.card.night { background: var(--night); color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.wide-l { grid-template-columns: 1.25fr 1fr; }
.pill { display: inline-block; font-weight: 600; font-size: 13px; padding: 3px 10px 2px; border-radius: 999px; }
.pill.keep { background: var(--green-soft); color: #0F7A40; } .pill.drop { background: var(--red-soft); color: #C42A20; }
.pill.blue { background: var(--tint); color: var(--blue); } .pill.goldp { background: var(--gold-soft); color: var(--gold-ink); }
hr.band { border: 0; height: 8px; background: var(--backdrop); margin: 48px calc(-1 * var(--gutter)); }

/* ---- the name */
.word { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.word .ar { font-size: 96px; line-height: 1.1; color: var(--blue); }
.word .lat { font-size: 44px; font-weight: 600; }
.word .ipa { font-size: 20px; color: var(--ink-2); }
.plan { background: var(--backdrop); border-radius: var(--r-sheet); padding: 18px; }
.plan circle { transition: fill .35s ease, opacity .35s ease; }
.quote { border-radius: var(--r-sheet); padding: 26px 26px 22px; background: var(--gold-soft); }
.quote p { font-size: 21px; line-height: 1.4; font-weight: 500; margin-bottom: 12px; }
.quote .src { font-size: 14px; color: var(--gold-ink); font-weight: 500; }

/* ---- brief */
.req { background: var(--backdrop); border-radius: var(--r-sheet); padding: 22px; }
.sheet.alt .req, .sheet.alt .dont, .sheet.alt .dl, .sheet.alt .plan, .sheet.alt .eq .item { background: var(--white); }
.req .gl { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; margin-bottom: 14px; }
.req .n { font-weight: 600; color: var(--ink-3); font-size: 14px; }

/* ---- cliché row */
.trope { background: var(--white); border-radius: var(--r-card); padding: 18px 12px 14px; text-align: center; }
.trope svg { margin: 0 auto 10px; }
.gap-card { background: var(--night); color: #fff; border-radius: var(--r-sheet); padding: 28px; }
.gap-card b { color: var(--gold); }

/* ---- reference study */
.stack { display: flex; height: 56px; border-radius: 14px; overflow: hidden; margin: 6px 0 18px; }
.stack div { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 17px; min-width: 0; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 20px; }
.legend > div { display: flex; gap: 12px; align-items: flex-start; }
.legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; margin-top: 5px; }
.pattern { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; background: var(--backdrop); border-radius: var(--r-sheet); padding: 16px; }
.sheet.alt .pattern { background: var(--white); }
.meter { height: 8px; background: var(--hairline); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.count { font-weight: 600; color: var(--blue); }

/* ---- rounds */
.round { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--hairline); }
.round:first-of-type { border-top: 0; }
.round .r { font-weight: 600; font-size: 15px; color: var(--blue); }
.round .rt { font-weight: 600; font-size: 26px; line-height: 1.15; margin: 6px 0 0; }
.round figure { margin: 0; }
.round img { border-radius: var(--r-card); border: 1px solid var(--hairline); }
.round .verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.round .verdict div { background: var(--backdrop); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.4; }

/* ---- the mark */
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; }
.eq .op { font-size: 44px; color: var(--ink-3); font-weight: 600; }
.eq .item { background: var(--backdrop); border-radius: var(--r-sheet); padding: 22px 10px 16px; }
.eq .item svg { width: 72%; margin: 0 auto 10px; }
.reader { background: var(--backdrop); border-radius: var(--r-sheet); padding: 28px; display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--tint-2); border-radius: 3px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 4px 12px rgba(31,107,255,.28); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 4px 12px rgba(31,107,255,.3); }
.ticks { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); margin-top: 10px; font-weight: 500; }

/* ---- buttons / segmented like the app */
.seg { display: inline-flex; background: var(--tile); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { font: 500 15px Anek, sans-serif; border: 0; background: transparent; padding: 7px 14px 6px; border-radius: 10px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 16px Anek, sans-serif; border: 0; border-radius: var(--r-btn); padding: 12px 18px 11px; cursor: pointer; }
.btn.primary { background: var(--blue); color: #fff; } .btn.primary:hover { background: var(--blue-pressed); color: #fff; }
.btn.tinted { background: var(--tint); color: var(--blue); } .btn.tinted:hover { background: var(--tint-2); }

/* ---- construction */
.cons { background: #F5F8FF; border-radius: var(--r-sheet); overflow: hidden; position: relative; }
.cons .guides { transition: opacity .3s; }
.cons.noguides .guides { opacity: 0; }
.spec { width: 100%; border-collapse: collapse; font-size: 16px; }
.spec td { padding: 11px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.spec td:first-child { color: var(--ink-2); width: 42%; padding-right: 12px; }
.spec td:last-child { font-weight: 500; }

/* ---- exploded layers */
.explode { position: relative; height: 600px; perspective: 1800px; background: radial-gradient(60% 60% at 50% 45%, #fff, var(--backdrop)); border-radius: var(--r-sheet); overflow: hidden; }
.explode .stage { position: absolute; left: 50%; top: 70%; width: 300px; height: 300px; margin: -150px 0 0 -150px; transform-style: preserve-3d;
  transform: rotateX(0deg) rotateZ(0deg); transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.explode .stage img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.explode.open .stage { transform: rotateX(52deg) rotateZ(-36deg) scale(.86); }
.explode.open .stage img:nth-child(1) { transform: translateZ(0); }
.explode.open .stage img:nth-child(2) { transform: translateZ(60px); }
.explode.open .stage img:nth-child(3) { transform: translateZ(120px); }
.explode.open .stage img:nth-child(4) { transform: translateZ(180px); }
.explode.open .stage img:nth-child(5) { transform: translateZ(240px); }
.explode .ctrl { position: absolute; left: 18px; top: 18px; }
.layers li { margin-bottom: 14px; }
.layers { padding-left: 0; list-style: none; counter-reset: l; margin: 0; }
.layers li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.layers li::before { counter-increment: l; content: counter(l); width: 30px; height: 30px; border-radius: 9px; background: var(--tint); color: var(--blue);
  font-weight: 600; display: grid; place-items: center; font-size: 15px; }

/* ---- legibility */
.ladder { display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap; }
.ladder figure { margin: 0; text-align: center; }
.ladder figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.cvd { text-align: center; }
.cvd > img { width: 120px; margin: 0 auto 10px; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 17px; }
.check i { width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; }
.ratio { font-size: 40px; font-weight: 600; line-height: 1; }
.chip-ok { font-size: 13px; font-weight: 600; color: #0F7A40; background: var(--green-soft); padding: 2px 8px; border-radius: 6px; }

/* ---- phones */
.phone { width: 300px; height: 600px; border-radius: 48px; background: #111; padding: 11px; box-shadow: 0 30px 60px rgba(0,0,0,.18); flex: none; }
.phone .scr { width: 100%; height: 100%; border-radius: 38px; position: relative; overflow: hidden; }
.phone .sb { display: flex; justify-content: space-between; padding: 16px 26px; font-weight: 600; font-size: 15px; }
.phone .apps { display: grid; grid-template-columns: repeat(4, 56px); gap: 20px 12px; padding: 22px 18px; }
.phone .app { text-align: center; } .phone .app i { display: block; width: 56px; height: 56px; border-radius: 14px; }
.phone .app span { display: block; font-size: 11px; margin-top: 4px; font-weight: 500; }
.phone .dock { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 80px; border-radius: 28px; }
.phones { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }

/* ---- colour */
.sw { border-radius: var(--r-sheet); overflow: hidden; background: var(--backdrop); }
.sw .c { height: 150px; display: flex; align-items: flex-end; padding: 14px; font-weight: 600; }
.sw .m { padding: 14px 16px 16px; font-size: 15px; line-height: 1.45; }
.sw .m b { font-size: 18px; display: block; }
.prop { display: flex; height: 70px; border-radius: 16px; overflow: hidden; }
.prop div { display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: 15px; }

/* ---- type */
.specimen { font-size: clamp(64px, 11vw, 150px); line-height: 1; font-weight: 700; letter-spacing: -.005em; }
.weights > div { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.weights span { color: var(--ink-2); font-size: 14px; }

/* ---- don'ts */
.dont { background: var(--backdrop); border-radius: var(--r-sheet); padding: 18px; text-align: center; }
.dont .art { height: 150px; display: grid; place-items: center; position: relative; }
.dont .art svg, .dont .art img { width: 110px; height: 110px; }
.dont .x { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: #C42A20; font-size: 15px; margin-top: 8px; }
.do .x { color: #0F7A40; }

/* ---- downloads */
.dl { display: flex; gap: 16px; align-items: center; background: var(--backdrop); border-radius: var(--r-sheet); padding: 16px; color: var(--ink); }
.dl:hover { background: var(--tint); color: var(--ink); }
.dl .th { width: 64px; height: 64px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.dl .th img { width: 52px; }
.dl b { display: block; font-weight: 600; } .dl span { font-size: 14px; color: var(--ink-2); }

footer { background: var(--night); color: #A9B9E3; margin-top: 8px; padding: 56px 0; font-size: 16px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer a { color: #fff; }

#reader { max-width: 240px; margin: 0 auto; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .hero .icon { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .hero .icon { grid-row: 1; width: min(300px, 70vw); }
  .split, .split.wide-l { grid-template-columns: 1fr; gap: 28px; }
  .g4, .g5, .g6 { grid-template-columns: repeat(3, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); }
  .reader { grid-template-columns: 1fr; }
  .round { grid-template-columns: 1fr; gap: 14px; }
  .legend { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .sheet { padding: 56px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g5, .g6 { grid-template-columns: repeat(2, 1fr); }
  .eq { grid-template-columns: 1fr auto 1fr; } .eq .op:nth-of-type(4) { display: none; }
  .legend { grid-template-columns: 1fr; }
  .round .verdict { grid-template-columns: 1fr; }
  .stack div span { display: none; }
  .explode { height: 420px; } .explode .stage { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
  .explode.open .stage img:nth-child(2) { transform: translateZ(36px); } .explode.open .stage img:nth-child(3) { transform: translateZ(72px); }
  .explode.open .stage img:nth-child(4) { transform: translateZ(108px); } .explode.open .stage img:nth-child(5) { transform: translateZ(120px); }
  .word .ar { font-size: 72px; }
  .phone { transform: scale(.9); transform-origin: top center; margin-bottom: -60px; }
}
