/* LEVREN public site — visual system.
   Extends the product's own language (see levren-1.0.0 css/app.css):
   warm paper, ink, bronze accent, pine for depth. Serif display, system sans.
   Rules: no decorative gradients, no glassmorphism, no gamification, no noise.
   Motion is purposeful and reduced-motion safe. */

:root {
  --paper: #faf7f0;
  --paper-deep: #f4efe2;
  --card: #fffdf8;
  --ink: #2b251c;
  --ink-soft: #453c2d;
  --muted: #6f675a;
  --faint: #6f675a; /* same floor as --muted: decorative "faint" must still pass 4.5:1 */
  --line: #e4dcc9;
  --line-soft: #efe8d6;
  --accent: #8a5a24;
  --accent-ink: #6d4517;
  --accent-wash: #f7ecd4;
  --pine: #1d3a2f;
  --pine-deep: #142a22;
  --pine-ink: #f2ecdd;
  --pine-muted: #b9b09a;
  --ok: #3e7a4c;
  --warn: #8f5d10;
  --danger: #b3352b;
  --focus: #2f6fed;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 4px 14px rgba(60, 45, 20, .06);
  --shadow-lg: 0 2px 4px rgba(60, 45, 20, .08), 0 12px 32px rgba(60, 45, 20, .10);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 68rem;
  --measure-text: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.22; margin: 0 0 .6rem; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent-ink); text-underline-offset: .14em; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .6rem 1.1rem;
  border-radius: 0 0 8px 0; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.prose { max-width: var(--measure-text); }
.prose-wide { max-width: 56rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 247, 240, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--measure); margin: 0 auto;
  padding: .65rem clamp(1.1rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 2rem; height: 2rem; border-radius: 7px; display: block; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a.nav-link { text-decoration: none; color: var(--ink-soft); font-size: .98rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.site-nav a.nav-link:hover { color: var(--ink); border-bottom-color: var(--accent); }
.site-nav a.nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.header-cta { flex-shrink: 0; }
.menu-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer; font-family: var(--sans);
  font-weight: 600; font-size: 1rem; line-height: 1.3;
  padding: .8rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--ink-soft); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn-bronze { background: var(--accent); border-color: var(--accent); }
.btn-bronze:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); background: var(--card); color: var(--ink); }
.btn-sm { padding: .55rem 1.15rem; font-size: .92rem; }
.btn-lg { padding: 1rem 2.1rem; font-size: 1.08rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; margin: 1.4rem 0; }
.microcopy { font-size: .88rem; color: var(--muted); }
.microcopy strong { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent); padding-bottom: .25rem;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--ink-soft); max-width: 34rem; }
.hero-figure { margin: 0; }
.hero-figure figcaption { font-size: .82rem; color: var(--faint); margin-top: .6rem; text-align: center; }

/* ---------- sections ---------- */
.section { padding: clamp(2.8rem, 6vw, 5rem) 0; }
.section-tight { padding: clamp(2rem, 4vw, 3.2rem) 0; }
.section-head { max-width: var(--measure-text); margin-bottom: 2.2rem; }
.section-head .kicker { font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .7rem; }
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }

/* moments — editorial list, not cards */
.moments { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.moments li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.moments .m-cost { font-family: var(--serif); font-size: 1.5rem; color: var(--accent-ink); white-space: nowrap; }
.moments .m-cost small { display: block; font-family: var(--sans); font-size: .78rem; color: var(--faint); font-weight: 400; }
.moments p { margin: 0; max-width: 40rem; }
.moments .m-src { display: block; font-size: .8rem; color: var(--faint); margin-top: .35rem; }

/* steps — numbered editorial */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 3.2rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-size: 2rem; color: var(--accent);
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
.steps svg { margin-bottom: .8rem; }

/* compare — folders vs levren */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.compare > div { padding: 1.8rem; }
.compare > div:first-child { border-right: 1px solid var(--line); background: var(--paper-deep); }
.compare h3 { font-size: 1.05rem; margin-bottom: .8rem; }
.compare ul { margin: 0; padding: 0; list-style: none; }
.compare li { padding: .45rem 0 .45rem 1.6rem; position: relative; font-size: .97rem; color: var(--ink-soft); }
.compare .old li::before { content: "×"; position: absolute; left: 0; color: var(--faint); font-weight: 700; }
.compare .new li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.compare .new { border-top: 3px solid var(--accent); }

/* dark survivability section */
.section-dark { background: var(--pine); color: var(--pine-ink); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .kicker { color: #d8c48f; }
.section-dark p { color: var(--pine-muted); }
.section-dark strong, .section-dark .bright { color: #fff; }
.section-dark a { color: #ecd9a8; }
.section-dark a:hover { color: #fff; }
.keep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0; }
.keep-card {
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 1.3rem 1.2rem;
}
.keep-card h3 { font-size: 1rem; margin-bottom: .35rem; font-family: var(--sans); font-weight: 700; }
.keep-card p { font-size: .9rem; margin: 0; color: var(--pine-muted); }
.keep-card .file-icon { font-family: var(--mono); font-size: .78rem; color: #d8c48f; display: block; margin-bottom: .6rem; }
.survive-list { list-style: none; margin: 1.5rem 0; padding: 0; max-width: 44rem; }
.survive-list li { padding: .7rem 0 .7rem 2rem; position: relative; border-bottom: 1px solid rgba(255,255,255,.12); }
.survive-list li::before { content: "✓"; position: absolute; left: 0; color: #d8c48f; font-weight: 700; }
.survive-list li:last-child { border-bottom: none; }

/* pricing */
.price-block {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: clamp(1.8rem, 4vw, 3rem);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.price-figure { font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.2rem); line-height: 1; margin: 0; }
.price-figure small { font-size: 1.1rem; font-family: var(--sans); color: var(--muted); display: block; margin-top: .4rem; }
.price-includes { list-style: none; margin: 1.2rem 0; padding: 0; }
.price-includes li { padding: .5rem 0 .5rem 1.7rem; position: relative; border-bottom: 1px solid var(--line-soft); font-size: .98rem; }
.price-includes li:last-child { border-bottom: none; }
.price-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.checkout-promise { background: var(--paper-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-top: 1.5rem; }
.checkout-promise h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.checkout-promise ul { margin: 0; padding: 0; list-style: none; font-size: .93rem; color: var(--ink-soft); }
.checkout-promise li { padding: .32rem 0; }
.checkout-promise li strong { color: var(--ink); }

/* faq */
.faq { max-width: var(--measure-text); }
.faq details { border-bottom: 1px solid var(--line); padding: 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem .5rem 1.15rem 0; position: relative;
  font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 1.05rem;
  font-size: 1.4rem; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--accent-ink); }
.faq .faq-body { padding: 0 0 1.3rem; color: var(--ink-soft); max-width: 42rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* feature rows (how-it-works) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(2rem, 4vw, 3rem) 0; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: none; }
.feature-row.flip > .feature-copy { order: 2; }
.feature-row.flip > .feature-fig { order: 1; }
.feature-copy h2 { margin-bottom: .7rem; }
.feature-copy p { color: var(--ink-soft); }
.feature-fig { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.8rem; box-shadow: var(--shadow); }
.feature-fig figcaption { font-size: .82rem; color: var(--faint); margin-top: 1rem; text-align: center; }

/* spec tables */
.spec-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .97rem; }
.spec-table th, .spec-table td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* legal pages */
.legal { max-width: 46rem; }
.legal h2 { margin-top: 2.4rem; font-size: 1.45rem; }
.legal h3 { margin-top: 1.8rem; }
.legal .draft-note {
  background: var(--accent-wash); border: 1px solid #e8d9b5; border-radius: var(--radius);
  padding: 1rem 1.2rem; font-size: .92rem; margin: 1.5rem 0; color: var(--ink-soft);
}
.legal .lawyer-flag { font-family: var(--mono); font-size: .78rem; background: #f1ebdc; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .45rem; color: var(--accent-ink); white-space: nowrap; }
.legal-meta { color: var(--faint); font-size: .88rem; margin-bottom: 2rem; }

/* support */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
.support-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.support-card h3 { margin-bottom: .6rem; }
.support-card ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: .97rem; }
.support-card li { margin-bottom: .4rem; }
.contact-box { background: var(--pine); color: var(--pine-ink); border-radius: 14px; padding: clamp(1.8rem, 4vw, 2.6rem); margin: 2.5rem 0; }
.contact-box h2 { color: #fff; }
.contact-box p { color: var(--pine-muted); }
.contact-box a { color: #ecd9a8; }

/* closing cta */
.closing { text-align: center; padding: clamp(3.5rem, 8vw, 6rem) 0; }
.closing h2 { max-width: 36rem; margin: 0 auto 1rem; }
.closing p { color: var(--muted); max-width: 32rem; margin: 0 auto 1.8rem; }

/* footer */
.site-footer { background: var(--pine-deep); color: var(--pine-muted); margin-top: 2rem; }
.footer-inner { max-width: var(--measure); margin: 0 auto; padding: 3rem clamp(1.1rem, 4vw, 2.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand p { font-size: .9rem; max-width: 20rem; }
.footer-brand .brand-name { color: #fff; }
.footer-grid h3 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-grid a { color: var(--pine-muted); text-decoration: none; font-size: .93rem; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem; display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; font-size: .82rem; color: #b0a897; }
.footer-base p { margin: 0; max-width: 46rem; }

/* page hero (interior pages) */
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-hero h1 { max-width: 44rem; }
.page-hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 40rem; }

/* reveal animation (purposeful, subtle) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* diagram captions */
figcaption .fig-label { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }

/* notice boxes */
.notice { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 1rem 1.2rem; margin: 1.5rem 0; font-size: .95rem; color: var(--ink-soft); }
.notice strong { color: var(--ink); }

/* 404 */
.page-404 { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.page-404 .code { font-family: var(--serif); font-size: clamp(4rem, 12vw, 7rem); color: var(--line); line-height: 1; margin-bottom: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 34rem; }
  .keep-grid { grid-template-columns: 1fr 1fr; }
  .price-block { grid-template-columns: 1fr; }
  .feature-row, .feature-row.flip > .feature-copy { grid-template-columns: 1fr; }
  .feature-row.flip > .feature-copy { order: 1; }
  .feature-row.flip > .feature-fig { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); margin: 0;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 0; }
  .site-nav li { border-top: 1px solid var(--line-soft); }
  .site-nav li:first-child { border-top: none; }
  .site-nav a.nav-link { display: block; padding: .9rem clamp(1.1rem, 4vw, 2.5rem); border-bottom: none; }
  .site-nav a.nav-link[aria-current="page"] { border-bottom: none; background: var(--paper-deep); }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 2.75rem; height: 2.75rem;
    background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink);
  }
  .header-cta { display: none; }
  .header-cta.mobile-show { display: block; }
  .moments li { grid-template-columns: 1fr; gap: .3rem; }
  .moments .m-cost small { display: inline; margin-left: .5rem; }
  .compare { grid-template-columns: 1fr; }
  .compare > div:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  .keep-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .btn-row .btn { flex: 1 1 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .btn-row, .closing { display: none; }
  body { background: #fff; font-size: 11pt; }
  .section, .section-dark { padding: 1.5rem 0; }
  .section-dark { background: #fff; color: #000; }
}
