/* Palm leaf palette, matching the app (src/theme/tokens.ts in olai-finance). */
:root {
   color-scheme: light dark;
   --font-base: "Akt", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
   --paper: #F8F3E9;
   --paper-deep: #EFE4CF;
   --card: #F0E6D4;
   --ink: #251D14;
   --muted: #6B5B47;
   --gold: #80611A;
   --gold-bright: #B58B30;
   --on-gold: #FFF8EA;
   --line: #DCCDB2;
   --soft-line: rgba(97, 74, 35, 0.13);
   --shadow: rgba(68, 47, 18, 0.16);
   --band: #251D14;
   --band-ink: #F8F3E9;
   --band-muted: #C9BBA3;
   --band-line: rgba(248, 243, 233, 0.14);
}

@media (prefers-color-scheme: dark) {
   :root {
      --paper: #16130F;
      --paper-deep: #100E0B;
      --card: #221D17;
      --ink: #EFE6D4;
      --muted: #A99A80;
      --gold: #C9A45C;
      --gold-bright: #E0BD72;
      --on-gold: #16130F;
      --line: #3A3226;
      --soft-line: rgba(232, 201, 140, 0.12);
      --shadow: rgba(0, 0, 0, 0.5);
      --band: #221D17;
      --band-ink: #EFE6D4;
      --band-muted: #A99A80;
      --band-line: rgba(239, 230, 212, 0.12);
   }
}

* { box-sizing: border-box; }

body {
   margin: 0;
   background: var(--paper);
   color: var(--ink);
   font: 17px/1.6 var(--font-base);
   -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; line-height: 1.05; }
.brand img { display: block; width: 100%; height: 100%; }
.brand small { display: block; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); border-radius: 50%; overflow: hidden; box-shadow: 0 6px 18px var(--shadow); }
nav.site { display: flex; align-items: center; gap: 4px 22px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
nav.site a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--gold); }

main { padding-top: 36px; padding-bottom: 56px; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 20px; line-height: 1.3; margin: 32px 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border-radius: 12px; padding: 4px 20px; margin: 12px 0; }
.card > :first-child { margin-top: 16px; }
.card > :last-child { margin-bottom: 16px; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 4px; }
a { color: var(--gold); }
code { background: var(--card); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

.button {
   display: inline-block;
   background: var(--gold);
   color: var(--on-gold);
   text-decoration: none;
   font-weight: 600;
   padding: 12px 22px;
   border-radius: 999px;
}

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer.site .wrap { padding-top: 16px; padding-bottom: 32px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; text-align: center; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--gold); }

::selection { background: var(--gold); color: var(--on-gold); }
html { scrollbar-color: var(--gold) var(--paper-deep); }

