/* ============================================================
   styles.css
   ┌──────────────────────────────────────────────────────────┐
   │ 1. BRAND TOKENS  ← the only block you edit per client    │
   │ 2. Base / reset                                          │
   │ 3. Layout primitives                                     │
   │ 4. Components                                            │
   └──────────────────────────────────────────────────────────┘
   ============================================================ */

/* ---------- 1. BRAND TOKENS ---------- */
:root {
  /* Color: drawn from pool water, not "tech blue" */
  --ink:    #0a2e38;   /* deep-end blue-black — text, footer     */
  --depth:  #0e4b5a;   /* dark teal — headings, deep sections    */
  --water:  #1897b4;   /* chlorinated turquoise — links, accents */
  --foam:   #edf7f9;   /* pale aqua — tinted section bg          */
  --paper:  #ffffff;
  --sun:    #f2b33d;   /* warm accent — primary CTA only         */

  --fontDisplay: "Bricolage Grotesque", system-ui, sans-serif;
  --fontBody: "Instrument Sans", system-ui, sans-serif;

  /* Derived — usually leave alone */
  --line: color-mix(in oklab, var(--depth) 14%, transparent);
  --radius: 14px;
  --shadow: 0 12px 32px -12px color-mix(in oklab, var(--ink) 35%, transparent);

  /* Fluid type scale */
  --textSm: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  --textBase: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --textLg: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --textXl: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  --textHero: clamp(2.4rem, 1.6rem + 4vw, 4.2rem);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--fontBody);
  font-size: var(--textBase);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 {
  font-family: var(--fontDisplay);
  color: var(--depth);
  line-height: 1.1;
  text-wrap: balance;
  margin-block: 0 0.5em;
}
h1 { font-size: var(--textHero); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--textXl); font-weight: 700; }
h3 { font-size: var(--textLg); font-weight: 700; }
p  { margin-block: 0 1em; }
a  { color: var(--water); }
img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 3px;
  border-radius: 4px;
}

.skipLink {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 1rem;
  background: var(--depth);
  color: var(--paper);
  padding: 0.6em 1em;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
}
.skipLink:focus { inset-block-start: 0; }

/* ---------- 3. Layout ---------- */
.container {
  inline-size: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}
.container--narrow { inline-size: min(100% - 2.5rem, 46rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tinted { background: var(--foam); }
.section--deep {
  background: var(--depth);
  color: var(--paper);
}
.section--deep h2 { color: var(--paper); }
.section__lede { max-inline-size: 55ch; opacity: 0.9; }

.eyebrow {
  font-size: var(--textSm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--water);
  margin-block-end: 0.75rem;
}

/* ---------- 4. Components ---------- */

/* Buttons */
.button {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: var(--textBase);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translateY(-2px); }
.button--primary {
  background: var(--sun);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.button--ghost {
  border-color: currentColor;
  color: var(--depth);
  background: transparent;
}
.section--deep .button--ghost { color: var(--paper); }

/* Header / nav */
.siteHeader {
  position: sticky;
  inset-block-start: 0;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.nav__brand {
  font-family: var(--fontDisplay);
  font-weight: 800;
  font-size: var(--textLg);
  color: var(--depth);
  text-decoration: none;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav__menu a:hover { color: var(--water); }
.nav__phone { font-weight: 700 !important; color: var(--depth) !important; }
.nav__toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in oklab, var(--water) 18%, transparent), transparent 60%),
    radial-gradient(40rem 24rem at -10% 110%, color-mix(in oklab, var(--foam) 80%, transparent), transparent 70%);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(5rem, 10vw, 8rem);
  overflow: clip;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__subhead { font-size: var(--textLg); max-inline-size: 48ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.5rem; }
.hero__waterline {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 10px;
  background: linear-gradient(90deg, var(--water), color-mix(in oklab, var(--water) 40%, var(--foam)));
  mask: radial-gradient(12px 10px at 12px 0, transparent 98%, black) repeat-x;
  mask-size: 24px 10px;
}

/* Signature: weekly report card */
.reportCard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  rotate: 1.5deg;
}
.reportCard__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-block-end: 1px solid var(--line);
  padding-block-end: 0.75rem;
  margin-block-end: 1rem;
}
.reportCard__title { font-family: var(--fontDisplay); font-weight: 700; color: var(--depth); }
.reportCard__meta { font-size: var(--textSm); opacity: 0.7; }
.reading { margin-block-end: 0.9rem; }
.reading__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--textSm);
  font-weight: 600;
  margin-block-end: 0.25rem;
}
.reading__value { color: var(--water); }
.reading__track {
  position: relative;
  block-size: 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--foam) 70%, var(--line));
}
.reading__ideal {
  position: absolute;
  inset-block: 0;
  background: color-mix(in oklab, var(--water) 30%, var(--foam));
  border-radius: 999px;
}
.reading__dot {
  position: absolute;
  inset-block-start: 50%;
  translate: -50% -50%;
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: var(--water);
  border: 3px solid var(--paper);
  box-shadow: 0 1px 4px color-mix(in oklab, var(--ink) 30%, transparent);
}
.reportCard__tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.reportCard__tasks li {
  font-size: var(--textSm);
  background: var(--foam);
  border-radius: 999px;
  padding: 0.25em 0.8em;
}
.reportCard__tasks li::before { content: "✓ "; color: var(--water); font-weight: 700; }

