/* ==========================================================================
   Jacuzzi Bath Remodel of Ontario, Design System (theme.css)
   Global tokens + base + shared primitives. Change brand look here once.
   Each component file carries only its own component-specific styles.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #082d4a;          /* primary / structure */
  --navy-800: #0b3a5f;
  --navy-900: #061f33;      /* deepest */
  --accent: #9eccfa;          /* premium accent + CTA */
  --accent-600: #2f86cc;      /* CTA hover */
  --accent-100: #eaf4fe;      /* soft accent wash */

  /* Neutrals */
  --ink: #0f1b26;           /* headings on light */
  --body: #3a454f;          /* body text */
  --muted: #6b7883;         /* secondary text */
  --line: #e6eaee;          /* borders / rules */
  --bg: #ffffff;
  --bg-soft: #f5f8fa;       /* cool section split */
  --cream: #faf7f0;         /* warm section split */

  /* Feedback */
  --success: #2f7d5b;
  --danger: #c0392b;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --container: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --section-y: clamp(56px, 8vw, 104px);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(8, 45, 74, 0.06);
  --shadow-md: 0 10px 30px rgba(8, 45, 74, 0.10);
  --shadow-lg: 0 24px 60px rgba(8, 45, 74, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h4 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1.1em; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #dbe4ec; }
.section--navy h1.section--navy h2.section--navy h3 { color: #fff; }

.section-head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-bottom: 0; }
.section--navy .section-head p { color: #aebfce; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.02rem; line-height: 1;
  padding: 0.95em 1.7em;
  border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: none; cursor: pointer; text-align: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  box-shadow: 0 8px 22px rgba(47, 134, 204, 0.28);
}
.btn:hover { background: var(--accent-600); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(47, 134, 204, 0.36); }
.btn:active { transform: translateY(0); }
.btn--navy { --btn-bg: var(--navy); --btn-fg: #fff; box-shadow: 0 8px 22px rgba(8, 45, 74, 0.25); }
.btn--navy:hover { background: var(--navy-900); color: #fff; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); border: 2px solid var(--navy); box-shadow: none; }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--lg { font-size: 1.12rem; padding: 1.1em 2.1em; }
.btn--block { display: flex; width: 100%; }

/* ---------- Star rating ---------- */
.stars { --pct: 100%; display: inline-block; font-size: 1rem; line-height: 1; position: relative; font-family: Arial, sans-serif; letter-spacing: 2px; }
.stars::before { content: "★★★★★"; color: #d8dde2; }
.stars::after { content: "★★★★★"; color: var(--accent-600); position: absolute; inset: 0; width: var(--pct); overflow: hidden; white-space: nowrap; }

/* ---------- Forms (base fields) ---------- */
.field {
  width: 100%; font-family: var(--font-sans); font-size: 1rem; color: var(--ink);
  padding: 0.85em 1em; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 134, 204, 0.18); }
.field::placeholder { color: #9aa5ae; }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7883' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1em center; padding-right: 2.4em; }

/* ---------- Utilities ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Reveal is a progressive enhancement: content is ALWAYS visible by default.
   Only when JS is present (html.js) do we hide-then-fade-in on scroll, so a
   JS failure or a crawler never loses content or CTAs. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .js .reveal { opacity: 1; transform: none; transition: none; } }
