/* PRAI website. Tokens from prai-kit/design/BRAND.md: a church at midnight, warm dark, one source of light. */

@font-face { font-family: 'Cormorant Garamond'; src: url(/assets/fonts/cormorant-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url(/assets/fonts/cormorant-500i.woff2) format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url(/assets/fonts/cormorant-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(/assets/fonts/manrope-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(/assets/fonts/manrope-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(/assets/fonts/manrope-600.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --noapte: #0B0907;
  --naos: #1A1510;
  --border: #2E261D;
  --border-strong: #3A3127;
  --aur: #D9B26F;
  --lumina: #FFF2D6;
  --text: #EFE6D6;
  --cenusa: #B5A893;
  --cenusa-stinsa: #9A8E7D;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: 16px;
  --topbar: 64px;
  color-scheme: dark;
}

@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

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

html {
  background: var(--noapte);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--noapte);
  color: var(--text);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }

::selection { background: rgba(217, 178, 111, .32); color: var(--lumina); }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--aur); color: var(--noapte); font-weight: 600; text-decoration: none;
  transition: top .4s var(--ease);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */

.overline {
  font: 600 13px/1.4 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--aur);
}

h1 {
  font: 500 clamp(48px, 8.4vw, 92px)/1 var(--serif);
  color: var(--lumina);
  letter-spacing: -.012em;
  text-wrap: balance;
}

h2 {
  font: 500 clamp(36px, 5.2vw, 60px)/1.06 var(--serif);
  color: var(--lumina);
  letter-spacing: -.006em;
  text-wrap: balance;
}

h3 { color: var(--lumina); }

.lede {
  max-width: 34em;
  margin: 22px auto 0;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text);
  text-wrap: pretty;
}

.section-lede {
  max-width: 36em;
  margin: 18px auto 0;
  font-size: 18px;
  color: var(--cenusa);
  text-wrap: pretty;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease);
}
.btn-gold {
  background: var(--aur); color: var(--noapte);
  box-shadow: inset 0 1px 0 rgba(255, 242, 214, .45), 0 14px 44px -10px rgba(217, 178, 111, .6);
}
.btn-ghost {
  background: rgba(26, 21, 16, .55); color: var(--text); border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: rgba(217, 178, 111, .7); color: var(--lumina); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn.is-static { cursor: default; user-select: none; }

/* ---------- glass, the app's opaque glass ---------- */

.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(38, 31, 23, .78), rgba(20, 16, 12, .82));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 242, 214, .07), 0 30px 60px -30px rgba(0, 0, 0, .7);
}

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

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--topbar);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  border-bottom: 1px solid transparent;
  transition: background-color .6s var(--ease), border-color .6s var(--ease), backdrop-filter .6s var(--ease);
}
.topbar.is-solid {
  background: rgba(11, 9, 7, .78);
  border-bottom-color: rgba(46, 38, 29, .85);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; text-decoration: none;
  font: 600 22px/1 var(--serif); letter-spacing: .14em; color: var(--lumina);
}
.brand img { width: 32px; height: 32px; }

.nav { display: none; gap: 30px; }
.nav a {
  font: 500 14px/1 var(--sans); color: var(--cenusa); text-decoration: none;
  padding: 14px 0; transition: color .5s var(--ease);
}
.nav a:hover { color: var(--lumina); }
@media (min-width: 900px) { .nav { display: flex; } }

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

.hero {
  position: relative;
  padding: calc(var(--topbar) + env(safe-area-inset-top)) 0 clamp(72px, 10vw, 120px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    url(/assets/img/grain.png),
    radial-gradient(52% 40% at 50% 30%, rgba(132, 92, 42, .34), transparent 72%),
    radial-gradient(90% 50% at 50% 100%, rgba(70, 50, 26, .3), transparent 70%);
}

.hero-light {
  position: relative;
  width: min(660px, 116vw, 66svh);
  aspect-ratio: 1;
  margin: 0 0 calc(min(660px, 116vw, 66svh) * -0.25);
  left: 50%; transform: translateX(-50%);
}
.hero-light canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero-light.is-live canvas { opacity: 1; }
.hero-fallback {
  position: absolute; left: 50%; top: 50%;
  width: 108.7%; height: 108.7%; max-width: none;
  transform: translate(-50%, -50%);
  transition: opacity 1.2s var(--ease);
  animation: breathe 6s ease-in-out infinite;
}
.hero-light.is-live .hero-fallback { opacity: 0; }

.hero-copy { position: relative; }
.hero-copy h1 { margin-top: 18px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 22px; font-size: 14px; color: var(--cenusa-stinsa); letter-spacing: .02em; }

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(.94); opacity: .86; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 1; }
}

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