/* Card grids (services, reviews) */
.cardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-block-start: 1.5rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card__price {
  display: inline-block;
  font-weight: 700;
  color: var(--depth);
  background: var(--foam);
  border-radius: 999px;
  padding: 0.2em 0.9em;
  font-size: var(--textSm);
  margin-block-start: 0.5rem;
}
.card--review { font-style: italic; }
.card__attribution { font-style: normal; font-weight: 600; margin-block-start: 0.75rem; }
.card__attribution span { font-weight: 400; opacity: 0.7; }
.card__stars { color: var(--sun); letter-spacing: 2px; font-style: normal; }

/* Process — an actual sequence, so numbers carry meaning */
.processList {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin-block-start: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.processList li {
  counter-increment: step;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.processList li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  inline-size: 2.2rem;
  block-size: 2.2rem;
  border-radius: 50%;
  background: var(--depth);
  color: var(--paper);
  font-family: var(--fontDisplay);
  font-weight: 800;
  margin-block-end: 0.75rem;
}

/* Service areas */
.areaList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-block-start: 1rem;
}
.areaList li {
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35em 1em;
  font-weight: 500;
}

/* FAQ */
.faqItem {
  border-block-end: 1px solid var(--line);
}
.faqItem summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--textLg);
  font-family: var(--fontDisplay);
  color: var(--depth);
  padding-block: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faqItem summary::-webkit-details-marker { display: none; }
.faqItem summary::after { content: "+"; color: var(--water); font-weight: 800; }
.faqItem[open] summary::after { content: "–"; }
.faqItem p { padding-block-end: 1rem; max-inline-size: 60ch; }

/* Quote form */
.quoteForm { display: grid; gap: 1rem; margin-block-start: 1.5rem; }
.quoteForm__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: var(--textSm); }
.field__optional { font-weight: 400; opacity: 0.7; }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 0.7em 0.9em;
  border-radius: 10px;
  border: 1px solid transparent;
  background: color-mix(in oklab, var(--paper) 94%, var(--depth));
  color: var(--ink);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline-color: var(--sun);
}
.field--hp { position: absolute; inset-inline-start: -9999px; }
.quoteForm__status { font-weight: 600; min-block-size: 1.5em; margin: 0; }

/* Footer */
.siteFooter {
  background: var(--ink);
  color: color-mix(in oklab, var(--paper) 85%, transparent);
  padding-block: 3rem 1.5rem;
}
.siteFooter a { color: var(--paper); }
.siteFooter__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.siteFooter__brand {
  font-family: var(--fontDisplay);
  font-weight: 800;
  font-size: var(--textLg);
  color: var(--paper);
  margin-block-end: 0.25rem;
}
.siteFooter address { font-style: normal; }
.siteFooter__legal {
  border-block-start: 1px solid color-mix(in oklab, var(--paper) 15%, transparent);
  margin-block-start: 2rem;
  padding-block-start: 1.25rem;
  font-size: var(--textSm);
  opacity: 0.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 52rem) {
  .hero__grid { grid-template-columns: 1fr; }
  .reportCard { rotate: 0deg; max-inline-size: 28rem; }
  .quoteForm__row { grid-template-columns: 1fr; }
  .siteFooter__grid { grid-template-columns: 1fr; }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font: inherit;
    font-weight: 600;
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4em 1em;
    cursor: pointer;
  }
  .nav__toggleBar {
    inline-size: 16px;
    block-size: 2px;
    background: var(--depth);
    box-shadow: 0 5px 0 var(--depth), 0 -5px 0 var(--depth);
  }
  .nav__menu {
    display: none;
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-block-end: 1px solid var(--line);
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
  }
  .nav__menu.isOpen { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
html { scroll-behavior: smooth; }
