/* kaelvano.com: one stylesheet.
   Palette from the app (ADR-012, STYLE_GUIDE §4). Light: Alabaster page, Midnight
   Slate ink, deep champagne #7A6136 for accent text (5.5:1). Dark: Midnight Slate
   page, Alabaster ink, Champagne #C5AB80 (8.1:1). Champagne is never text on
   Alabaster (2.1:1). System fonts only: SF for text, New York for headings. */

:root {
  --page: #F8F7F4;
  --surface: #FFFFFF;
  --text: #0F172A;
  --secondary: #3D4759;
  --tertiary: #5A6476;
  --accent: #7A6136;
  --fill: #C5AB80;
  --on-fill: #0F172A;
  --edge: #7A6136;
  --line: #E2DDD3;
  --line-strong: #CFC7B8;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 24px 48px -24px rgba(15, 23, 42, .28);
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --prose: 680px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0F172A;
    --surface: #162033;
    --text: #F8F7F4;
    --secondary: #B7BFCC;
    --tertiary: #98A2B3;
    --accent: #C5AB80;
    --edge: #C5AB80;
    --line: #233049;
    --line-strong: #34425E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 1em; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }

/* Masthead */
.masthead {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.lockup img { width: 22px; height: auto; }
.wordmark { font: 600 15px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; margin-right: -.32em; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--secondary); text-decoration: none; font-size: 16px;
  padding: 10px 10px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
@media (max-width: 479px) {
  .wordmark { font-size: 14px; letter-spacing: .26em; margin-right: -.26em; }
  .nav a { padding: 10px 8px; }
  .nav a.nav-wide { display: none; }
}
@media (max-width: 330px) { .wordmark { letter-spacing: .18em; margin-right: -.18em; } }

/* Type roles */
.eyebrow {
  font: 600 13px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.lead { font-size: 20px; line-height: 1.55; color: var(--secondary); max-width: 34em; }
@media (min-width: 720px) { .lead { font-size: 22px; } }

/* Hero */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero-in { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 8vw, 84px); font-weight: 400; letter-spacing: -.015em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { margin-top: 24px; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 32px;
  padding: 10px 18px; border: 1px solid var(--edge); border-radius: 999px;
  font-size: 16px; color: var(--text);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fill); box-shadow: 0 0 0 1px var(--edge); }
.hero-meta { margin-top: 16px; font-size: 16px; color: var(--tertiary); }
.hero-art { position: relative; display: grid; justify-items: center; }
.device {
  border-radius: 28px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line-strong); background: var(--surface);
}
.device-phone { width: min(300px, 72vw); border-radius: 36px; }
@media (min-width: 960px) {
  .hero { padding: 88px 0 104px; }
  .hero-in { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .hero-art { justify-items: end; }
  .device-phone { width: 320px; }
}

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .section { padding: 112px 0; } }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 400; }
.section-head .lead { margin-top: 20px; }

/* Feature grid */
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.feature { background: var(--page); padding: 32px 28px 36px; }
.feature-n { font: 500 14px/1 var(--serif); font-style: italic; color: var(--accent); }
.feature h3 { font-size: 24px; margin: 14px 0 10px; }
.feature p { font-size: 17px; color: var(--secondary); }

/* Split: picture and words */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split-rev .split-art { order: 2; }
}
.split h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 400; }
.split .lead { margin-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 28px; color: var(--secondary); font-size: 17px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 1px; background: var(--accent);
}
.ticks strong { color: var(--text); font-weight: 600; }
.device-mac { border-radius: 14px; }
.split-art { display: grid; justify-items: center; }