.section { position: relative; padding: clamp(96px, 13vw, 168px) 0; }
.section-head { text-align: center; max-width: 780px; margin: 0 auto clamp(48px, 7vw, 84px); }
.section-head h2 { margin-top: 16px; }

/* how */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { padding: 30px 28px 32px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(217, 178, 111, .55);
  box-shadow: 0 0 24px -4px rgba(217, 178, 111, .45);
  font: 500 24px/1 var(--serif); color: var(--aur);
}
.step h3 { margin-top: 22px; font: 600 25px/1.2 var(--serif); }
.step p { margin-top: 10px; color: var(--cenusa); }

/* inside: the phone follows the chapter in the middle of the screen */

.inside::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    url(/assets/img/grain.png),
    radial-gradient(60% 40% at 72% 40%, rgba(110, 76, 34, .22), transparent 70%);
}

.story { display: grid; }
.story-steps { display: grid; gap: clamp(88px, 16vw, 120px); }
.chapter { text-align: center; }
.chapter-copy { max-width: 30em; margin: 0 auto; }
.chapter h3 { margin-top: 14px; font: 500 clamp(32px, 4.2vw, 46px)/1.08 var(--serif); text-wrap: balance; }
.chapter p:not(.overline) { margin-top: 16px; font-size: 18px; color: var(--cenusa); text-wrap: pretty; }

.phone {
  position: relative;
  aspect-ratio: 1206 / 2622;
  border-radius: 12.4% / 5.7%;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(222, 186, 122, .5),
    0 0 90px -10px rgba(150, 108, 52, .5),
    0 50px 90px -30px rgba(0, 0, 0, .9);
}
.phone::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(155deg, rgba(255, 242, 214, .07), transparent 32%);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-inline { width: min(300px, 76vw); margin: 0 auto 40px; }

.story-stage { display: none; }

@media (min-width: 960px) {
  .story { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(48px, 7vw, 110px); align-items: start; }
  .story-steps { gap: 0; }
  .chapter { min-height: 82vh; display: flex; align-items: center; text-align: left; }
  .chapter-copy { margin: 0; max-width: 28em; }
  .phone-inline { display: none; }
  .js .chapter .chapter-copy { opacity: .28; transition: opacity .8s var(--ease); }
  .js .chapter.is-active .chapter-copy { opacity: 1; }

  .story-stage {
    display: block;
    position: sticky;
    top: max(calc(var(--topbar) + 24px), calc(50vh - min(40vh, 380px) + 20px));
    margin-top: calc(41vh - min(40vh, 380px));
  }
  .phone-stage { height: min(80vh, 760px); width: auto; }
  .phone-stage img {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity .8s var(--ease);
  }
  .phone-stage img.is-active { opacity: 1; }
}

/* trust */

.trust-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1040px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 30px 28px 32px; }
.icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(217, 178, 111, .45);
  background: radial-gradient(circle at 50% 40%, rgba(217, 178, 111, .16), transparent 70%);
  color: var(--aur);
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-top: 22px; font: 600 25px/1.2 var(--serif); }
.card p { margin-top: 10px; color: var(--cenusa); }

/* pricing */

.pricing::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(/assets/img/grain.png), radial-gradient(50% 45% at 50% 58%, rgba(120, 84, 38, .22), transparent 72%);
}
.plans { display: grid; gap: 16px; max-width: 880px; margin: 0 auto; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 20px; } }
.plan { padding: 34px 32px 36px; }
.plan h3 { font: 600 26px/1.2 var(--serif); }
.plan-best {
  border-color: rgba(217, 178, 111, .75);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 214, .1),
    0 0 0 4px rgba(217, 178, 111, .08),
    0 24px 90px -24px rgba(217, 178, 111, .42);
}
.plan-badge {
  position: absolute; top: 30px; right: 28px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--aur); color: var(--noapte);
  font: 600 13px/1 var(--sans); letter-spacing: .02em;
}
.price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.amount { font: 500 clamp(56px, 7vw, 68px)/1 var(--serif); color: var(--lumina); letter-spacing: -.01em; }
.per { font-size: 16px; color: var(--cenusa); }
.plan-note { margin-top: 14px; color: var(--cenusa); }
.fine {
  max-width: 54em; margin: 32px auto 0; text-align: center;
  font-size: 14px; line-height: 1.65; color: var(--cenusa-stinsa);
}
.fine a { color: var(--cenusa); text-underline-offset: 3px; }

/* faq */

.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 24px 52px 24px 0;
  font: 600 clamp(21px, 2.4vw, 25px)/1.3 var(--serif); color: var(--lumina);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before,
