/* Miller & Co Digital
   Tokens, type, layout, motion. One accent, used sparingly. */

:root {
  --bg: #edece7;
  --surface: #f6f5f1;
  --fg: #1f2421;
  --muted: #5d655f;
  --border: rgba(31, 36, 33, 0.14);
  --accent: #3f5646;
  --on-accent: #f6f5f1;
  --focus: #1f2421;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.6rem, 2.4vw, 2rem);
  --step-3: clamp(2rem, 3.4vw, 2.75rem);
  --step-hero: clamp(2.4rem, 5.6vw, 4.5rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--fg);
  color: var(--surface);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(237, 236, 231, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav { display: flex; gap: 1.75rem; font-size: var(--step--1); letter-spacing: 0.01em; }
.site-nav a { text-decoration: none; color: var(--muted); transition: color 150ms var(--ease); }
.site-nav a:hover { color: var(--fg); }

.nav-toggle {
  display: none;
  font: inherit;
  font-size: var(--step--1);
  background: none;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s linear 200ms;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4.5rem, 13vw, 10rem) clamp(4rem, 10vw, 8rem);
}

.hero-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-hero);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-sub {
  margin: 2rem 0 0;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  margin: 2.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-block;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.button:hover { background: #34493b; border-color: #34493b; }
.button:active { transform: scale(0.98); }

.button-quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.button-quiet:hover { background: rgba(31, 36, 33, 0.06); border-color: var(--border); }

.text-link { font-size: 0.95rem; letter-spacing: 0.02em; }

.link-button {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--border);
}

.split {
  display: grid;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
  .section-title { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-body { max-width: 40rem; }
.section-body > :first-child { margin-top: 0; }
.section-body p { margin: 0 0 1.1rem; }
.section-body h3 {
  margin: 2.75rem 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lead {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.note { font-size: var(--step--1); color: var(--muted); }

/* ---------- Stats ---------- */
.stats {
  list-style: none;
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  border-top: 1px solid var(--border);
}
.stats li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  column-gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.stat-figure {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-text { line-height: 1.5; }
.stat-source { margin-top: 0.25rem; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }

@media (max-width: 30rem) {
  .stats li { grid-template-columns: 1fr; }
  .stat-figure { grid-row: auto; margin-bottom: 0.25rem; }
}

/* ---------- Offers ---------- */
.offer {
  margin: 2rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--border);
}
.offer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
}
.section-body .offer-head h3 { margin: 0; }
.price {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.015em;
}
.offer-intro { margin: 0.5rem 0 1.1rem; color: var(--muted); }
.offer-details { margin: 0; }
.offer-details > div { padding: 0.55rem 0; }
.offer-details dt { font-weight: 600; }
.offer-details dd { margin: 0; }

/* ---------- Figures ---------- */
.figure { margin: 2.5rem 0 0; }
.figure img {
  width: 100%;
  border-radius: 6px;
  background: var(--surface);
}
.js .figure img { opacity: 0; transition: opacity 450ms var(--ease); }
.js .figure img.is-loaded { opacity: 1; }
.figure figcaption { margin-top: 0.6rem; font-size: 0.8125rem; color: var(--muted); }

/* ---------- Steps and lists ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.75rem 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 0 1.25rem 3rem;
  border-top: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1.2rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--muted);
}
.section-body .steps h3 { margin: 0 0 0.35rem; }
.steps p { margin: 0; }

.plain-list { margin: 1.25rem 0 1.25rem; padding: 0; list-style: none; }
.plain-list li { padding: 0.9rem 0; border-top: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 1px solid var(--border); }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2.25rem 1.1rem 0;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -0.55rem;
  background: currentColor;
  -webkit-mask: url("/assets/icons/chevron.svg") center / contain no-repeat;
  mask: url("/assets/icons/chevron.svg") center / contain no-repeat;
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0 0 1.25rem; padding-right: 2rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: reveal-answer 240ms var(--ease); }
}
@keyframes reveal-answer {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Form ---------- */
.contact-form { margin-top: 2.25rem; max-width: 34rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: 0.4rem; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.01em; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid rgba(31, 36, 33, 0.35);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(31, 36, 33, 0.14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #8a3a2f; }
.field-error { margin: 0.4rem 0 0; font-size: var(--step--1); color: #8a3a2f; }

.form-status { margin: 1.25rem 0 0; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.form-status.is-error { border-color: #8a3a2f; color: #8a3a2f; }

.todo { background: rgba(138, 58, 47, 0.12); padding: 0 0.25rem; border-radius: 3px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem 3rem; font-size: var(--step--1); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 1rem;
  max-width: 30rem;
  z-index: 60;
  padding: 1.25rem 1.25rem 1.1rem;
  background: rgba(246, 245, 241, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 0.75rem; }
.cookie-banner .cookie-title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.25rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-actions .button { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

@media (min-width: 56rem) {
  .cookie-banner { left: auto; right: var(--gutter); }
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-banner:not([hidden]) { animation: banner-in 260ms var(--ease); }
}
@keyframes banner-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- One orchestrated moment: the hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title, .js .hero-sub, .js .hero-actions {
    opacity: 0;
    transform: translateY(10px);
  }
  .js.is-ready .hero-title, .js.is-ready .hero-sub, .js.is-ready .hero-actions {
    opacity: 1;
    transform: none;
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  }
  .js.is-ready .hero-sub { transition-delay: 90ms; }
  .js.is-ready .hero-actions { transition-delay: 180ms; }
}

/* ---------- Reduced motion: remove all non-essential movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Concept examples ---------- */
.concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.75rem 0 1rem; }
.concept { display: block; text-decoration: none; }
.concept strong { display: block; margin-top: 0.7rem; }
.concept span:last-child { display: block; font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
.concept-art { display: block; aspect-ratio: 4 / 5; border-radius: 6px; border: 1px solid var(--border); position: relative; overflow: hidden; }
.concept-art::before, .concept-art::after { content: ""; position: absolute; left: 12%; right: 12%; border-radius: 3px; background: rgba(255,255,255,0.7); }
.concept-art::before { top: 14%; height: 8%; }
.concept-art::after { top: 30%; height: 38%; background: rgba(255,255,255,0.45); }
.c1 .concept-art { background: linear-gradient(160deg, #c9b79c, #6f5a43); }
.c2 .concept-art { background: linear-gradient(160deg, #b9c7bb, #4f6b59); }
.c3 .concept-art { background: linear-gradient(160deg, #cdb1a6, #7b4a3d); }
.concept:hover strong { text-decoration: underline; }
@media (max-width: 40rem) { .concepts { grid-template-columns: 1fr; } .concept-art { aspect-ratio: 16 / 9; } }

/* ---------- Tick list ---------- */
.tick { list-style: none; margin: 0; padding: 0; }
.tick li { padding: 0.4rem 0 0.4rem 1.4rem; position: relative; }
.tick li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 0.6rem; height: 1px; background: var(--accent); }