/* Promise band */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts { display: grid; gap: 32px; margin-top: 8px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { border-top: 1px solid var(--edge); padding-top: 20px; }
.fact h3 { font-size: 22px; margin-bottom: 8px; }
.fact p { font-size: 17px; color: var(--secondary); }

.quiet { margin-top: 40px; font-size: 17px; color: var(--secondary); max-width: var(--prose); }

/* Closing */
.closing { text-align: center; padding: 96px 0 104px; }
.closing img { width: 48px; margin: 0 auto 28px; }
.closing h2 { font-size: clamp(34px, 5vw, 52px); font-weight: 400; font-style: italic; }
.closing .lead { margin: 20px auto 0; }
.closing .status { margin-top: 32px; }

/* Document pages: privacy, terms, support, FAQ */
.doc-head { padding: 64px 0 40px; }
.doc-head h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 400; }
.doc-head .lead { margin-top: 20px; }
.doc-meta { margin-top: 20px; font-size: 15px; color: var(--tertiary); }
.doc { max-width: var(--prose); padding-bottom: 96px; }
.doc h2 { font-size: 28px; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { font: 600 18px/1.4 var(--sans); margin: 32px 0 8px; }
.doc p, .doc li { color: var(--secondary); }
.doc strong { color: var(--text); font-weight: 600; }
.doc ul { padding-left: 1.2em; margin: 1em 0; }
.doc li + li { margin-top: .5em; }
.doc li::marker { color: var(--accent); }
.summary {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--edge);
  border-radius: 4px; padding: 24px 28px; margin-bottom: 8px;
}
.summary p { color: var(--text); }
.toc { margin: 32px 0 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 32px; font-size: 16px; }
.toc li { break-inside: avoid; padding: 4px 0; }
.toc a { color: var(--secondary); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* Support: contact cells (family FAQ component, Kaelvano tokens) */
.contact-cells {
  display: grid; border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  margin-top: 8px;
}
.contact-cell { padding: 28px; }
.contact-cell + .contact-cell { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .contact-cells { grid-template-columns: 1fr 1fr; }
  .contact-cell + .contact-cell { border-top: 0; border-left: 1px solid var(--line); }
}
.contact-label { font: 600 13px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.contact-cell h2 { font: 500 22px/1.3 var(--serif); margin: 0 0 10px; padding: 0; border: 0; }
.contact-cell p { font-size: 17px; color: var(--secondary); }

/* FAQ */
.faq-index { margin: 0 0 16px; }
.faq-index ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.faq-index a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 16px;
}
.faq-index a:hover { border-color: var(--edge); color: var(--accent); }
.faq-sec h2 { font-size: 28px; margin: 56px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg);
  transition: transform .2s ease;
}
.qa[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa-h { font: 500 19px/1.45 var(--sans); color: var(--text); margin: 0; display: inline; }
.qa summary:hover .qa-h { color: var(--accent); }
.qa-a { padding: 0 0 24px; }
.qa-a p, .qa-a li { color: var(--secondary); font-size: 17px; }
.qa-a ul { padding-left: 1.2em; margin: .8em 0 0; }

/* Colophon */
.colophon { border-top: 1px solid var(--line); padding: 56px 0 48px; font-size: 15px; color: var(--tertiary); }
.colophon-in { display: grid; gap: 28px; }
.colophon-tag { margin-top: 12px; font: italic 17px/1.4 var(--serif); color: var(--secondary); }
.colophon-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.colophon-nav a { color: var(--secondary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; font-size: 16px; }
.colophon-nav a:hover, .colophon-nav a[aria-current] { color: var(--text); text-decoration: underline; }
.colophon-legal { max-width: 52em; }
.colophon-legal a { color: inherit; }
@media (min-width: 960px) {
  .colophon-in { grid-template-columns: 1fr auto; align-items: start; }
  .colophon-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.after-summary { margin-top: 24px; }

@media (max-width: 479px) {
  .status { font-size: 15px; padding: 9px 16px; white-space: nowrap; }
}
@media (max-width: 359px) {
  .status { white-space: normal; border-radius: 12px; }
}
.fine { margin-top: 16px; font-size: 15px; color: var(--tertiary); }
