/* ==========================================================================
   Rihla — website stylesheet

   Ported from the app's "Luxor Archetype" design system (DESIGN.md,
   src/theme.ts): obsidian ground, charcoal surfaces, gold as the only accent,
   Bodoni Moda for display and Hanken Grotesk for text.

   Two rules hold everywhere in this file.

   1. LOGICAL PROPERTIES ONLY. No `left`, `right`, `margin-left`, `padding-right`
      or `text-align: left`. Direction comes from `dir` on <html>, and every
      rule below lays out correctly in both without being written twice. The
      only direction-aware rules in the file are the three at the very bottom,
      each of which changes a glyph rather than a layout.

   2. ARABIC IS NOT LATIN WITH A DIFFERENT FONT. Letter-spacing breaks the
      joins between Arabic letters, and uppercasing does nothing to a script
      with no case, so both are switched off for Arabic rather than inherited.
      Arabic also sets taller, so its leading is raised — the same 1.15
      multiplier the app applies.
   ========================================================================== */

:root {
  /* Ground and surfaces */
  --obsidian: #0a0a0a;
  --charcoal: #121212;
  --surface: #161616;
  --surface-high: #1c1b1b;

  /* Brand */
  --gold: #d4af37;
  --gold-bright: #f2ca50;
  --brass: #c5a059;
  --copper: #b87333;

  /* Text */
  --text: #e5e2e1;
  --text-strong: #f5f1e8;
  --text-muted: #a49b88;
  --text-faint: #7d7566;

  /* Lines */
  --hairline: rgba(197, 160, 89, 0.16);
  --hairline-strong: rgba(197, 160, 89, 0.32);

  /* Type */
  --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --leading: 1.65;
  --leading-tight: 1.25;

  /* Tracking is a variable because Arabic must not inherit it. */
  --tracking-label: 0.14em;
  --tracking-display: -0.01em;
  --label-transform: uppercase;

  /* Rhythm — 4px base, like the app */
  --gap-sm: 0.5rem;
  --gap-md: 1rem;
  --gap-lg: 2rem;
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --wrap: 68rem;
  --wrap-pad: clamp(1.25rem, 5vw, 2.5rem);

  --radius: 4px;
  --radius-lg: 12px;

  color-scheme: dark;
}

html[lang="ar"] {
  --font-display: "Noto Kufi Arabic", "Bodoni Moda", Georgia, serif;
  --font-text: "Noto Sans Arabic", "Hanken Grotesk", system-ui, sans-serif;
  --leading: 1.85;
  --leading-tight: 1.5;
  --tracking-label: 0;
  --tracking-display: 0;
  --label-transform: none;
}

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

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

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

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A granite tooth over the whole page — the "faint low-opacity noise texture"
   the design system calls for on the base layer. Fixed and inert. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--gold-bright);
  text-decoration-color: rgba(242, 202, 80, 0.35);
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

.eyebrow {
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: var(--label-transform);
  color: var(--brass);
  margin: 0;
}

.section {
  padding-block: var(--section-y);
}

.section-raised {
  background: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, var(--charcoal) 12%, var(--charcoal) 88%, rgba(18, 18, 18, 0) 100%);
  border-block: 1px solid var(--hairline);
}

.section-head {
  max-width: 44rem;
  margin-block-end: clamp(2rem, 5vw, 3.25rem);
}

.section-head h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
}

.section-lede {
  margin-block-start: 0.9rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

.section-note {
  margin-block-start: 1.75rem;
  color: var(--text-faint);
  font-size: 0.9rem;
  max-width: 40rem;
}

/* ------------------------------------------------------- mixed-script runs --

   A run marked with its own `lang` inside a page of the other language. Latin
   tracking separates the letters Arabic joins, and uppercasing does nothing to
   Arabic at all, so an Arabic run opts out of both — and each run is set in the
   face that actually has glyphs for it rather than falling through to whatever
   the OS supplies.                                                           */

html[lang="en"] [lang="ar"] {
  font-family: "Noto Kufi Arabic", var(--font-text);
  letter-spacing: normal;
  text-transform: none;
}

html[lang="ar"] [lang="en"] {
  font-family: "Hanken Grotesk", var(--font-text);
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: var(--tracking-label);
  text-transform: var(--label-transform);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #2a1b00;
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn-quiet {
  background: transparent;
  border-color: var(--copper);
  color: #e0b078;
}

.btn-quiet:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
}

.play-badge {
  display: inline-flex;
}

.play-badge img {
  height: 60px;
  width: auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md);
  margin-block-start: 2rem;
}

.cta-row-center {
  justify-content: center;
}

.cta-note {
  margin-block-start: 1rem;
  color: var(--text-faint);
  font-size: 0.88rem;
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
  border-block-end: 1px solid var(--hairline-strong);
  padding-block-end: 2px;
}

.link-arrow::after {
  content: " \2192";
}

