/* صحابي — the site. Same ink, clay and paper as the app. */

@font-face { font-family: Zain; src: url("fonts/Zain-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: Zain; src: url("fonts/Zain-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Zain; src: url("fonts/Zain-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Rakkas; src: url("fonts/Rakkas-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Amiri; src: url("fonts/Amiri-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Amiri; src: url("fonts/Amiri-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #172e3a;
  --ink-2: #304b54;
  --night: #0c1c25;
  --clay: #b96245;
  --clay-2: #d78968;
  --blush: #e7c5a6;
  --paper: #f4ede0;
  --paper-2: #faf5eb;
  --paper-3: #eadcc7;
  --line: #dfd3c1;
  --muted: #667771;
  --olive: #677c69;

  --fg: #f4ede0;            /* driven by the sky while the hero plays */
  --fg-soft: rgba(244, 237, 224, .78);

  --wrap: min(1180px, calc(100% - 48px));
  --display: Rakkas, Amiri, serif;
  --serif: Amiri, serif;
  --ui: Zain, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 20px/1.75 var(--ui); overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, ul, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 4px; border-radius: 6px; }

.skip { position: fixed; inset-block-start: -80px; inset-inline-start: 16px; z-index: 100; padding: 10px 16px; background: var(--paper); color: var(--ink); border-radius: 10px; }
.skip:focus { inset-block-start: 12px; }

/* ------------------------------------------------------------------ bar */

.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 76px; padding-inline: max(24px, calc((100% - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; color: var(--fg); transition: color .5s, background .4s, box-shadow .4s, backdrop-filter .4s; }
.bar.solid { background: rgba(244, 237, 224, .88); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 400 30px/1 var(--display); }
.wordmark img { height: 34px; width: auto; }
.wm-light { display: none; }
.bar.solid .wm-dark { display: none; }
.bar.solid .wm-light { display: block; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 34px); font-size: 17px; }
.bar nav a { padding: 10px 2px; text-decoration: none; opacity: .86; transition: opacity .2s; min-height: 44px; display: inline-flex; align-items: center; }
.bar nav a:hover { opacity: 1; }

/* ----------------------------------------------------------------- hero */

.hero { position: relative; height: 380vh; background: var(--night); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#dawn { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-fallback { position: absolute; inset: 0; display: none; place-items: center; justify-items: end; padding-inline: max(24px, calc((100% - 1180px) / 2)); background: linear-gradient(180deg, #0c1c25 0%, #233f4a 40%, #b96245 78%, #e7c5a6 100%); }
.stage-fallback img { width: min(460px, 70vw); opacity: .95; }
.no-webgl .stage-fallback { display: grid; }
.no-webgl #dawn { display: none; }

.hero-copy { position: absolute; inset: 0; width: var(--wrap); margin-inline: auto; pointer-events: none; }
.beat { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(560px, 100%); display: flex; flex-direction: column; justify-content: center; padding-block: 96px 80px; color: var(--fg); opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease), color .5s; visibility: hidden; }
.beat.on { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.kicker { font: 700 16px/1.4 var(--ui); letter-spacing: .02em; color: var(--clay); margin-bottom: 18px; }
.hero .kicker { color: var(--clay-2); }
.hero.is-light .kicker { color: #8a3f2a; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(46px, 6.2vw, 92px); line-height: 1.22; margin-bottom: 22px; }
h1 em { font-style: normal; color: var(--blush); }
.hero.is-light h1 em { color: var(--clay); }
.hero h2 { font-size: clamp(40px, 5vw, 72px); line-height: 1.22; margin-bottom: 20px; }
.lede { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.8; color: var(--fg-soft); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { min-height: 52px; padding: 11px 22px; display: inline-flex; align-items: center; gap: 12px; border-radius: 14px; border: 1.5px solid transparent; font: 700 18px/1 var(--ui); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; background: none; }
.btn:hover { transform: translateY(-2px); }
.btn-fill { background: var(--blush); color: var(--ink); }
.btn-fill:hover { background: #f1d4b9; }
.btn-line { border-color: currentColor; color: var(--fg); }
.btn-line:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.figures { display: flex; gap: clamp(20px, 4vw, 48px); margin-top: 10px; }
.figures li { display: flex; flex-direction: column; }
.figures b { font: 400 clamp(54px, 6vw, 88px)/1 var(--display); }
.figures span { font-size: 18px; color: var(--fg-soft); }

.cue { position: absolute; inset-block-end: 26px; inset-inline-start: 50%; width: 28px; height: 46px; transform: translateX(50%); border: 1.5px solid var(--fg); border-radius: 16px; opacity: .6; transition: opacity .4s, color .5s; pointer-events: auto; }
.cue span { position: absolute; inset: 8px auto auto 50%; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--fg); animation: cue 1.9s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
.hero.is-scrolled .cue { opacity: 0; pointer-events: none; }

/* -------------------------------------------------------------- sections */

.wrap { width: var(--wrap); margin-inline: auto; }
.sec { padding-block: clamp(80px, 11vw, 160px); position: relative; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 110px); align-items: center; }
.copy { max-width: 560px; }
.sec h2 { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.28; margin-bottom: 22px; }
.lead { font-size: clamp(19px, 1.6vw, 22px); color: var(--muted); max-width: 30em; }

.rv { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* phones */
.phone { position: relative; width: min(300px, 78vw); margin: 0; padding: 7px; border-radius: 46px; background: #0b161c; box-shadow: 0 2px 0 rgba(255, 255, 255, .08) inset, 0 30px 70px -20px rgba(23, 46, 58, .55), 0 10px 24px -10px rgba(23, 46, 58, .35); transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease); will-change: transform; }
.phone img, .phone video { width: 100%; height: auto; border-radius: 39px; background: var(--paper); }
.phone video { aspect-ratio: 9 / 16; object-fit: cover; }

/* read */
.sec-read { background: var(--paper); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 38px; border-block: 1px solid var(--line); }
.facts div { padding: 16px 14px; border-inline-start: 1px solid var(--line); }
.facts div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts dt { font: 700 19px/1.4 var(--ui); color: var(--ink); }
.facts dd { font-size: 15px; line-height: 1.45; color: var(--muted); }
.device { position: relative; display: grid; place-items: center; min-height: 560px; }
.device::before { content: ""; position: absolute; width: min(480px, 90%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--blush), var(--paper-3) 70%); opacity: .75; }
.pull { position: absolute; inset-block-end: 6%; inset-inline-end: -6%; width: min(280px, 62%); padding: 18px 20px; background: var(--ink); color: var(--paper); border-radius: 18px; box-shadow: 0 24px 50px -18px rgba(23, 46, 58, .55); transform: rotate(-2deg); }
.pull p { font: 700 22px/1.7 var(--serif); }
.pull cite { display: block; margin-top: 8px; font: 400 13.5px/1.5 var(--ui); color: var(--blush); font-style: normal; }

/* listen */
.sec-listen { background: var(--ink); color: var(--paper); overflow: hidden; }
.sec-listen::before { content: ""; position: absolute; inset: -10% auto auto -10%; width: 60vw; aspect-ratio: 1; background: radial-gradient(circle, rgba(185, 98, 69, .28), transparent 62%); pointer-events: none; }
.sec-listen .kicker { color: var(--clay-2); }
.sec-listen .lead { color: var(--onink, #b6c6bf); }
.devices { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 600px; }
.devices .phone-back { position: absolute; inset-inline-end: 4%; inset-block-start: 56px; width: min(250px, 58vw); transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(6deg); opacity: .96; z-index: 0; }
.devices .phone-video { z-index: 1; margin-inline-end: 40px; }
.play { position: absolute; inset: 36% auto auto 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 0; background: rgba(244, 237, 224, .94); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); transition: transform .3s var(--ease), opacity .3s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 34px; height: 34px; fill: currentColor; margin-inline-start: 4px; }
.phone-video.playing .play { opacity: 0; pointer-events: none; }
.ticks { display: grid; gap: 16px; margin-top: 30px; }
.ticks li { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.ticks svg { flex: none; width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: rgba(244, 237, 224, .1); fill: none; stroke: var(--blush); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ticks b { color: var(--blush); }
.note { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(244, 237, 224, .16); font-size: 15px; line-height: 1.7; color: #9fb1ab; max-width: 34em; }

/* today */
.sec-today { background: var(--paper-2); }
.today-head { margin-bottom: 36px; }
.today-head h2 { margin: 0; }
.today { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); background: var(--paper); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px -34px rgba(23, 46, 58, .4); }
.today-art { position: relative; min-height: 340px; background: var(--ink-2); }
.today-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; opacity: 0; transition: opacity .6s; }
.today-art img.ready { opacity: 1; }
.today-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23, 46, 58, .5), transparent 45%); }
.today-body { padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.today-who { font: 700 16px/1.4 var(--ui); color: var(--clay); display: flex; gap: 8px; }
.today h3 { font: 400 clamp(32px, 3.6vw, 52px)/1.3 var(--display); }
.today-hook { color: var(--muted); font-size: 20px; }
.today blockquote { padding-inline-start: 16px; border-inline-start: 3px solid var(--clay); font: 700 22px/1.7 var(--serif); color: var(--ink-2); }
.today-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); }
.today-meta span { padding: 4px 12px; border-radius: 99px; background: var(--paper-3); }
.today .btn-line { color: var(--ink); margin-top: 8px; }
.today.swap .today-body, .today.swap .today-art { opacity: 0; transition: opacity .18s; }

/* companions */
.sec-companions { background: var(--paper-3); }
.flip .devices { order: 2; }
.devices-2 .phone-back { inset-inline-end: auto; inset-inline-start: 4%; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-5deg); }
.devices-2 .phone:first-child { margin-inline-start: 40px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tags li { padding: 7px 16px; border-radius: 99px; border: 1.5px solid var(--ink-2); font: 700 15.5px/1.5 var(--ui); color: var(--ink-2); }

/* private */
.sec-private { background: var(--clay); color: var(--paper); text-align: start; overflow: hidden; }
.sec-private::after { content: ""; position: absolute; inset: auto auto -30% -8%; width: 52vw; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(244, 237, 224, .25); box-shadow: 0 0 0 60px rgba(244, 237, 224, .05), 0 0 0 120px rgba(244, 237, 224, .035); pointer-events: none; }
.sec-private .kicker { color: var(--blush); }
.sec-private h2 { color: #fff; font-size: clamp(42px, 5.4vw, 80px); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); margin-top: 36px; position: relative; z-index: 1; }
.trio li { padding-top: 20px; border-top: 1.5px solid rgba(244, 237, 224, .5); }
.trio b { display: block; font: 400 32px/1.3 var(--display); color: #fff; }
.trio span { font-size: 19px; color: rgba(244, 237, 224, .88); }

/* finale */
.finale { padding-block: clamp(90px, 12vw, 170px); text-align: center; background: linear-gradient(180deg, var(--paper) 0%, #f0d9bf 55%, var(--blush) 100%); position: relative; overflow: hidden; }
.finale-mark { width: min(240px, 52vw); margin: 0 auto 26px; }
.finale h2 { font-size: clamp(54px, 8vw, 118px); line-height: 1.15; margin-bottom: 8px; color: var(--ink); }
.finale .kicker { color: var(--clay); }
.stores { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.store { min-width: 210px; padding: 12px 24px; border-radius: 16px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; align-items: center; line-height: 1.35; opacity: .94; }
.store small { font-size: 14px; color: var(--blush); }
.store b { font: 400 26px/1.2 var(--display); }

/* footer */
.foot { background: var(--paper); border-top: 1px solid var(--line); padding-block: 34px; font-size: 16px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.foot .wordmark { color: var(--ink); font-size: 26px; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.foot nav a:hover { color: var(--clay); }

/* ------------------------------------------------------------- legal */

.legal-page { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: 130px 0 70px; }
.legal-page header { margin-bottom: 36px; }
.legal-page .section-index { color: var(--clay); font: 700 16px/1.4 var(--ui); margin-bottom: 12px; }
.legal-page h1 { font-size: clamp(44px, 7vw, 76px); margin-bottom: 12px; }
.legal-page header p:last-child { color: var(--muted); }
.legal-page article h2 { font: 400 32px/1.4 var(--display); margin: 34px 0 6px; }
.legal-page article p { color: #314b4e; }
.legal-page a { color: var(--clay); text-underline-offset: 4px; }
.legal-page .back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 18px; text-decoration: none; color: var(--ink-2); }
.legal-page footer { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
body.legal .bar { color: var(--ink); background: rgba(244, 237, 224, .88); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.legal .wm-light { display: block; }

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  body { font-size: 19px; }
  .bar { height: 64px; }
  .bar nav a:not(:first-child):not(:last-child) { display: none; }
  .hero { height: 330vh; }
  .beat { width: 100%; justify-content: flex-start; padding-block: 92px 40px; }
  .kicker { margin-bottom: 12px; }
  h1 { font-size: clamp(40px, 11vw, 60px); }
  .lede { font-size: 18px; line-height: 1.7; }
  .actions { margin-top: 20px; }
  .two { grid-template-columns: 1fr; }
  .flip .devices { order: 0; }
  .device { min-height: 520px; }
  .pull { inset-inline-end: 0; }
  .facts { grid-template-columns: 1fr 1fr 1fr; }
  .facts dt { font-size: 16px; }
  .facts dd { font-size: 13.5px; }
  .devices { min-height: 560px; }
  .devices .phone-video { margin-inline-end: 0; }
  .devices .phone-back { display: none; }
  .devices-2 .phone:first-child { margin-inline-start: 0; }
  .devices { min-height: 0; }
  .today { grid-template-columns: 1fr; }
  .today-art { min-height: 230px; }
  .trio { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .wrap { width: calc(100% - 36px); }
  .bar { padding-inline: 18px; }
  .btn { padding-inline: 18px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .beat { transition: opacity .2s; transform: none; }
  .cue span { animation: none; }
  .phone { transition: none; }
}

/* the share image is rendered from the page itself (?p=0.5&b=0.1&og=1) */
body.og .bar, body.og .actions, body.og .lede, body.og .cue { display: none; }
body.og .hero { height: 100vh; }
