/*
 * Mirrors the app's "ortholife" theme (mobile/src/core/theme/tokens.ts):
 * a photographic backdrop under a warm dark scrim, translucent cards with
 * thin white borders, white type, and a white pill for the primary action.
 * Values below are the same rgba() tokens the app ships.
 *
 * Dark-only on purpose — the app has one warm dark theme and does not follow
 * the system, so the site should not either.
 *
 * No web fonts: loading them from a third-party CDN would leak visitor IPs to
 * that CDN, which the privacy policy on this very site says we do not do.
 */
:root {
  --scrim: rgba(31, 28, 25, 0.45);
  --surface: rgba(50, 44, 35, 0.55);
  --surface-solid: #241c15;
  --border: rgba(255, 255, 255, 0.25);
  --border-soft: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-strong: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.65);
  --amber: #d9a05b;
  --copper: #8c5a2a;
  --base: #140d0b;

  --max: 1060px;
  --radius: 18px;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', 'Noto Naskh Arabic', 'Segoe UI Historic', sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman',
    'Noto Naskh Arabic', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  background-color: var(--base);
  -webkit-font-smoothing: antialiased;
}

/*
 * The photo is a fixed layer rather than a background-attachment, which iOS
 * Safari does not honour, and the scrim rides on top of it.
 */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--scrim), rgba(20, 13, 11, 0.86) 65%, #140d0b),
    url('/assets/cathedral.jpg');
  background-size: cover, cover;
  background-position: center top, center top;
}

/* Arabic reads better slightly larger and looser. */
html[dir='rtl'] body {
  font-size: 18px;
  line-height: 1.9;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--text);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  background: var(--surface-solid);
  padding: 10px 16px;
  border-radius: 10px;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ── Header ─────────────────────────────────────────────────────── */
header.site {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(20, 13, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 13px;
  padding-bottom: 13px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

nav.main {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-inline-start: auto;
  align-items: center;
}

nav.main a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}

nav.main a:hover {
  color: var(--text);
}

.langs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.langs a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.5;
}

.langs a:hover {
  color: var(--text);
}

.langs a[aria-current='true'] {
  color: #1a1108;
  background: var(--text);
  border-color: var(--text);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding: 84px 0 70px;
  text-align: center;
}

.hero img.mark {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  border: 1px solid var(--border);
  margin-bottom: 26px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--amber);
  margin: 0 0 14px;
}

html[dir='rtl'] .eyebrow,
html[dir='rtl'] .brand {
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 66px);
  margin: 0 0 8px;
  line-height: 1.08;
}

.hero .tagline {
  font-family: var(--serif);
  font-size: clamp(19px, 3.6vw, 25px);
  color: var(--text-strong);
  margin: 0 0 22px;
}

.hero p.lead {
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--text-strong);
  font-size: 18px;
}

.stores {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Matches controlStyles.selector(): transparent fill, white hairline border. */
.store {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  cursor: default;
}

.store svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.hero .note {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Sections ───────────────────────────────────────────────────── */
section {
  padding: 62px 0;
  border-top: 1px solid var(--border-soft);
}

section h2 {
  font-size: clamp(27px, 4.5vw, 36px);
  margin: 0 0 10px;
}

section .intro {
  color: var(--text-strong);
  max-width: 640px;
  margin: 0 0 34px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card svg {
  width: 24px;
  height: 24px;
  color: var(--amber);
  margin-bottom: 12px;
  display: block;
}

html[dir='rtl'] .card svg {
  margin-inline-start: 0;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── Premium ────────────────────────────────────────────────────── */
.premium-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

ul.benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}

ul.benefits li {
  padding-inline-start: 26px;
  position: relative;
  color: var(--text-strong);
}

ul.benefits li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.premium-note {
  color: var(--text-muted);
  font-size: 15px;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
  margin: 0 0 22px;
}

.free h3 {
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  color: var(--amber);
}

html[dir='rtl'] .free h3 {
  letter-spacing: 0;
}

.free p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── Legal / support pages ──────────────────────────────────────── */
.page {
  padding: 58px 0 18px;
}

.page h1 {
  font-size: clamp(31px, 5.5vw, 44px);
  margin: 0 0 12px;
}

.page .lead {
  color: var(--text-strong);
  font-size: 18px;
  max-width: 640px;
  margin: 0;
}

.doc section {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0;
}

.doc h2 {
  font-size: 21px;
  margin: 0 0 10px;
}

.doc p,
.doc li {
  color: var(--text-strong);
}

.doc p {
  margin: 0 0 12px;
}

.doc ul {
  margin: 0 0 12px;
  padding-inline-start: 22px;
}

.doc li {
  margin-bottom: 7px;
}

.doc a {
  color: var(--amber);
  text-decoration-color: rgba(217, 160, 91, 0.5);
}

.doc a:hover {
  text-decoration-color: var(--amber);
}

.doc .addr {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.75;
}

/* Matches controlStyles.primaryButton() in the ortholife variant. */
.mailbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: #1a1108;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 22px;
}

.mailbox:hover {
  background: rgba(255, 255, 255, 0.88);
  color: #1a1108;
}

.updated {
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 22px;
  margin-top: 8px;
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 54px;
  color: var(--text-muted);
  font-size: 14px;
}

footer.site .cols {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

footer.site nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

footer.site nav a {
  color: var(--text-strong);
  text-decoration: none;
}

footer.site nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

footer.site .legal {
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
  line-height: 1.85;
}

@media (max-width: 640px) {
  .hero {
    padding: 56px 0 46px;
  }

  section {
    padding: 46px 0;
  }

  nav.main {
    gap: 14px;
  }

  .premium-box,
  .card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