.link-arrow:hover {
  border-color: var(--gold-bright);
}

/* ---------------------------------------------------------------- header -- */

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 1rem;
  z-index: 100;
  background: var(--gold);
  color: #2a1b00;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  inset-block-start: 1rem;
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-block-end: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: var(--tracking-label);
  text-transform: var(--label-transform);
}

.nav-desktop {
  display: flex;
  gap: 1.75rem;
  margin-inline-end: auto;
}

.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-block-end: 1px solid transparent;
}

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

.nav-desktop a[aria-current="page"] {
  color: var(--gold-bright);
  border-block-end-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  margin-inline-start: auto;
}

.lang-switch {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  white-space: nowrap;
}

.lang-switch:hover {
  color: var(--gold-bright);
  border-color: var(--hairline-strong);
}

/* Disclosure-based mobile menu: native, keyboard-operable, and needs no script.
   The site ships zero JavaScript, which is also why /app-ads.txt can never be
   shadowed by a client-side route. */
.nav-mobile {
  display: none;
  position: relative;
}

.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.nav-mobile > summary::-webkit-details-marker {
  display: none;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: var(--text);
  content: "";
}

.menu-bars {
  position: relative;
}

.menu-bars::before {
  position: absolute;
  inset-block-start: -5px;
  inset-inline-start: 0;
}

.menu-bars::after {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: 0;
}

.nav-mobile-panel {
  position: absolute;
  inset-block-start: calc(100% + 0.6rem);
  inset-inline-end: 0;
  min-width: 13rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(42, 27, 0, 0.45);
}

.nav-mobile-panel a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.nav-mobile-panel a:hover,
.nav-mobile-panel a[aria-current="page"] {
  background: var(--surface-high);
  color: var(--gold-bright);
}

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

.hero {
  padding-block: clamp(2.75rem, 7vw, 4.5rem) clamp(2.75rem, 6vw, 4rem);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(212, 175, 55, 0.13) 0%, rgba(212, 175, 55, 0) 60%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.9), rgba(10, 10, 10, 0));
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.35rem, 1.5rem + 3.6vw, 3.85rem);
  margin-block-start: 1rem;
}

.hero-lede {
  margin-block-start: 1.4rem;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero-caption {
  color: var(--text-faint);
  font-size: 0.85rem;
  text-align: center;
  max-width: 22rem;
}

/* --------------------------------------------------------- phone mockups -- */

.phone {
  width: min(100%, 18.5rem);
  padding: 0.55rem;
  background: linear-gradient(160deg, #2a2a2a 0%, #101010 45%, #232323 100%);
  border-radius: 2.1rem;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 70px rgba(42, 27, 0, 0.45), 0 2px 0 rgba(255, 255, 255, 0.05) inset;
}

.phone-screen {
  width: 100%;
  height: auto;
  border-radius: 1.6rem;
  background: var(--obsidian);
  display: block;
}

/* -------------------------------------------------------------- features -- */

.feature-grid {
  display: grid;
  /* Two columns, not auto-fit: there are four features, and auto-fit resolves
     to three across at this width, stranding the fourth beside an empty cell. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature {
  background: var(--charcoal);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.feature h3 {
  font-size: 1.3rem;
}

.feature p:last-child {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.feature-grid-tight .feature {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

/* ----------------------------------------------------------------- stats -- */

.stat-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-inline-start: 1.1rem;
  border-inline-start: 2px solid var(--hairline-strong);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ----------------------------------------------------------------- steps -- */

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.28);
  line-height: 1;
}

.step h3 {
  font-size: 1.2rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ----------------------------------------------------------- screenshots -- */

.shot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 4rem);
  justify-content: center;
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: 20rem;
}

.shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
}

.shot figcaption strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-strong);
  font-weight: 600;
}

.shot figcaption span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------- closing -- */

.prose-narrow {
  max-width: 40rem;
}

.prose-narrow p + p {
  margin-block-start: 1.1rem;
}

.closing {
  padding-block: var(--section-y);
  background: radial-gradient(90% 120% at 50% 120%, rgba(212, 175, 55, 0.14) 0%, rgba(212, 175, 55, 0) 65%);
  border-block-start: 1px solid var(--hairline);
}

.closing-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.closing h2 {
  font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.6rem);
}

.closing p {
  color: var(--text-muted);
  max-width: 34rem;
}

/* ----------------------------------------------------------- prose pages -- */

.prose-page {
  padding-block: clamp(3rem, 7vw, 5rem) var(--section-y);
}

.prose-page .wrap {
  max-width: 46rem;
}

.page-head {
  padding-block-end: 1.75rem;
  margin-block-end: 2.25rem;
  border-block-end: 1px solid var(--hairline);
}

.page-head h1 {
  font-size: clamp(2rem, 1.4rem + 2.8vw, 3rem);
  margin-block-start: 0.6rem;
}

