@font-face {
  font-family: Playfair;
  src: url("fonts/playfair-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Arimo;
  src: url("fonts/arimo-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Arimo;
  src: url("fonts/arimo-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #fdf8f1;
  --ink: #2e1a0e;
  --gold: #d4a44c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: Arimo, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.shell { width: min(100% - 64px, 1240px); margin-inline: auto; }
.site-header { border-bottom: 1px solid rgba(46, 26, 14, .09); }
.nav-row { min-height: 82px; display: flex; align-items: center; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1.7px;
  white-space: nowrap;
  touch-action: manipulation;
}
.brand img { display: block; object-fit: contain; }
.brand-dot { color: var(--gold); }
.brand:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
main { flex: 1; display: grid; justify-items: center; align-content: start; padding: 24px 24px 48px; }
.hero-title { margin: 0; max-width: 18ch; font-family: Playfair, Georgia, serif; font-size: clamp(48px, 8vw, 88px); font-weight: 700; line-height: 1.08; letter-spacing: -.04em; text-align: center; }
.title-gold { color: var(--gold); }
.splash-subtitle { margin: 10px 0 0; max-width: 32ch; color: #766759; font-size: 15px; line-height: 1.6; text-align: center; }
.recitation-demo { width: min(390px, 100%); margin-top: 24px; }
.recitation-card { scroll-margin-block: 24px; padding: 20px; border-radius: 24px; background: white; box-shadow: 0 2px 7px rgba(46, 26, 14, .12); }
.verse-reference { display: table; margin: 0 0 8px; padding: 9px 14px; border-radius: 24px; background: var(--cream); color: rgba(46, 26, 14, .74); font-size: 17px; font-weight: 700; line-height: 24px; }
.verse-text { margin: 0; font-size: 24px; line-height: 1.5; }
.verse-text .is-recited { color: var(--gold); }
.recitation-actions { display: flex; justify-content: center; margin-bottom: 18px; }
.try-button { min-height: 48px; padding: 12px 26px; border: 0; border-radius: 10px; background: var(--gold); color: var(--ink); font: 700 16px Arimo, Arial, sans-serif; cursor: pointer; }
.try-button:disabled { opacity: .6; cursor: default; }
.recitation-status { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: #766759; }
.recitation-status:empty { display: none; }
.try-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.breathing-lion { display: block; width: min(300px, 78vw); height: auto; margin: -28px 0 -36px; }
.level-progress { display: flex; align-items: center; gap: 12px; width: min(350px, 100%); margin: 0 0 16px; font-weight: 700; }
.level-badge { flex: 0 0 46px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--gold); border-radius: 12px 12px 18px 18px; background: #f3d9a4; color: var(--ink); font-size: 23px; line-height: 1; box-shadow: 0 3px 0 #d4a44c; }
.level-badge small { font-size: 9px; letter-spacing: .1em; }
.level-next { background: transparent; color: #968772; border-color: #daceba; box-shadow: 0 3px 0 #e7dccb; }
.level-details { flex: 1; min-width: 0; }
.level-caption { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 10px; color: #766759; }
.level-caption span:last-child { color: #946b28; white-space: nowrap; }
.level-track { position: relative; height: 16px; padding: 2px; overflow: hidden; border: 1px solid #daceba; border-radius: 5px; background: #e9dfcf; }
.level-track::after { content: ""; position: absolute; inset: 2px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 2px), var(--cream) calc(10% - 2px), var(--cream) 10%); pointer-events: none; }
.level-fill { display: block; width: 50%; height: 100%; border-radius: 2px; background: linear-gradient(#e5bd69, var(--gold)); box-shadow: inset 0 1px 0 #f8dfac; }
.completion-confetti { position: fixed; inset: 0; z-index: 10; overflow: hidden; pointer-events: none; }
.completion-confetti span { position: absolute; left: 50%; top: 40%; width: 9px; height: 14px; border-radius: 2px; }
.levelup-dialog { width: min(430px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 26px 28px 20px; border: 1px solid #e7dccb; border-radius: 24px; background: var(--cream); color: var(--ink); text-align: center; overflow-y: auto; box-shadow: 0 24px 80px #2e1a0e33; }
.levelup-dialog::backdrop { background: #2e1a0e88; }
.levelup-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; color: #766759; font-size: 28px; cursor: pointer; }
.levelup-dialog h2 { margin: 0 0 16px; font-family: Playfair, Georgia, serif; font-size: 38px; line-height: 1.1; }
.levelup-badge { width: 56px; height: 62px; margin: 0 auto 18px; font-size: 30px; }
.levelup-message { margin: 0 auto; max-width: 29ch; font-size: 18px; line-height: 1.45; }
.companion-preview { position: relative; width: min(240px, 100%); aspect-ratio: 1100 / 1413; margin: -12px auto -20px; }
.companion-look { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.companion-look.is-active { opacity: 1; }
.companion-look img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.levelup-unlocks { margin: 8px 0 12px; color: #766759; font-size: 15px; line-height: 1.5; }
.looks-toggle { border: 0; padding: 8px 12px; border-radius: 8px; background: transparent; color: #766759; font: 400 12px Arimo, Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.levelup-dialog button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .companion-look { transition: none; } }
@media (max-width: 760px) {
  .shell { width: min(100% - 36px, 550px); }
  .nav-row { min-height: 70px; }
  .brand { font-size: 24px; }
  .brand img { width: 36px; height: 36px; }
}

/* Navigation and legal pages share the landing page's typography and palette. */
.nav-row { justify-content: space-between; gap: 20px; }
.nav-menu { position: relative; z-index: 20; }
.nav-menu summary { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; border: 0; font-size: 20px; cursor: pointer; list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:focus-visible, .nav-menu a:focus-visible, .legal-page a:focus-visible, .legal-footer a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.nav-menu nav { position: absolute; top: calc(100% + 8px); right: 0; width: 200px; padding: 8px; border: 1px solid #daceba; border-radius: 12px; background: var(--cream); box-shadow: 0 8px 24px #2e1a0e18; }
.nav-menu a { display: block; padding: 13px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.nav-menu a:hover { background: #efe4d4; }
.legal-page { display: block; width: min(100%, 776px); margin-inline: auto; padding-block: 48px 56px; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-page h1 { margin: 0; font-family: Playfair, Georgia, serif; font-size: clamp(36px, 7vw, 54px); line-height: 1.15; letter-spacing: -.03em; }
.legal-page h2 { margin: 30px 0 8px; font-size: 20px; line-height: 1.4; }
.legal-page p { margin: 12px 0; }
.legal-page .legal-date { margin: 14px 0 28px; color: #766759; font-size: 14px; }
.legal-page ul { padding-left: 22px; }
.legal-page li + li { margin-top: 10px; }
.legal-page a, .legal-footer a { color: #79551c; text-underline-offset: 3px; }
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 24px; border-top: 1px solid #2e1a0e17; font-size: 14px; }