/* Reading pages */
.document-page {
   min-height: 100vh;
   background-image: radial-gradient(circle at 78% 2%, rgba(181, 139, 48, .08), transparent 24rem);
}
.document-page header.site {
   position: sticky;
   top: 0;
   z-index: 50;
   background: color-mix(in srgb, var(--paper) 88%, transparent);
   backdrop-filter: blur(18px);
   border-color: var(--soft-line);
}
.document-nav { border-top: 1px solid var(--soft-line); }
.document-page header.site .document-nav .wrap {
   justify-content: center;
   flex-wrap: nowrap;
   gap: 24px;
   overflow-x: auto;
   scrollbar-width: none;
   padding-top: 9px;
   padding-bottom: 10px;
}
.document-nav .wrap::-webkit-scrollbar { display: none; }
.document-nav a {
   flex: none;
   color: var(--muted);
   font-size: 12px;
   font-weight: 700;
   letter-spacing: .02em;
   text-decoration: none;
}
.document-nav a:hover,
.document-nav a[aria-current="page"] { color: var(--gold); }
.document-page a:focus-visible,
.error-page a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 5px; }
.document-wrap {
   width: min(100% - 40px, 780px);
   margin: 0 auto;
   padding: 82px 0 108px;
}
.document-wrap h1 {
   max-width: 720px;
   font-family: Georgia, "Times New Roman", serif;
   font-size: clamp(48px, 8vw, 72px);
   font-weight: 500;
   line-height: 1;
   letter-spacing: -.035em;
   text-wrap: balance;
   margin: 0 0 24px;
}
.document-wrap .lead {
   max-width: 68ch;
   color: var(--muted);
   font-size: 19px;
   line-height: 1.72;
   margin: 0 0 48px;
}
.document-wrap h2 {
   font-family: Georgia, "Times New Roman", serif;
   font-size: clamp(25px, 4vw, 31px);
   font-weight: 500;
   line-height: 1.18;
   letter-spacing: -.02em;
   text-wrap: balance;
   border-top: 1px solid var(--line);
   padding-top: 34px;
   margin: 52px 0 13px;
}
.document-wrap p,
.document-wrap li { color: var(--muted); }
.document-wrap p { margin: 0 0 18px; }
.document-wrap ul,
.document-wrap ol { margin: 0 0 22px; padding-left: 24px; }
.document-wrap li + li { margin-top: 9px; }
.document-wrap strong { color: var(--ink); }
.document-wrap a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.document-wrap .summary-card {
   background: var(--band);
   color: var(--band-ink);
   border-radius: 16px;
   padding: 28px 32px;
   margin: 0 0 54px;
}
.document-wrap .summary-card h2 {
   color: var(--band-ink);
   border: 0;
   padding: 0;
   margin: 0 0 16px;
}
.document-wrap .summary-card li { color: var(--band-muted); }
.document-wrap .summary-card strong { color: var(--band-ink); }
.document-wrap .summary-card a { color: var(--gold-bright); }
.document-wrap .summary-card > :last-child { margin-bottom: 0; }
.document-wrap > h2:first-of-type { margin-top: 0; }
.support-page .document-wrap > h2:first-of-type,
.delete-page .document-wrap > h2:first-of-type { margin-top: 48px; }
.delete-page .document-wrap .card:not(.summary-card) {
   background: var(--card);
   border-radius: 16px;
   padding: 26px 30px;
   margin: 16px 0 36px;
}
.delete-page .document-wrap .card:not(.summary-card) > :first-child { margin-top: 0; }
.delete-page .document-wrap .card:not(.summary-card) > :last-child { margin-bottom: 0; }
.document-page footer.site { background: var(--band); color: var(--band-muted); border-color: var(--band-line); }
.document-page footer.site .wrap { padding-top: 26px; padding-bottom: 30px; }
.document-page footer.site a { color: var(--band-muted); }
.document-page footer.site a:hover { color: var(--band-ink); }

@media (max-width: 700px) {
   .document-page header.site > .wrap { align-items: center; flex-wrap: nowrap; }
   .document-page nav.site > a:not(.nav-cta) { display: none; }
   .document-page header.site .document-nav .wrap { justify-content: center; gap: 20px; padding-top: 9px; padding-bottom: 10px; }
   .document-wrap { width: min(100% - 40px, 780px); padding: 56px 0 78px; }
   .document-wrap h1 { font-size: clamp(43px, 14vw, 58px); }
   .document-wrap .lead { font-size: 17px; margin-bottom: 38px; }
   .document-wrap h2 { margin-top: 44px; padding-top: 28px; }
   .document-wrap .summary-card,
   .delete-page .document-wrap .card:not(.summary-card) { padding: 23px 22px; }
}

