/* =========================================================
   Fairest Wheel — styles.css
   One stylesheet for the whole site. Edit freely.

   Design direction:
     - Earth tones (cream, deep forest green, warm rust, kraft)
     - Rye wordmark, Playfair Display headings, Inter body
     - Small zine touches: slight rotation, hand-drawn underline
     - Mobile-first, responsive 320px → 1400px+
   ========================================================= */


/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --cream:       #f5ead6;  /* page background (warm paper) */
  --cream-deep:  #ece0c7;  /* alt background / section band */
  --kraft:       #d9c49b;  /* soft accent surface */
  --forest:      #2b4332;  /* brand / primary */
  --forest-ink:  #1e2f23;  /* darker forest for hovers */
  --rust:        #b84c28;  /* accent */
  --rust-ink:    #8f3a1e;  /* accent hover */
  --ink:         #1f1d17;  /* body text */
  --ink-soft:    #4d4a3f;  /* secondary text */
  --line:        #c9b88a;  /* subtle divider */
  --focus:       #b84c28;  /* focus outline (rust) */

  /* Type */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --radius: 6px;
  --radius-lg: 10px;
  --measure: 62ch;
  --shadow-sm: 0 1px 0 rgba(31,29,23,0.08);
  --shadow-md: 0 6px 20px -10px rgba(31,29,23,0.35);
}


/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;    /* 17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  /* Very subtle paper-texture feel via two low-contrast gradients */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(184,76,40,0.05), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(43,67,50,0.05), transparent 45%);
  background-attachment: fixed;
}

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

a {
  color: var(--forest);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--rust); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Selection */
::selection { background: var(--rust); color: var(--cream); }


/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow { max-width: 720px; }

main { min-height: calc(100vh - 280px); }


/* ---------- Header / wordmark ---------- */
.site-header {
  padding: 1.5rem 0 0.75rem;
}
.site-header .wordmark { margin-left: 1.25rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--forest);
  text-decoration: none;
  line-height: 1;
}
.wordmark:hover { color: var(--forest-ink); }
.wordmark-wheel {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  transition: transform 0.45s ease;
}
.wordmark:hover .wordmark-wheel {
  transform: rotate(28deg);
}
.wordmark-text {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.wordmark-name {
  font-family: "Rye", Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: 0;
}
.wordmark-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

@media (min-width: 640px) {
  .site-header { padding: 2rem 0 1rem; }
  .site-header .wordmark { margin-left: 0; padding-left: 1.25rem; }
  .wordmark-name { font-size: 2rem; }
  .wordmark-wheel { width: 48px; height: 48px; }
}


/* ---------- Hero ---------- */
.hero {
  padding: 2.5rem 0 3rem;
}
.headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 1.35rem + 3.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--forest);
  margin: 0 0 1.25rem;
  position: relative;
  max-width: 16ch;
}
.headline-accent {
  display: inline-block;
  color: var(--rust);
  /* Tiny zine-energy rotation */
  transform: rotate(-0.7deg);
  transform-origin: left center;
}
.flourish {
  display: block;
  width: 60%;
  max-width: 320px;
  height: 12px;
  color: var(--rust);
  margin-top: 0.15rem;
}
.flourish-short { width: 45%; max-width: 220px; }
.flourish-tiny  { width: 30%; max-width: 140px; }

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: var(--measure);
  color: var(--ink);
  margin: 0 0 1.75rem;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}
.cta-main {
  display: flex;
  gap: 0.85rem 1.25rem;
  align-items: center;
}
.cta-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--forest-ink);
  color: var(--cream);
  border-color: var(--forest-ink);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-secondary:hover {
  background: var(--forest);
  color: var(--cream);
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--forest);
  color: var(--forest);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-social svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
  flex-shrink: 0;
}
.btn-social:hover {
  background: var(--forest);
  color: var(--cream);
}
.btn-social:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 1.05rem 1.75rem;
}

