/* Stilworth static landing — styles.css
   Tokens from src/stilworth-theme.ts (light values). Single small file,
   no render-blocking JS. Animations carried over from
   src/styles/globals.css (hero-word, fade-in, lift, grain, reduced-motion). */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans-latin-700-normal.woff2") format("woff2");
}

:root {
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --color-accent: #1b4332;
  --color-background-body: #faf6ef;
  --color-background-muted: #f1ead9;
  --color-surface: #ffffff;
  --color-text-primary: #1e1b18;
  --color-text-secondary: #6b6560;
  --color-text-accent: #1b4332;
  --color-on-accent: #ffffff;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-emphasized: #d4d4d4;
  --radius-card: 16px;
  --radius-page: 16px;
}

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

/* Author display rules would otherwise override the UA [hidden] rule
   (e.g. .sample-form sets display:flex) — keep hidden elements hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-background-body);
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain texture (from globals.css): fixed SVG noise at 4% opacity. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--color-accent);
  color: var(--color-surface);
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.5rem; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 4.5rem); line-height: 1.02; }
h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); }
h3 { font-size: 1.375rem; line-height: 1.25; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--color-text-accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 4rem; }
main .stack { padding-top: 3rem; padding-bottom: 4rem; }

.label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-accent);
  margin: 0;
}
.lede { font-size: 1.1875rem; color: var(--color-text-secondary); }
.supporting { font-size: 0.9375rem; color: var(--color-text-secondary); }
.price { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.875rem, 4vw, 2.5rem); line-height: 1.12; color: var(--color-text-accent); margin: 0; }
.price-sm { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--color-text-accent); margin: 0; }

/* Header — simple sticky bar, not a heavy fixed header. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-background-body);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text-primary);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.site-nav a {
  color: var(--color-text-primary);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}
.site-nav a:hover { color: var(--color-text-accent); text-decoration: underline; }

/* Buttons — tap target >= 44px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: #143627; }
.btn-secondary { background: var(--color-surface); color: var(--color-text-primary); border-color: var(--color-border-emphasized); }
.btn-secondary:hover { border-color: var(--color-text-primary); }
.btn-ghost { background: transparent; color: var(--color-text-primary); }
.btn-ghost:hover { color: var(--color-text-accent); }
.btn-lg { min-height: 52px; padding: 0.875rem 1.75rem; font-size: 1.0625rem; }

/* Hero — asymmetric 2-column grid, collapses to one column on narrow screens. */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.hero-copy p { margin: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-media { border-radius: var(--radius-page); overflow: hidden; aspect-ratio: 16 / 9; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.section { scroll-margin-top: 5rem; }
.section-muted {
  background: var(--color-background-muted);
  border-radius: var(--radius-page);
  padding: 2rem;
}
.section-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.section-head p { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card-muted { background: var(--color-background-muted); }
.card-media { padding: 0; overflow: hidden; }
.card-media .card-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card-media .card-body p { margin: 0; }
.card-media picture { aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin-bottom: 0; }
.card .btn { margin-top: 0.75rem; align-self: flex-start; }
.card-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.card-stack p { margin: 0; }
.card-stack .btn { align-self: flex-start; }
.divider { border: 0; border-top: 1px solid var(--color-border); margin: 0.25rem 0; }

/* Lists */
.pain-list, .fit-list { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pain-list li::marker, .fit-list li::marker { color: var(--color-text-accent); }
.steps { margin: 0; padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.steps li { padding-bottom: 1rem; border-bottom: 1px solid var(--color-border); }
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps li::marker { font-weight: 700; color: var(--color-text-accent); }
.steps strong { display: block; font-size: 1.125rem; margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--color-text-secondary); }

/* Services — rows, not three identical cards. */
.service-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-start; }
.service-main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 0.5rem; }
.service-main p { margin: 0; }
.service-side { display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.service-side .btn { margin-top: 0.5rem; }

/* Sample form */
.sample-wrap { max-width: 720px; margin: 0 auto; text-align: center; }
.sample-wrap .section-head { align-items: center; }
.sample-card { text-align: left; }
.sample-card picture { aspect-ratio: 16 / 9; }
.sample-card img { width: 100%; height: 100%; object-fit: cover; }
.sample-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.sample-form p { margin: 0; }

/* FAQ — native details/summary, works with JS off. First item open by default. */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 0 1.25rem; }
.faq-item summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; font-weight: 400; color: var(--color-text-accent); padding-left: 1rem; }
.faq-item[open ] summary::after { content: "–"; }
.faq-item p { color: var(--color-text-secondary); padding-bottom: 1.25rem; margin: 0; }

/* Final CTA + footer */
.final-cta { text-align: center; }
.final-cta .section-head { align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.site-footer { border-top: 1px solid var(--color-border); padding: 2.5rem 0 3rem; text-align: center; }
.site-footer .container { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--color-text-primary); text-decoration: none; }
.site-footer nav a:hover { color: var(--color-text-accent); text-decoration: underline; }

/* Hero headline word reveal — CSS-only (from globals.css). Transform +
   opacity only, so it can never shift layout. Desktop + motion only. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .stilworth-hero-word {
    display: inline-block;
    animation: stilworth-hero-word 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
@keyframes stilworth-hero-word {
  from { opacity: 0; transform: translateY(110%); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card hover lift (from globals.css) — hover-capable devices only. */
.stilworth-lift { transition: transform 0.15s ease-out; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .stilworth-lift:hover { transform: translateY(-4px); }
}

/* Reduced-motion gate (from globals.css): content appears without motion. */
@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;
  }
  html { scroll-behavior: auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section-muted { padding: 1.25rem; }
  .stack { gap: 3rem; }
  main .stack { padding-top: 2rem; }
  .site-header .container { gap: 0.25rem 1rem; }
}