/* Homepage */
.wrap.wide { max-width: 1180px; padding-inline: 28px; }
.home { background-image: radial-gradient(circle at 10% 10%, rgba(181, 139, 48, .08), transparent 25rem); }
.home main { padding: 0; overflow: hidden; }
.home section[id] { scroll-margin-top: 76px; }
.home a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.home .play-button:focus-visible { border-radius: 8px; }
.home nav.site a.nav-cta:focus-visible { border-radius: 999px; }
.home header.site { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(18px); border-color: var(--soft-line); }
.home h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 5vw, 58px); font-weight: 500; line-height: 1.02; margin: 0 0 20px; letter-spacing: -0.035em; text-wrap: balance; }
.home h3 { font-size: 18px; margin: 0 0 7px; letter-spacing: -0.015em; }
nav.site a.nav-cta { color: var(--paper); background: var(--ink); padding: 10px 16px; border-radius: 999px; transition: background-color .2s ease, color .2s ease; }
nav.site a.nav-cta:hover { background: var(--gold); color: var(--on-gold); }
.device-frame img { display: block; width: 100%; height: auto; border-radius: 32px; }
.hero { min-height: 700px; padding: 64px 0 72px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr); gap: 72px; align-items: center; }
.hero h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 7.1vw, 86px); font-weight: 500; line-height: .97; letter-spacing: -.04em; text-wrap: balance; margin: 0 0 28px; max-width: 760px; }
.hero h1 em { color: var(--gold); font-weight: 500; }
.hero-lead { color: var(--muted); font-size: clamp(18px, 2vw, 20px); line-height: 1.7; margin: 0 0 30px; max-width: 600px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 13px; font-weight: 650; margin: 18px 0 0; }
.play-button { display: inline-block; width: 190px; max-width: 100%; border-radius: 8px; line-height: 0; filter: drop-shadow(0 10px 22px var(--shadow)); transition: transform .2s ease, filter .2s ease; }
.play-button:hover { transform: translateY(-2px); filter: drop-shadow(0 14px 28px var(--shadow)); }
.play-button img { display: block; width: 100%; height: auto; }
.hero-phone { position: relative; justify-self: center; width: min(330px, 100%); z-index: 1; }
.device-frame { position: relative; padding: 9px; border-radius: 41px; background: #090806; box-shadow: 0 26px 56px var(--shadow), inset 0 0 0 1px rgba(255,255,255,.12); }
.hero-phone .device-frame { transform: rotate(1.5deg); }

.steps { background: var(--band); color: var(--band-ink); padding: 44px 0 38px; border-block: 1px solid var(--line); }
.steps-head { padding-bottom: 24px; }
.steps-head h2 { color: var(--band-ink); font-size: clamp(28px, 4vw, 40px); max-width: 620px; margin: 0; }
.steps ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding-top: 0; padding-bottom: 0; margin: 0 auto; }
.steps li { margin: 0; color: var(--band-muted); font-size: 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 27px 30px; border: 1px solid var(--band-line); }
.steps li:first-child { border-radius: 16px 0 0 16px; }
.steps li:last-child { border-radius: 0 16px 16px 0; }
.steps li strong { color: var(--band-ink); font-size: 16px; }
.steps li span { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font-family: Georgia, serif; font-size: 18px; font-weight: 700; }

.feature { padding: 88px 0; position: relative; }
.feature + .feature { padding-top: 64px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature-copy p { color: var(--muted); font-size: 18px; line-height: 1.7; margin: 0 0 24px; max-width: 480px; }
.feature-phone { justify-self: center; width: min(310px, 100%); position: relative; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 31px; position: relative; color: var(--ink); font-size: 15px; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: var(--card); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: calc(.2em + 6px); width: 8px; height: 4px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }

.pair { padding: 8px 0 88px; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pair-card { border-top: 1px solid var(--line); padding: 28px 0 0; display: grid; grid-template-columns: 148px 1fr; gap: 28px; align-items: center; }
.pair-card .device-frame { border-radius: 24px; padding: 6px; }
.pair-card .device-frame img { border-radius: 19px; }
.pair-card h3 { font-family: Georgia, serif; font-size: 25px; font-weight: 500; line-height: 1.1; }
.pair-card p { color: var(--muted); margin: 0; font-size: 14px; }

.values { background: var(--paper-deep); border-block: 1px solid var(--line); padding: 84px 0 92px; }
.values-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: end; margin-bottom: 36px; }
.values-heading > p { color: var(--muted); font-size: 18px; line-height: 1.7; margin: 0 0 8px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; row-gap: 30px; }
.value { border-top: 1px solid var(--line); padding-top: 18px; }
.value p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.65; }
.value a { text-underline-offset: 2px; }