.page-lede {
  margin-block-start: 1.1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.prose p + p {
  margin-block-start: 1.25rem;
}

.prose p {
  color: var(--text);
}

.prose-page section {
  margin-block-start: clamp(2.5rem, 6vw, 3.5rem);
}

.prose-page section > h2 {
  font-size: 1.5rem;
  margin-block-end: 1rem;
}

.prose-page section > p + p {
  margin-block-start: 1rem;
}

.numbered-list,
.tick-list {
  margin: 1.1rem 0 0;
  padding-inline-start: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: var(--text);
}

.tick-list {
  list-style: none;
  padding-inline-start: 0;
}

.tick-list li {
  padding-inline-start: 1.4rem;
  position: relative;
}

.tick-list li::before {
  content: "\2014";
  position: absolute;
  inset-inline-start: 0;
  color: var(--brass);
}

.callout {
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}

.callout h2 {
  font-size: 1.25rem;
  margin-block-end: 0.6rem;
}

.contact-card {
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2rem);
}

.contact-email {
  margin-block-start: 0.75rem;
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.35rem);
  font-weight: 600;
  word-break: break-word;
}

.topic-list {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 1.5rem;
}

.topic dt {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--text-strong);
  margin-block-end: 0.4rem;
}

.topic dd {
  margin: 0;
  color: var(--text-muted);
}

.made-by p {
  color: var(--text-muted);
  max-width: 40rem;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-block-start: clamp(2.5rem, 6vw, 3.5rem);
  padding-block-start: 1.75rem;
  border-block-start: 1px solid var(--hairline);
}

.principles h2,
.support-topics h2,
.support-include h2,
.made-by h2 {
  font-size: 1.5rem;
  margin-block-end: 1.25rem;
}

/* ------------------------------------------------------- the legal document

   The privacy policy is lifted verbatim out of privacy.html, so these rules
   have to style markup this file does not control: h2/h3, ul, hr, .callout,
   code and a trailing <footer>. Kept together so it is obvious that changing
   them is styling someone else's document.                                   */

.language-notice {
  background: var(--charcoal);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  margin-block-end: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-body {
  color: var(--text);
}

.legal-body header {
  padding-block-end: 1.5rem;
  margin-block-end: 1.5rem;
  border-block-end: 1px solid var(--hairline);
}

.legal-body h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.7rem);
}

.legal-body .updated {
  margin-block-start: 0.6rem;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.legal-body h2 {
  font-size: 1.4rem;
  margin-block: 2.5rem 0.9rem;
}

.legal-body h3 {
  font-family: var(--font-text);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-block: 1.75rem 0.6rem;
}

.legal-body p {
  margin-block-end: 1rem;
}

.legal-body .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.legal-body ul {
  margin: 0 0 1.1rem;
  padding-inline-start: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-body strong {
  color: var(--text-strong);
}

.legal-body hr {
  border: none;
  border-block-start: 1px solid var(--hairline);
  margin-block: 2.5rem;
}

.legal-body code {
  background: var(--surface-high);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.1em 0.4em;
  font-size: 0.9em;
}

.legal-body footer {
  margin-block-start: 2.5rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--hairline);
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  border-block-start: 1px solid var(--hairline);
  background: var(--charcoal);
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.75rem;
  margin-block-start: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-mark {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
}

.footer-blurb {
  margin-block-start: 0.9rem;
  color: var(--text-faint);
  font-size: 0.92rem;
  max-width: 20rem;
}

.footer-nav h2 {
  font-family: var(--font-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: var(--label-transform);
  color: var(--brass);
  margin-block-end: 0.9rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.footer-nav a:hover {
  color: var(--gold-bright);
}

.footer-legal {
  margin-block-start: clamp(2rem, 5vw, 3rem);
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer-legal p {
  margin: 0;
}

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

@media (max-width: 60rem) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  /* Copy before mockup on narrow screens: the headline is what the page is
     for, and a phone-sized image above it pushes it under the fold. */
  .hero-visual {
    margin-block-start: 2.5rem;
  }

  .footer-inner {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  }
}

@media (max-width: 48rem) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav-desktop,
  .nav-get,
  .brand-tagline {
    display: none;
  }

  .nav-mobile {
    display: block;
  }

  .header-inner {
    gap: var(--gap-md);
  }
}

/* ------------------------------------------------- direction-aware glyphs --

   The only rules in this file that know about direction, and none of them
   moves a box: the arrow after a link and the dash before a list item point
   the way the script runs.                                                   */

[dir="rtl"] .link-arrow::after {
  content: " \2190";
}

[dir="rtl"] .legal-body,
[dir="rtl"] [dir="ltr"] {
  text-align: start;
}

/* The policy is an English document embedded in an Arabic page; it carries its
   own dir="ltr", so its list bullets and indents must follow English, not the
   page. */
[dir="rtl"] .legal-body ul {
  padding-inline-start: 1.4rem;
}
