/* ==========================================================================
   Tink House — design tokens
   Change brand colours here once a final logo/palette is decided.
   ========================================================================== */
:root {
  color-scheme: light;

  --bg: #FAF8F4;          /* warm off-white */
  --bg-alt: #F2EEE6;      /* section band */
  --surface: #FFFFFF;
  --ink: #14233A;         /* deep navy */
  --ink-soft: #4B5869;
  --line: #E3DDD2;
  --accent: #2F6B57;      /* eucalyptus green */
  --accent-strong: #24584A;
  --accent-soft: #E4EEE8;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.85rem); }
h3 { font-size: 1.3rem; }

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--ink);
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}
.site-nav .nav-cta:hover { background: var(--ink); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  margin-right: -8px;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 16px; text-align: center; border-bottom: 1px solid var(--ink); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-block: clamp(72px, 12vw, 152px) clamp(72px, 10vw, 128px);
}
.hero h1 { max-width: 15ch; }
.lede {
  margin-top: 28px;
  max-width: 40rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  margin-bottom: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.section h2 { max-width: 22ch; }
.section-intro {
  margin-top: 20px;
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

/* Opportunity — stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 56px 0 0;
  border-top: 1px solid var(--ink);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 12px;
  padding: 28px 28px 28px 0;
}
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat dd sup { font-family: var(--font-body); font-size: 0.8rem; vertical-align: top; margin-left: 4px; }
.stat dd sup a { text-decoration: none; }
.stat dt { color: var(--ink-soft); max-width: 22ch; }

.footnote {
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 24px 0; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Problem */
.problem-list {
  list-style: none;
  counter-reset: problem;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.problem-list li {
  counter-increment: problem;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.problem-list li::before {
  content: "0" counter(problem);
  display: block;
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}
.problem-list h3 { margin-bottom: 12px; }
.problem-list p { color: var(--ink-soft); }

@media (max-width: 860px) {
  .problem-list { grid-template-columns: 1fr; gap: 32px; }
}

/* Why now */
.narrow-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.narrow-grid h2 { margin-bottom: 24px; }
.narrow-grid p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.125rem; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.compare-col { padding: 28px; }
.compare-col h3 {
  margin-bottom: 18px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.compare-col ul { list-style: none; margin: 0; padding: 0; }
.compare-col li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.975rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.compare-now { background: var(--ink); }
.compare-now h3 { color: #A9D3C1; }
.compare-now li { color: #fff; border-top-color: rgba(255, 255, 255, .14); }

@media (max-width: 860px) {
  .narrow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .compare { grid-template-columns: 1fr; }
}

/* What we're building — cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg {
  width: 24px; height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-tag {
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card h3 { margin-bottom: 12px; }
.card p:last-child { color: var(--ink-soft); }

@media (max-width: 920px) {
  .cards { grid-template-columns: 1fr; max-width: 560px; }
}

/* Principles */
.principles {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 56px;
}
.principles li {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.principles h3 { margin-bottom: 8px; }
.principles p { color: var(--ink-soft); max-width: 34rem; }

@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
}

/* Stage */
.stage > * { max-width: 820px; }
.stage h2 { margin-bottom: 24px; }
.stage p:not(.eyebrow) { font-size: clamp(1.125rem, 1.8vw, 1.35rem); color: var(--ink-soft); }

/* Contact */
.contact { text-align: center; }
.contact h2 { margin-inline: auto; max-width: 18ch; }
.contact p { color: var(--ink-soft); font-size: 1.125rem; margin-top: 16px; }
.contact-email {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); }
.contact .contact-place { margin-top: 20px; font-size: 0.95rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-top p { margin: 0; }
.brand-small { font-size: 1.05rem; }

.sources {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.sources h2 {
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sources ol { margin: 0; padding-left: 1.25em; max-width: 60rem; }
.sources li:target { color: var(--ink); background: var(--accent-soft); border-radius: 4px; }