.closing { padding: 84px 0 92px; text-align: center; position: relative; }
.closing-mark { width: 64px; height: 64px; margin-bottom: 20px; border-radius: 50%; box-shadow: 0 12px 28px var(--shadow); }
.name-story { color: var(--muted); font-family: Georgia, serif; font-size: 21px; line-height: 1.55; max-width: 570px; margin: 0 auto 30px; }

@media (max-width: 900px) {
   .hero { min-height: 0; padding-top: 58px; }
   .hero-grid, .feature-grid { grid-template-columns: 1fr; gap: 64px; }
   .hero-copy { text-align: center; }
   .hero-lead { margin-left: auto; margin-right: auto; }
   .hero-actions { justify-content: center; }
   .hero-phone { width: min(300px, 66%); }
   .hero-note { text-align: center; }
   .feature { padding: 88px 0 34px; }
   .feature.flip .feature-copy { order: 0; }
   .feature-copy { text-align: center; }
   .feature-copy p { margin-inline: auto; }
   .ticks { width: fit-content; margin-inline: auto; text-align: left; }
   .feature-phone { width: min(280px, 64%); }
   .pair-grid { grid-template-columns: 1fr; }
   .values-heading { grid-template-columns: 1fr; gap: 8px; }
   .value-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 660px) {
   .wrap.wide { padding-inline: 20px; }
   .home header.site .wrap { flex-wrap: nowrap; }
   .home nav.site > a:not(.nav-cta) { display: none; }
   .hero { padding: 46px 0 70px; }
   .hero h1 { font-size: clamp(45px, 14vw, 64px); }
   .hero-actions { flex-direction: column; gap: 10px; }
   .hero-phone { width: min(250px, 70%); margin-top: 10px; }
   .device-frame { padding: 7px; border-radius: 34px; }
   .device-frame img { border-radius: 27px; }
   .steps { padding-top: 38px; }
   .steps ol { grid-template-columns: 1fr; gap: 0; }
   .steps li { padding: 22px 20px; }
   .steps li:first-child { border-radius: 15px 15px 0 0; }
   .steps li:last-child { border-radius: 0 0 15px 15px; }
   .feature-grid { gap: 54px; }
   .pair { padding: 68px 0 88px; }
   .pair-card { grid-template-columns: 108px 1fr; padding-top: 22px; gap: 19px; }
   .pair-card h3 { font-size: 21px; }
   .values { padding: 78px 0; }
   .value-grid { grid-template-columns: 1fr; }
   .value { min-height: 0; }
   .closing { padding: 88px 0; }
}

@media (prefers-reduced-motion: reduce) {
   .play-button, nav.site a { transition: none; }
   .play-button:hover { transform: none; }
}

/* Centred pages: 404. */
.error-page { background: var(--band); color: var(--band-ink); }
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 20px; gap: 8px; }
.center .error-mark { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 20px; border-radius: 50%; overflow: hidden; box-shadow: 0 14px 34px var(--shadow); }
.center .error-mark img { width: 100%; height: 100%; }
.center h1 { max-width: 700px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 9vw, 78px); font-weight: 500; line-height: 1; letter-spacing: -.035em; margin: 0 0 10px; }
.center p { color: var(--band-muted); font-size: 18px; margin: 0 0 22px; max-width: 420px; }
.center .button { background: var(--band-ink); color: var(--band); padding: 13px 22px; border-radius: 14px; }
.center .links { margin-top: 28px; font-size: 14px; display: flex; gap: 7px 20px; flex-wrap: wrap; justify-content: center; }
.center .links a { color: var(--band-muted); text-underline-offset: 3px; }
.center .links a:hover { color: var(--band-ink); }
