/* Thornvale Group */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0e1a2b;
  --navy-2: #16253a;
  --ink: #18212e;
  --slate: #465265;
  --muted: #687384;
  --paper: #f8f6f1;
  --paper-2: #f0ece3;
  --white: #ffffff;
  --line: #e2ddd2;
  --line-dark: rgba(255, 255, 255, 0.12);
  --accent: #8a5a24;        /* text on light */
  --accent-soft: #c99a5e;   /* text on navy */
  --accent-wash: #f3e9dc;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 6px;
  --section: clamp(72px, 10vw, 128px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 450; }
h2 { font-size: clamp(2rem, 4vw, 2.85rem); }
h3 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.005em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

.skip {
  position: absolute; left: 12px; top: -48px;
  background: var(--navy); color: var(--white);
  padding: 10px 14px; border-radius: var(--radius); z-index: 100;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.lede { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--slate); max-width: 40em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 246, 241, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: 0.005em; line-height: 1; }
.brand-name span { color: var(--muted); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--slate); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--navy); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); }

.menu-btn {
  display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--navy);
}
.menu-btn svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 18px; border-bottom: 0; justify-content: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--radius);
  font: 600 0.95rem/1.2 var(--sans); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .18s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { border-color: rgba(14, 26, 43, 0.22); color: var(--navy); background: transparent; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-light { background: var(--paper); color: var(--navy); }
.btn-light:hover { background: var(--white); }
.nav .btn { color: var(--white); padding: 10px 18px; font-size: 0.9rem; }
.nav .btn:hover { color: var(--white); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(72px, 12vw, 148px) clamp(64px, 9vw, 112px); position: relative; overflow: hidden; }
.hero h1 { max-width: 15em; margin-bottom: 28px; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero .lede { margin-bottom: 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-lines {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: min(560px, 60vw); color: var(--navy); opacity: 0.07; pointer-events: none;
}
@media (max-width: 760px) { .hero-lines { right: -200px; top: 30%; opacity: 0.05; } }

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 96px); padding-top: 28px; gap: 32px;
}
.facts div { font-size: 0.95rem; color: var(--slate); }
.facts strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--navy); margin-bottom: 4px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 6vw, 80px); align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head p { color: var(--slate); font-size: 1.08rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; align-items: start; } }

.tint { background: var(--paper-2); }

/* Practice card */
.practice {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.practice-main { padding: clamp(28px, 5vw, 56px); }
.practice-main h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.practice-main p { color: var(--slate); margin-bottom: 28px; }
.practice-side { background: var(--navy); color: #d9dee6; padding: clamp(28px, 5vw, 56px); }
.practice-side h4 { margin: 0 0 18px; font: 600 0.78rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: var(--accent-wash); padding: 5px 10px; border-radius: 99px; margin-bottom: 20px; }
@media (max-width: 860px) { .practice { grid-template-columns: 1fr; } }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 14px; line-height: 1.5; }
.checks li:last-child { margin-bottom: 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.practice-side .checks li::before { color: var(--accent-soft); }

/* Principles / grid of points */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.point { border-top: 1px solid var(--navy); padding-top: 22px; }
.point .num { font: 500 0.85rem/1 var(--sans); color: var(--accent); letter-spacing: 0.08em; margin-bottom: 18px; display: block; }
.point h3 { margin-bottom: 10px; }
.point p { color: var(--slate); }

/* Feature list (included) */
.features { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.feature { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
.feature:nth-child(even) { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--line); }
.feature svg { width: 28px; height: 28px; color: var(--accent); margin-top: 3px; }
.feature h3 { font-size: 1.2rem; margin-bottom: 6px; }
.feature p { color: var(--slate); font-size: 0.98rem; }
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(even) { padding: 26px 0; border-left: 0; }
}

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 88px 1fr 1.4fr; gap: 24px;
  padding: 30px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); font: 400 2rem/1 var(--serif); color: var(--accent); }
