/* FieldReply VS-01 landing page styles
   Design reference: docs/work/plans/VS-01/shape-brief.md
   Architecture: ADR-0011 (Cal.com booking + webhook to Sheet)
   UVP: ADR-0007 (No-CRM white-glove missed lead recovery)
*/

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, blockquote, figure { margin: 0; padding: 0; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }

/* ==========================================================================
   Tokens (light theme defaults)
   ========================================================================== */

:root {
  /* Color: Committed strategy, burnt orange / clay primary */
  --color-primary: oklch(0.52 0.15 50);
  --color-primary-hover: oklch(0.46 0.16 50);
  --color-primary-soft: oklch(0.95 0.03 50);
  --color-bg: oklch(0.97 0.01 70);
  --color-bg-elevated: oklch(0.99 0.005 70);
  --color-text: oklch(0.20 0.02 50);
  --color-text-muted: oklch(0.45 0.02 50);
  --color-border: oklch(0.85 0.02 50);
  --color-cta-text: oklch(0.99 0.005 50);
  --color-quote-attribution: oklch(0.50 0.03 50);
  --color-note-bg: oklch(0.96 0.04 80);
  --color-shadow-primary: oklch(0.46 0.16 50 / 0.28);

  /* Typography: Bricolage Grotesque single family */
  --font-family: 'Bricolage Grotesque', Georgia, serif;
  --line-height-body: 1.6;
  --line-height-tight: 1.1;
  --measure: 65ch;

  /* Type scale, ratio greater than 1.25 between steps */
  --fs-h1: clamp(2.5rem, 6vw + 1rem, 4.75rem);
  --fs-h2: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.375rem, 1.5vw + 1rem, 1.75rem);
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem);
  --fs-small: 0.9375rem;

  /* Weight */
  --fw-regular: 400;
  --fw-medium: 600;
  --fw-cta: 700;
  --fw-display: 800;

  /* Spacing: vary, do not normalize */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-section: clamp(4rem, 8vw, 7rem);

  /* Layout */
  --column-narrow: min(40rem, 92vw);
  --column-default: min(44rem, 92vw);
  --column-wide: min(56rem, 92vw);

  /* Motion */
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 240ms;
}

/* Dark theme: auto via system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: oklch(0.68 0.16 55);
    --color-primary-hover: oklch(0.74 0.16 55);
    --color-primary-soft: oklch(0.25 0.04 50);
    --color-bg: oklch(0.16 0.015 50);
    --color-bg-elevated: oklch(0.20 0.02 50);
    --color-text: oklch(0.93 0.02 70);
    --color-text-muted: oklch(0.68 0.025 50);
    --color-border: oklch(0.30 0.02 50);
    --color-cta-text: oklch(0.15 0.015 50);
    --color-quote-attribution: oklch(0.65 0.03 50);
    --color-note-bg: oklch(0.22 0.04 80);
    --color-shadow-primary: oklch(0.28 0.12 50 / 0.35);
  }
}

/* Reduced motion: kill animations and transitions globally */
@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;
  }
}

/* ==========================================================================
   Base typography
   ========================================================================== */

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: "ss01", "kern";
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--line-height-tight);
  font-weight: var(--fw-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.15;
  font-weight: var(--fw-display);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
}

p, li { max-width: var(--measure); text-wrap: pretty; }

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

a:hover { color: var(--color-primary); }

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

strong { font-weight: var(--fw-medium); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.wordmark {
  font-weight: var(--fw-display);
  font-size: 1.125rem;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--color-text);
  white-space: nowrap;
}

.wordmark span { color: var(--color-primary); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-cta-text);
  text-decoration: none;
  font-weight: var(--fw-cta);
  font-size: var(--fs-body);
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  transition: background var(--duration) var(--easing),
              border-color var(--duration) var(--easing),
              box-shadow var(--duration) var(--easing);
  white-space: nowrap;
  min-height: 44px;
  line-height: 1.4;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-cta-text);
  box-shadow: 0 6px 20px var(--color-shadow-primary);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--color-text);
  outline-offset: 3px;
}

.btn-primary-large {
  padding: 1.125rem 2rem;
  font-size: 1.125rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: var(--space-section) var(--space-md);
  max-width: 64rem;
  margin-inline: auto;
}

.hero h1 {
  margin-bottom: var(--space-md);
  max-width: 24ch;
}

.hero .subhead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 42rem;
}

.hero .cta-row {
  display: flex;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.hero .cta-fineprint {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

/* ==========================================================================
   Sections
   ========================================================================== */

section.tier {
  padding: var(--space-section) var(--space-md);
  border-top: 1px solid var(--color-border);
}

section.tier > .tier-content {
  width: var(--column-default);
  margin-inline: auto;
}

section.tier h2 { margin-bottom: var(--space-md); }
section.tier .tier-content > p { margin-bottom: var(--space-sm); }
section.tier .tier-content > p:last-child { margin-bottom: 0; }

.tier-lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.tier-note {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Skeptic-respect tier (text bullets, not card grid)
   ========================================================================== */

ul.wont-do {
  list-style: none;
  margin-top: var(--space-md);
}

ul.wont-do li {
  font-size: 1.125rem;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  max-width: 50rem;
}

ul.wont-do li strong {
  color: var(--color-primary);
  font-weight: var(--fw-medium);
}

ul.wont-do li:last-child { border-bottom: none; }

/* ==========================================================================
   Proof tier (pull quotes, not cards)
   ========================================================================== */

.proof-tier .pull-quote {
  margin-block: var(--space-lg);
}

.proof-tier .pull-quote q {
  display: block;
  font-size: clamp(1.5rem, 2vw + 0.875rem, 2rem);
  line-height: 1.3;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.012em;
  quotes: '\201C' '\201D';
}

.proof-tier .pull-quote q::before {
  content: open-quote;
  color: var(--color-primary);
}

.proof-tier .pull-quote q::after {
  content: close-quote;
  color: var(--color-primary);
}

.proof-tier .attribution {
  display: block;
  font-size: var(--fs-small);
  color: var(--color-quote-attribution);
  font-style: normal;
}

.proof-tier .stat-line {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 1.0625rem;
}

/* ==========================================================================
   How it works (numbered steps, not card grid)
   ========================================================================== */

ol.steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

ol.steps li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: minmax(3rem, 4.5rem) 1fr;
  gap: var(--space-md);
  align-items: start;
  max-width: 48rem;
}

ol.steps li::before {
  content: counter(steps);
  font-size: clamp(2.75rem, 4vw + 0.5rem, 3.75rem);
  font-weight: var(--fw-display);
  color: var(--color-primary);
  line-height: 0.9;
  letter-spacing: -0.05em;
  grid-row: 1 / span 2;
  align-self: start;
}

ol.steps li h3,
ol.steps li p {
  grid-column: 2;
}

ol.steps li h3 { margin-bottom: var(--space-xs); }

/* ==========================================================================
   Pricing (plain prose)
   ========================================================================== */

.pricing-tier { margin-block: var(--space-md); }

.pricing-tier .price-line {
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.625rem);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-sm);
  line-height: 1.35;
}

.pricing-tier .price-line .amount {
  color: var(--color-primary);
  font-weight: var(--fw-display);
}

.pricing-tier .term-detail {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.pricing-tier .standard-note {
  margin-top: var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Final CTA
   ========================================================================== */

.final-cta {
  padding: var(--space-section) var(--space-md);
  text-align: left;
  border-top: 1px solid var(--color-border);
  background: var(--color-primary-soft);
}

.final-cta .tier-content {
  width: var(--column-default);
  margin-inline: auto;
}

.final-cta .reinforcer {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: center;
}

.site-footer .footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  flex-wrap: wrap;
}

.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-primary); }

/* ==========================================================================
   Booking page
   ========================================================================== */

.booking-intro {
  padding: var(--space-section) var(--space-md) var(--space-md);
  width: var(--column-default);
  margin-inline: auto;
}

.booking-intro h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
}

.booking-intro p {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
}

.calcom-embed {
  padding: 0 var(--space-md) var(--space-section);
  width: var(--column-wide);
  margin-inline: auto;
}

#cal-inline {
  width: 100%;
  min-height: 600px;
  background: var(--color-bg-elevated);
  border-radius: 8px;
}

.calcom-fallback {
  padding: var(--space-md);
  background: var(--color-primary-soft);
  border-radius: 8px;
  margin-top: var(--space-md);
  font-size: 1.0625rem;
}

.calcom-fallback p { margin-bottom: var(--space-sm); }
.calcom-fallback p:last-child { margin-bottom: 0; }

.booking-email-fallback {
  margin-top: var(--space-md);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  text-align: center;
}

/* ==========================================================================
   Thanks page
   ========================================================================== */

.thanks-content {
  padding: var(--space-xl) var(--space-md);
  width: var(--column-default);
  margin-inline: auto;
}

.thanks-content h1 { margin-bottom: var(--space-md); }
.thanks-content p {
  font-size: var(--fs-lead);
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

.thanks-content .home-link { color: var(--color-primary); font-weight: var(--fw-medium); }

/* ==========================================================================
   Privacy page
   ========================================================================== */

.privacy-content {
  padding: var(--space-xl) var(--space-md);
  width: var(--column-default);
  margin-inline: auto;
}

.privacy-content h1 { margin-bottom: var(--space-md); }

.privacy-content h2 {
  font-size: var(--fs-h3);
  margin-block: var(--space-md) var(--space-sm);
}

.privacy-content p { margin-bottom: var(--space-sm); }

.privacy-placeholder-note {
  background: var(--color-note-bg);
  padding: var(--space-md);
  border-radius: 6px;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-small);
}

/* ==========================================================================
   Hero entry stagger (CSS-only; reduced-motion neutralized above)
   ========================================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fade-in-up var(--duration) var(--easing) forwards;
}

.fade-in:nth-of-type(2) { animation-delay: 60ms; }
.fade-in:nth-of-type(3) { animation-delay: 120ms; }

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */

@media (min-width: 768px) {
  .site-header { padding-inline: var(--space-lg); }
  .site-footer { padding-inline: var(--space-lg); }
  .hero { padding-block: calc(var(--space-section) * 1.4); }
}

@media (min-width: 1200px) {
  :root { --measure: 70ch; }
}

@media (max-width: 480px) {
  .btn-primary {
    padding: 1rem 1.5rem;
    width: 100%;
    text-align: center;
  }
  .hero .cta-row { flex-direction: column; align-items: stretch; }
  .hero .cta-row .cta-fineprint { text-align: center; }
}