.faq-list summary::after {
  content: ''; position: absolute; right: 8px; top: 50%;
  width: 16px; height: 1.5px; background: var(--aur);
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0); opacity: 0; }
.faq-list details p { padding: 0 52px 26px 0; color: var(--cenusa); }
.faq-list a { color: var(--aur); text-underline-offset: 3px; }

/* final */

.final { text-align: center; padding-bottom: clamp(110px, 14vw, 180px); }
.final::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(/assets/img/grain.png), radial-gradient(42% 46% at 50% 34%, rgba(132, 92, 42, .3), transparent 72%);
}
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final-mark { width: 180px; height: 180px; animation: breathe-plain 6s ease-in-out infinite; }
.final h2 { margin-top: 18px; }
.final .btn { margin-top: 36px; }

@keyframes breathe-plain {
  0%, 100% { transform: scale(.94); opacity: .86; }
  50% { transform: scale(1.04); opacity: 1; }
}

/* reveal */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2), .trust-grid .reveal:nth-child(3n+2), .plans .reveal:nth-child(2) { transition-delay: .12s; }
.steps .reveal:nth-child(3), .trust-grid .reveal:nth-child(3n) { transition-delay: .24s; }

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

.footer { border-top: 1px solid var(--border); padding: 56px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 48px; }
.footer-tagline { margin-top: 10px; font: italic 500 20px/1.3 var(--serif); color: var(--cenusa); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a {
  display: inline-block; padding: 12px 0;
  font-size: 15px; color: var(--text); text-decoration: none; transition: color .5s var(--ease);
}
.footer-links a:hover { color: var(--aur); }
.footer-note { margin-top: 36px; display: grid; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--cenusa-stinsa); }
.footer-legal { color: var(--cenusa-stinsa); }

/* ---------- documents: privacy, terms, support, delete ---------- */

.doc .topbar { position: sticky; top: 0; }
.doc-main { padding: clamp(40px, 7vw, 80px) 0 clamp(80px, 10vw, 120px); }
.langs { display: flex; gap: 4px; }
.langs a {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px;
  font: 600 13px/1 var(--sans); letter-spacing: .12em; color: var(--cenusa-stinsa); text-decoration: none;
  border-radius: 999px; transition: color .5s var(--ease);
}
.langs a:hover { color: var(--lumina); }
.langs a[aria-current='page'] { color: var(--aur); }

.draft {
  margin-bottom: 36px; padding: 16px 20px;
  border: 1px solid rgba(217, 178, 111, .4); border-radius: 16px;
  background: rgba(217, 178, 111, .07);
  font-size: 15px; color: var(--lumina);
}

.prose { font-size: 17px; line-height: 1.7; }
.prose h1 { font: 500 clamp(42px, 6.4vw, 60px)/1.05 var(--serif); color: var(--lumina); }
.prose h2 { margin: 52px 0 0; font: 600 clamp(25px, 3vw, 29px)/1.25 var(--serif); color: var(--lumina); }
.prose p, .prose ul, .prose ol, .prose .table-wrap { margin: 16px 0 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--aur); }
.prose strong { color: var(--lumina); font-weight: 600; }
.prose a { color: var(--aur); text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.prose .updated { margin-top: 14px; font-size: 15px; color: var(--cenusa); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: rgba(26, 21, 16, .5); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; color: var(--lumina); background: rgba(46, 38, 29, .35); }
.prose tr:last-child td { border-bottom: 0; }
mark.todo {
  padding: 1px 6px; border-radius: 6px;
  background: rgba(217, 178, 111, .16); color: var(--aur);
  outline: 1px dashed rgba(217, 178, 111, .55);
}

.notfound { text-align: center; }
.notfound-mark { margin: 24px auto 8px; animation: breathe-plain 6s ease-in-out infinite; }
.notfound h1 { font: 500 clamp(40px, 6vw, 56px)/1.05 var(--serif); color: var(--lumina); }
.notfound p { margin-top: 14px; color: var(--cenusa); }
.notfound a { color: var(--aur); }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* tables become one small card per row on narrow screens */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  .prose table, .prose thead, .prose tbody, .prose tr, .prose td { display: block; min-width: 0; width: auto; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr {
    margin-top: 12px; padding: 16px 18px;
    border: 1px solid var(--border); border-radius: 16px; background: rgba(26, 21, 16, .55);
  }
  .prose td { padding: 0; border: 0; }
  .prose td + td { margin-top: 12px; }
  .prose td:first-child { font-weight: 600; color: var(--lumina); }
  .prose td + td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--aur);
  }
}
