/* ============================================================================
   ByDo — Be Your Day One · landing page styles
   Flat, printed-feeling. Paper dominates, Ink for text, Moss the one accent.
   No shadows, no gradients, no CDNs. Tokens per DESIGN-SPEC §1. British spelling.
   ============================================================================ */

/* ---------- 1. Tokens --------------------------------------------------- */
:root {
  /* Colour (DESIGN-SPEC §1.1) */
  --paper: #F5F3ED;
  --ink: #33322C;
  --stone: #E5E2D8;
  --moss: #4A5442;
  --moss-deep: #39412F;
  --clay: #B0684C;      /* reserved: at most one element; unused at launch */
  --muted: #6D6C66;
  --field-bg: #FFFFFF;  /* only tolerated non-Paper fill: form inputs */

  /* Typography (DESIGN-SPEC §1.2) — system stack, no webfont CDN */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale (DESIGN-SPEC §1.3) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;
  --space-16: 128px;

  /* Layout (DESIGN-SPEC §1.4) */
  --maxw: 1080px;
  --measure: 65ch;
  --gutter: clamp(20px, 5vw, 48px);

  /* Section vertical padding — mobile default, desktop overridden below */
  --section-pad: var(--space-10);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;          /* ~17px base body */
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--moss); text-decoration: none; }
a:hover { color: var(--moss-deep); text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }

p { margin: 0; }
p + p { margin-top: var(--space-4); }

strong { font-weight: 600; }

/* Numbers/prices use tabular figures wherever they appear */
.price, .price__num, .step__num { font-variant-numeric: tabular-nums; }

/* ---------- 3. Accessibility helpers ----------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4); top: -60px;
  z-index: 100;
  background: var(--moss);
  color: var(--paper);
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:hover { color: var(--paper); text-decoration: none; }
.skip-link:focus { top: var(--space-4); }

/* Universal visible focus ring (DESIGN-SPEC §4) */
:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
}

/* ---------- 4. Layout primitives --------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

.section { padding-block: var(--section-pad); }

.section--band { background: var(--paper); }

/* Section dividers (self-drawn Stone hairline motif) */
.divider {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: auto;
}

/* ---------- 5. Typography roles ---------------------------------------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}

.section__heading {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}

.prose { font-size: 1.0625rem; margin-bottom: var(--space-6); }
.prose p + p { margin-top: var(--space-4); }

.fineprint {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- 6. Buttons & CTAs ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary {
  background: var(--moss);
  color: var(--paper);
  border-color: var(--moss);
}
.btn--primary:hover {
  background: var(--moss-deep);
  border-color: var(--moss-deep);
  color: var(--paper);
  text-decoration: none;
}
.btn--block { display: flex; width: 100%; }

.link-cta { font-weight: 600; text-decoration: none; }
.link-cta:hover { text-decoration: underline; }

.section__cta { margin-top: var(--space-6); }

/* ---------- 7. Header --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--stone);
}
.site-header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--space-3) var(--gutter);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.header-cta {
  font-weight: 600;
  color: var(--moss);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-2);
}

/* ---------- 8. Hero ----------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-10);
}
.hero__inner { position: relative; z-index: 1; }
.hero__heading {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
  max-width: 20ch;
}
.hero__lead {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.5;
  margin-bottom: var(--space-6);
}
.hero__lead p + p { margin-top: var(--space-4); }
.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.hero__media { margin: 0; }
.hero__media img {
  width: 100%;
  border: 1px solid var(--stone);
}
/* The one ghost rack: Stone silhouette bleeding off the hero's bottom edge,
   behind whitespace only, never behind text. */
.hero__ghost {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  max-width: none;
  opacity: 0.5;              /* SVG already Stone-light; keep it a whisper */
  pointer-events: none;
  z-index: 0;
}

/* ---------- 9. Social-proof strip -------------------------------------- */
.proof {
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
  padding-block: var(--space-5);
}
.proof__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- 10. Who-it's-for split ------------------------------------- */
.split { display: grid; gap: var(--space-6); }
.split--for-not-for { margin-block: var(--space-8) var(--space-6); }
.split__title { font-size: 1.2rem; margin-bottom: var(--space-4); }
.ticklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.ticklist li {
  position: relative;
  padding-left: var(--space-5);
  line-height: 1.55;
}
.ticklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--moss);
}
.ticklist--no li::before { background: var(--stone); }