.steps h3 { font-size: 1.3rem; }
.steps p { color: var(--slate); }
.steps .when { display: block; font: 600 0.75rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) {
  .steps li { grid-template-columns: 52px 1fr; gap: 6px 16px; }
  .steps li::before { grid-row: span 2; font-size: 1.6rem; }
}

/* Options */
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.option { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 32px 28px; display: flex; flex-direction: column; }
.option h3 { margin-bottom: 8px; }
.option .for { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 18px; }
.option p { color: var(--slate); font-size: 0.98rem; }
.option.featured { border-color: var(--navy); box-shadow: 0 1px 0 var(--navy), 0 18px 40px -24px rgba(14, 26, 43, 0.35); }
@media (max-width: 860px) { .options { grid-template-columns: 1fr; } }

.note {
  margin-top: 28px; font-size: 0.95rem; color: var(--slate);
  display: flex; gap: 12px; align-items: flex-start;
}
.note svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent); }

/* Problem stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-dark); }
.stat { padding: 32px 28px 8px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.stat strong { display: block; font: 400 clamp(2.4rem, 5vw, 3.4rem)/1 var(--serif); color: var(--white); margin-bottom: 16px; letter-spacing: -0.02em; }
.stat p { color: #b9c2cf; font-size: 0.98rem; }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 28px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line-dark); }
}

/* Dark band */
.dark { background: var(--navy); color: #cdd4de; }
.dark h2, .dark h3 { color: var(--white); }
.dark .eyebrow { color: var(--accent-soft); }
.dark .section-head p, .dark .lede { color: #b9c2cf; }

/* Boundaries */
.bounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bound { border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; }
.bound h3 { font-size: 1.15rem; margin-bottom: 6px; }
.bound p { color: var(--slate); font-size: 0.97rem; }
@media (max-width: 860px) { .bounds { grid-template-columns: 1fr; } }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 80px); }
.about-body p { font-size: 1.1rem; color: var(--slate); }
.about-body p:first-child { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.6rem); line-height: 1.45; color: var(--navy); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* CTA band */
.cta { background: var(--navy); color: #cdd4de; border-radius: 12px; padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta h2 { color: var(--white); margin-bottom: 12px; }
.cta p { color: #b9c2cf; max-width: 34em; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 80px); }
.contact-info dl { margin: 32px 0 0; }
.contact-info dt { font: 600 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contact-info dd { margin: 0 0 26px; font-family: var(--serif); font-size: 1.3rem; color: var(--navy); }
.contact-info dd a { text-decoration-color: var(--accent); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.mail-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(24px, 4vw, 40px); }
.mail-card h3 { margin-bottom: 20px; }
.mail-card .checks li::before { color: var(--accent); }
.mail-card .checks li { color: var(--slate); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.mail-actions .btn-primary { flex: 1 1 auto; justify-content: center; }
.mail-actions .btn-primary svg { width: 18px; height: 18px; }
.mail-actions .btn-primary:hover svg { transform: none; }
@media (max-width: 560px) { .mail-actions .btn { width: 100%; justify-content: center; } .mail-actions .btn-primary { font-size: 0.9rem; padding-inline: 14px; } }
.form-note { font-size: 0.88rem; color: var(--muted); margin: 0; display: flex; gap: 10px; }
.form-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--accent); }

/* Footer */
.site-footer { background: var(--navy); color: #9ea9b8; padding-block: 64px 40px; font-size: 0.92rem; }
.site-footer .brand { color: var(--white); }
.site-footer .brand-name span { color: #8d98a8; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); }
.footer-top p { margin-top: 16px; max-width: 26em; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h4 { margin: 0 0 14px; font: 600 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; color: #cdd4de; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #cdd4de; }
.page-end { margin-top: 0; }

/* Prose (privacy) */
.prose { max-width: 42em; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 0.6em; }
.prose p, .prose li { color: var(--slate); }
.prose ul { padding-left: 1.2em; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }
