/* The public site (apps/web/site). Plain CSS on the shared design tokens (tokens.css, light and
   dark). Logical properties throughout, so Arabic mirrors without extra rules. */
:root:lang(hi) {
  --font-display: "Noto Serif Devanagari", "Fraunces", Georgia, serif;
  --font-sans: "Hind", "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
}
:root:lang(ar) {
  --font-display: "Noto Naskh Arabic", "Fraunces", Georgia, serif;
  --font-sans: "IBM Plex Sans Arabic", "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font-sans); }
:root:is(:lang(hi), :lang(ar)) body { line-height: 1.75; }
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
/* Brand kit logo: the horizontal lockup at its 240 px minimum, the simplified icon on phones. */
.brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; padding-block: 6px; }
.brand svg { display: block; height: auto; flex: none; }
.brand .brand__full { width: 240px; }
.brand .brand__icon { width: 48px; display: none; }
@media (max-width: 760px) { .brand .brand__full { display: none; } .brand .brand__icon { display: block; } }
/* Both artworks are in the page; show the one that suits the theme. */
.brand__art { display: contents; }
.brand__art--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__art--light { display: none; }
  :root:not([data-theme="light"]) .brand__art--dark { display: contents; }
}
:root[data-theme="dark"] .brand__art--light { display: none; }
:root[data-theme="dark"] .brand__art--dark { display: contents; }
.top nav { display: flex; align-items: center; gap: 20px; margin-inline-start: auto; }
.top nav a { color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.lang { font: inherit; font-size: 15px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding-block: 6px; padding-inline: 12px 30px; min-height: 40px; min-width: 0;
  /* Our own arrow, so Safari's wider picker doesn't push "Sign in" off a phone screen. */
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 11px 8px; background-position: right 12px center; }
[dir="rtl"] .lang { background-position: left 12px center; }
.top .brand { flex: 0 1 auto; min-width: 0; }
.top nav { flex: none; }
.brand, .btn { white-space: nowrap; }
@media (max-width: 760px) { .top nav .hide-sm { display: none; } }
@media (max-width: 480px) {
  .top .wrap { gap: 8px; }
  .top nav { gap: 8px; }
  .lang { padding-inline: 10px 26px; font-size: 14px; background-position: right 9px center; }
  [dir="rtl"] .lang { background-position: left 9px center; }
  .btn--sm { padding: 0 12px; font-size: 14px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 700 17px/1.2 var(--font-sans); text-decoration: none; border: 1.5px solid transparent; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* Hero */
.hero { padding-block: 56px 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
:root:is(:lang(hi), :lang(ar)) .eyebrow { letter-spacing: normal; text-transform: none; font-size: 15px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
:root:is(:lang(hi), :lang(ar)) :is(h1, h2, h3) { line-height: 1.4; letter-spacing: normal; }
h1 { font-size: clamp(42px, 6.4vw, 76px); white-space: pre-line; }
h2 { font-size: clamp(30px, 3.6vw, 44px); margin-block-end: 24px; }
h3 { font-size: 22px; margin-block-end: 8px; }
.lede { font-size: 19px; color: var(--ink-muted); max-width: 34em; margin: 22px 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { color: var(--ink-subtle); font-size: 15px; margin-top: 18px; }
.hero__art { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow-card, 0 20px 60px rgba(23, 20, 31, .2)); }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16, 14, 21, .6), transparent 55%); }
/* A sample future message on the photo: who it is for, the moment, the date it opens. */
.hero__msg { position: absolute; inset-inline: 20px; bottom: 20px; z-index: 1; display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(27, 27, 31, .25); max-width: 340px; }
.hero__msg-for { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
:root:is(:lang(hi), :lang(ar)) .hero__msg-for { letter-spacing: normal; text-transform: none; font-size: 14px; }
.hero__msg strong { font: 500 24px/1.25 var(--font-display); }
.hero__msg-opens { font-size: 15px; color: var(--ink-muted); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero__art { aspect-ratio: 16 / 11; }
}

/* Sections */
section.block { padding-block: 64px; }
section.block--alt { background: var(--surface); border-block: 1px solid var(--line); }
.guide { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 40px; align-items: center; }
.guide video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 24px; background: #000; }
.guide__cap { font-size: 20px; min-height: 4.6em; margin: 14px 0; }
.guide__step { color: var(--accent); font-weight: 700; margin: 0; }
@media (max-width: 760px) { .guide { grid-template-columns: 1fr; justify-items: center; text-align: center; } .guide video { max-width: 280px; } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.steps p, .cards p { color: var(--ink-muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards article { border-radius: 22px; padding: 26px; background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.privacy ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; max-width: 46em; }
.privacy li { padding-inline-start: 34px; position: relative; font-size: 18px; }
.privacy li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 18px; height: 18px; border-radius: 9px; background: var(--success-bg); box-shadow: inset 0 0 0 5px var(--success-ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 52em; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style-position: inside; }
.faq details p { color: var(--ink-muted); margin: 10px 0 0; }
.cta { text-align: center; padding-block: 72px; background: var(--night); color: var(--on-night); }
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--on-night-muted); margin: 0 0 28px; }
.cta .btn--primary { background: var(--ivory); color: var(--deep-ink); }

/* Long-form page */
.doc { max-width: 46em; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); white-space: normal; margin-bottom: 10px; }
.doc h2 { font-size: 26px; margin: 36px 0 8px; }
.doc p { color: var(--ink-muted); margin: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--ink-muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