/* ---------- 11. Method steps ------------------------------------------- */
.steps {
  list-style: none;
  margin: var(--space-8) 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-5);
}
.step {
  border: 1px solid var(--stone);
  padding: var(--space-5);
  background: var(--paper);
}
.step__num {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--moss);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.step__title { font-size: 1.2rem; margin-bottom: var(--space-3); }
.step__name { color: var(--ink); }

/* ---------- 12. Callouts (3px Moss left border accent) ----------------- */
.callout {
  border: 1px solid var(--stone);
  border-left: 3px solid var(--moss);
  padding: var(--space-5);
  margin-block: var(--space-6);
}
.callout__title { font-size: 1.2rem; margin-bottom: var(--space-4); }
.callout--split p + p { margin-top: var(--space-4); }

/* ---------- 13. Media figures ------------------------------------------ */
.section__media { margin: var(--space-6) 0; }
.section__media img {
  width: 100%;
  border: 1px solid var(--stone);
}
.split--media { align-items: center; }

/* ---------- 14. Pricing cards ------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-block: var(--space-6);
}
.card {
  border: 1px solid var(--stone);
  padding: var(--space-5);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.card--lead { border-left: 3px solid var(--moss); }
.card__title { font-size: 1.2rem; margin-bottom: var(--space-3); }
.card__cta { margin-top: auto; padding-top: var(--space-5); }
.card p { margin-bottom: var(--space-3); }

.price { margin-bottom: var(--space-4); font-weight: 600; }
.price__num {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.price__unit {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- 15. Story placeholders ------------------------------------- */
.cards--stories { margin-top: var(--space-6); }
.card--story { min-height: 180px; }
.card--story.is-placeholder {
  border-style: dashed;
  align-items: flex-start;
  justify-content: center;
}
.story__flag {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: var(--space-3);
}

/* ---------- 16. FAQ (native details/summary) --------------------------- */
.faq { margin-top: var(--space-5); }
.faq__item { border-bottom: 1px solid var(--stone); }
.faq__item:first-of-type { border-top: 1px solid var(--stone); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-8) var(--space-4) 0;
  min-height: 44px;
  position: relative;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
/* Moss "+" affordance that rotates to a cross on open (CSS only) */
.faq summary::after {
  content: "";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--moss), var(--moss)) center / 100% 2px no-repeat,
    linear-gradient(var(--moss), var(--moss)) center / 2px 100% no-repeat;
  transform: translateY(-50%);
  transition: transform .15s ease;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__body { padding: 0 0 var(--space-4); }
.faq__body p { color: var(--ink); }

/* ---------- 17. Enquiry form ------------------------------------------- */
.section--enquire { border-top: 1px solid var(--stone); }
.enquire__reassure { margin-bottom: var(--space-6); }

.form {
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-weight: 600; font-size: 0.95rem; }
.req { color: var(--moss); }
.field__input {
  font: inherit;
  font-size: 16px;               /* prevents iOS zoom */
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--stone);
  border-radius: 0;
  padding: var(--space-3) var(--space-4);
  width: 100%;
}
.field__input:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: -1px;
}
textarea.field__input { resize: vertical; min-height: 6rem; }
select.field__input { appearance: none; }

.form__note { margin-top: var(--space-1); }

/* Honeypot — off-screen, never shown, never focusable in the tab flow */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 18. Footer -------------------------------------------------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--stone);
  padding-block: var(--space-10);
}
.footer__closing {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}
.footer__cta { margin-bottom: var(--space-8); }
.footer__utility,
.footer__legalpages {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer__utility a { min-height: 44px; display: inline-flex; align-items: center; }
.footer__legal {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.footer__copyright { font-size: 0.85rem; color: var(--muted); }

/* ---------- 19. Desktop (≥720px) --------------------------------------- */
@media (min-width: 720px) {
  :root { --section-pad: var(--space-12); }

  .hero { padding-block: var(--space-16) var(--space-12); }
  .hero__actions { flex-direction: row; align-items: center; }

  .proof__list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
  }
  .proof__list li { position: relative; }
  .proof__list li + li::before {
    content: "·";
    position: absolute;
    left: calc(var(--space-6) / -2);
    transform: translateX(-50%);
    color: var(--muted);
  }

  .split--for-not-for { grid-template-columns: 1fr 1fr; gap: var(--space-8); }

  .steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6); }

  .split--media { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .split--media .section__media { margin: 0; }
  .split--reverse .section__media { order: 2; }

  .section__media--wide { max-width: 720px; }
}

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