/* ==========================================================================
   Freedom Wives — site styles
   --------------------------------------------------------------------------
   DESIGN TOKENS
   Every colour, font and size lives here. Change these and the whole site
   follows. Nothing below this block uses a raw colour, font or size.
   ========================================================================== */

:root {
  /* Freedom Wives palette (change a brand colour here) */
  --forest:     #1F3D2B;  /* primary, ~55% */
  --butter:     #FFEFC5;  /* primary, ~25%: text on forest, buttons */
  --ink:        #16201A;  /* darkest text, instead of black */
  --pine:       #2F5A40;  /* second layer on forest */
  --sage:       #A9B8A0;  /* soft green panels */
  --mist:       #DDE5D6;  /* palest green backgrounds */
  --marigold:   #F2C14E;  /* small highlights and badges only */
  --terracotta: #B5583A;  /* accent, sparingly */
  --blush:      #F6C9C0;  /* soft accent, sparingly */
  --cream:      #FFF9EA;  /* lightest background */

  /* Where each colour is used (text pairings follow the brand rules:
     on Forest: Cream, Butter, Mist, Blush, Marigold, Sage
     on Pine: Cream, Butter, Mist, Blush, Marigold
     on Butter: Ink, Forest, Pine
     on Cream: Ink, Forest, Pine, Terracotta
     on Mist / Blush / Marigold: Ink, Forest, Pine) */
  --color-forest:          var(--forest);     /* hero, launch, header */
  --color-footer:          var(--pine);       /* footer background */
  --color-forest-soft:     var(--pine);       /* lines and borders on forest */
  --color-cream:           var(--cream);      /* main page background */
  --color-panel:           var(--mist);       /* "What's inside" band */
  --color-card:            var(--cream);      /* cards and form inputs */
  --color-line:            var(--mist);       /* lines and borders on cream */
  --color-rule:            var(--sage);       /* bars beside "Sound familiar?" */
  --color-label:           var(--marigold);   /* small label on forest */
  --color-number:          var(--terracotta); /* feature numbers on cream */
  --color-heading:         var(--forest);     /* headings on cream */
  --color-ink:             var(--ink);        /* body text on cream */
  --color-ink-muted:       var(--pine);       /* secondary text on cream */
  --color-on-forest:       var(--cream);      /* text on forest */
  --color-on-forest-muted: var(--mist);       /* secondary text on forest */
  --color-button:          var(--butter);     /* button background */
  --color-on-button:       var(--forest);     /* button text */
  --color-error:           var(--terracotta); /* error text on cream */
  --color-error-on-forest: var(--blush);      /* error text on forest */
  --color-focus:           var(--marigold);   /* keyboard focus ring on forest */
  --color-focus-on-light:  var(--forest);     /* keyboard focus ring on cream */

  /* Fonts */
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type sizes (phone first; they grow smoothly up to desktop) */
  --size-label:    0.75rem;                            /* small caps label */
  --size-small:    0.875rem;                           /* fine print, footer */
  --size-body:     1.0625rem;                          /* body text */
  --size-lead:     clamp(1.125rem, 1rem + 0.6vw, 1.3125rem); /* line under headline */
  --size-input:    1.375rem;                           /* form fields and button */
  --size-h3:       clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --size-h2:       clamp(2.125rem, 1.6rem + 2.2vw, 3.25rem);
  --size-h1:       clamp(2.625rem, 1.7rem + 4.4vw, 5rem);
  --size-wordmark: 1.5rem;
  --size-holding:  clamp(3.25rem, 2rem + 7vw, 7.5rem); /* home page title */

  /* Weights and line heights */
  --weight-body: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-body: 1.6;
  --tracking-label: 0.16em;

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-s:   0.75rem;
  --space-m:   1rem;
  --space-l:   1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);  /* between sections */
  --gutter:    clamp(1.25rem, 0.8rem + 2vw, 2.5rem); /* page side padding */

  /* Layout widths */
  --width-page:  72rem;
  --width-text:  40rem;
  --width-form:  34rem;

  /* Shapes */
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-pill: 999px;
  --border: 1px;
  --input-height: 3.5rem;
}

/* ==========================================================================
   Font files
   Hosted on this site (assets/fonts), so nothing is sent to Google.
   To swap a font: add its .woff2 files to assets/fonts, add rules like
   these, then change --font-serif or --font-sans above.
   ========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter is a variable font: one file covers every weight from 100 to 900 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

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

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

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); line-height: var(--leading-snug); }

p { margin: 0 0 var(--space-m); }
p:last-child { margin-bottom: 0; }

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

:focus-visible { outline: 2px solid var(--focus-ring, var(--color-focus-on-light)); outline-offset: 3px; }
.site-header--on-forest, .hero, .section--forest, .site-footer, .holding { --focus-ring: var(--color-focus); }

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

.label {
  margin: 0 0 var(--space-l);
  font-family: var(--font-sans);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Header and footer
   ========================================================================== */

.site-header { padding-block: var(--space-l); }
.site-header--on-forest { background: var(--color-forest); color: var(--color-on-forest); }

.wordmark {
  font-family: var(--font-serif);
  font-size: var(--size-wordmark);
  line-height: 1;
  text-decoration: none;
}

.site-footer {
  background: var(--color-footer);
  color: var(--color-on-forest-muted);
  font-size: var(--size-small);
  padding-block: var(--space-xl);
}
.site-footer p { margin-bottom: var(--space-2xs); }
.site-footer a { color: var(--color-on-forest); }
.site-footer__links { margin-top: var(--space-m); }

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

.section { padding-block: var(--space-2xl); }
.section--forest { background: var(--color-forest); color: var(--color-on-forest); }
.section--light  { background: var(--color-panel); }
.section + .section:not(.section--forest):not(.section--light) { border-top: var(--border) solid var(--color-line); }

.section__head { margin-bottom: var(--space-xl); max-width: var(--width-text); }
.section__head .label { color: var(--color-number); margin-bottom: var(--space-s); }

.prose { max-width: var(--width-text); }

/* Hero */
.hero {
  background: var(--color-forest);
  color: var(--color-on-forest);
  padding-block: var(--space-xl) var(--space-2xl);
}
.hero .label { color: var(--color-label); }
.hero h1 { max-width: 15ch; }
.hero__lead {
  max-width: var(--width-text);
  margin-top: var(--space-l);
  font-size: var(--size-lead);
  color: var(--color-on-forest-muted);
}
.hero .signup-wrap { margin-top: var(--space-xl); }

/* Sound familiar */
.pain-list {
  display: grid;
  gap: var(--space-l);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pain-list li {
  padding-left: var(--space-l);
  border-left: 2px solid var(--color-rule);
  font-size: var(--size-lead);
}

/* What's inside */
.features {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature {
  padding: var(--space-l);
  background: var(--color-cream);
  border: var(--border) solid var(--color-line);
  border-radius: var(--radius-m);
}
.feature h3 { margin-bottom: var(--space-s); color: var(--color-heading); }
.feature p { color: var(--color-ink-muted); }
.feature__num {
  display: block;
  margin-bottom: var(--space-m);
  font-family: var(--font-sans);
  font-size: var(--size-label);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-label);
  color: var(--color-number);
}

/* Good to know */
.notes {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}
.notes li {
  padding: var(--space-l);
  background: var(--color-panel);
  border-radius: var(--radius-m);
}

/* Made by */
.about h2 { margin-bottom: var(--space-l); }
.about p { font-size: var(--size-lead); }

/* Launching soon */
.launch { text-align: left; }
.launch h2 { margin-bottom: var(--space-m); }
.launch__lead { max-width: var(--width-text); color: var(--color-on-forest-muted); font-size: var(--size-lead); }
.launch .signup-wrap { margin-top: var(--space-xl); }

/* ==========================================================================
   Sign-up form
   ========================================================================== */

.signup-wrap { max-width: var(--width-form); }

.signup { display: grid; gap: var(--space-s); }
.signup__fields { display: grid; gap: var(--space-s); }

.field { display: grid; gap: var(--space-2xs); }
.field__label {
  font-family: var(--font-serif);
  font-size: var(--size-input);
  line-height: 1.2;
}
.field input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-m);
  font-family: var(--font-serif);
  font-size: var(--size-input);
  color: var(--color-ink);
  background: var(--color-card);
  border: var(--border) solid var(--color-line);
  border-radius: var(--radius-s);
  appearance: none;
}
.field input:focus { border-color: var(--color-label); }
.field input[aria-invalid="true"] { border-color: var(--color-error); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--input-height);
  margin-top: var(--space-xs);
  padding: 0 var(--space-xl);
  font-family: var(--font-serif);
  font-size: var(--size-input);
  line-height: 1;
  color: var(--color-on-button);
  background: var(--color-button);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: 0.7; cursor: progress; }

.signup__note {
  margin-top: var(--space-xs);
  font-size: var(--size-small);
  color: var(--color-on-forest-muted);
}

.signup__error {
  margin: 0;
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  color: var(--color-error-on-forest);
}

.signup__trap {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.signup-success {
  padding: var(--space-l);
  border: var(--border) solid var(--color-forest-soft);
  border-radius: var(--radius-m);
  color: var(--color-on-forest-muted);
}
.signup-success:focus { outline: none; }
.signup-success__title {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-serif);
  font-size: var(--size-h3);
  line-height: var(--leading-snug);
  color: var(--color-on-forest);
}

[hidden] { display: none !important; }

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

.policy { padding-block: var(--space-xl) var(--space-2xl); }
.policy h1 { font-size: var(--size-h2); margin-bottom: var(--space-m); }
.policy h2 { font-size: var(--size-h3); margin: var(--space-xl) 0 var(--space-s); color: var(--color-heading); }
.policy ul { padding-left: 1.25em; margin: 0 0 var(--space-m); }
.policy li { margin-bottom: var(--space-2xs); }
.policy__updated { color: var(--color-ink-muted); font-size: var(--size-small); }

/* ==========================================================================
   Home holding page
   ========================================================================== */

.holding {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: var(--color-forest);
  color: var(--color-on-forest);
  text-align: center;
}
.holding h1 { font-size: var(--size-holding); margin-bottom: var(--space-xl); }
.holding .button { width: auto; }

/* ==========================================================================
   Larger screens
   ========================================================================== */

@media (min-width: 40em) {
  .signup__fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .notes { grid-template-columns: repeat(2, 1fr); }
}

/* Wide screens: centre the content so nothing hugs the left edge.
   The top section stays left-aligned but runs wider.
   Phones keep the left-aligned layout above. */
@media (min-width: 48em) {
  .launch .container,
  .about .prose,
  .section__head,
  .site-footer .container { text-align: center; }

  .launch__lead,
  .section__head,
  .prose,
  .launch .signup-wrap { margin-inline: auto; }

  .launch .signup { text-align: left; }
  .launch .signup__note,
  .launch .signup__error { text-align: center; }

  .hero h1 { max-width: 24ch; }
  .hero__lead { max-width: 46rem; }
}

@media (min-width: 60em) {
  .features { grid-template-columns: repeat(3, 1fr); gap: var(--space-l); }
  .feature { padding: var(--space-xl) var(--space-l); }
  .hero { padding-block: var(--space-2xl); }
  .pain-list { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
}