.btn[disabled], .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}


/* ---------- Coming soon section ---------- */
.coming-soon {
  padding: 2.5rem 0 4rem;
  border-top: 1px dashed var(--line);
}
.coming-soon p {
  font-size: 1.05rem;
  max-width: var(--measure);
  margin: 0 0 1rem;
}
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 1.95rem);
  color: var(--forest);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}


/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.5rem;
  margin-top: 2rem;
  font-size: 0.925rem;
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--rust); }
.site-footer p { margin: 0 0 0.25rem; }
.site-footer p:last-child { margin-bottom: 0; }
.footer-aside {
  font-size: 0.825rem;
  font-style: italic;
  color: var(--ink-soft);
  opacity: 0.85;
}


/* =========================================================
   QUESTIONNAIRE PAGE
   ========================================================= */
.form-page {
  padding: 1.5rem 0 4rem;
}
.headline-form {
  max-width: 18ch;
  margin-bottom: 1rem;
}
.headline-thanks {
  font-size: clamp(3rem, 2rem + 5vw, 5rem);
  margin-bottom: 1rem;
}

.survey {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Fieldsets for radio/checkbox groups */
.survey fieldset.q,
.survey .q {
  border: 1px solid var(--line);
  background: var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.35rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.survey legend,
.survey .q-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--forest);
  padding: 0;
  margin: 0 0 0.25rem;
  letter-spacing: -0.005em;
  display: block;
}
.survey .q-label { margin-bottom: 0.5rem; }

.q-hint {
  color: var(--ink-soft);
  font-size: 0.925rem;
  margin: 0 0 0.75rem;
}
.q-optional {
  color: var(--ink-soft);
  font-weight: 400;
  font-family: var(--sans);
  font-size: 0.9em;
}

/* Radio / checkbox lists */
.options-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.options-stack label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.35;
  flex-wrap: wrap;
}
.options-stack label:hover {
  background: rgba(184,76,40,0.06);
}
.options-stack input[type="radio"],
.options-stack input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--rust);
  flex: 0 0 auto;
  margin: 0;
}

/* "Other" rows with inline text input */
.other-row {
  flex-wrap: wrap;
}
.other-input {
  flex: 1 1 180px;
  min-width: 160px;
  margin-left: 0.25rem;
  padding: 0.45rem 0.65rem;
  font: inherit;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.other-input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--forest);
}

/* Text / email / tel inputs and textarea */
.survey input[type="text"]:not(.other-input),
.survey input[type="email"],
.survey input[type="tel"],
.survey textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.survey textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}
.survey input:focus-visible,
.survey textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--forest);
}

/* Section break */
.section-break {
  margin-top: 1rem;
  padding-top: 1.75rem;
  border-top: 2px dashed var(--line);
}
.section-break .section-title { margin-bottom: 0.5rem; }
.section-break .q-hint { margin-bottom: 0; }

/* Submit row */
.submit-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}
.form-error {
  color: var(--rust-ink);
  background: #fbeadf;
  border: 1px solid var(--rust);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0;
  max-width: var(--measure);
  font-size: 0.975rem;
}

/* Honeypot — hidden from humans, off-screen but not display:none
   so naive bots still "see" and fill it. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* =========================================================
   THANKS PAGE
   ========================================================= */
.thanks {
  padding: 3rem 0 5rem;
}
.thanks .lede { margin-bottom: 2rem; }


/* =========================================================
   Motion preferences
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .wordmark:hover .wordmark-wheel { transform: none; }
  .headline-accent { transform: none; }
}


/* =========================================================
   Larger screens — a few small refinements
   ========================================================= */
@media (min-width: 760px) {
  .hero { padding: 4rem 0 4rem; }
  .coming-soon { padding: 3.5rem 0 5rem; }
  .survey fieldset.q,
  .survey .q {
    padding: 1.5rem 1.75rem 1.75rem;
  }
}
