/* H2 Pure Life — Base styles
 * Brand tokens, reset, typography, accessibility helpers.
 * Loaded on every page.
 */

:root {
  /* Brand colour tokens */
  --teal: #00E6CC;
  --teal-deep: #00B8A0;
  --teal-readable: #007A6A;
  --teal-ink: #0A4A42;
  --dark: #0A1F1F;
  --dark-2: #102B2B;
  --dark-3: #1A3838;
  --cream: #F5F5F3;
  --cream-2: #EFEEE9;
  --stone: #E8E6E0;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --ink-mute: #6B6B6B;
  --line: #E2E2DE;
  --line-dark: rgba(255,255,255,0.12);
  --gold: #C9A14A;

  /* Typography */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --container-wide: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --radius-lg: 16px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --tx: 220ms;

  /* Header height */
  --nav-h: 76px;
  --nav-h-mobile: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@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; }
}
body {
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { font-style: italic; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--teal-readable); text-decoration: none; transition: color var(--tx) var(--ease); }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; border-radius: 2px; }

/* Typography scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 0.4em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 500; }
h4 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); font-weight: 500; }
em { font-style: italic; color: var(--teal-readable); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--teal-readable);
  margin: 0 0 18px;
}
blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.4;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  border: 0;
  margin: 0;
  padding: 0;
}

/* Layout helpers */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(60px, 9vw, 120px) 0; }
.section-sm { padding: clamp(40px, 6vw, 72px) 0; }
.section-lg { padding: clamp(80px, 12vw, 160px) 0; }
.section--dark { background: var(--dark); color: rgba(255,255,255,0.86); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark em { color: var(--teal); }
.section--cream { background: var(--cream); }
.section--stone { background: var(--cream-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--tx) var(--ease), background-color var(--tx) var(--ease), color var(--tx) var(--ease), box-shadow var(--tx) var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn--teal { background: var(--teal); color: var(--dark); }
.btn--teal:hover { background: var(--teal-deep); color: var(--dark); transform: translateY(-1px); }
.btn--dark { background: var(--dark); color: var(--white); }
.btn--dark:hover { background: var(--dark-2); color: var(--white); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.4); }
.btn--ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }
.btn--lg { padding: 18px 36px; font-size: 1rem; }

/* Pills, badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill--teal { background: var(--teal); color: var(--dark); }
.pill--gold { background: var(--gold); color: var(--white); }
.pill--ghost { border: 1px solid currentColor; color: var(--teal-readable); }

/* Trust strip (used on multiple pages) */
.trust-strip {
  background: #EAF7F4;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-strip__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 16px 28px;
}
.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--teal-ink);
  font-weight: 500;
}
.trust-strip__item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--teal-readable); }

/* Mobile-only line break helper (used inside trust strip slot 5 etc.) */
.mobile-break { display: none; }

/* Mobile: 2-2-1 grid — items 1-4 fill a 2-col x 2-row block, item 5 spans the bottom row left-aligned */
@media (max-width: 768px) {
  .trust-strip__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    row-gap: 12px;
  }
  .trust-strip__item { justify-self: start; }
  .trust-strip__item:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .mobile-break { display: inline; }
}

/* Shared product-page breadcrumb + hero treatment (Hydro Gen / Nova / Medic).
   Both share the same flat mint tint at the seam so the crumbs band reads as
   the top of the hero block, not a separate stripe. The hero adds a vertical
   fade-to-white plus subtle radial accents on top. */
.product-crumbs {
  position: relative;
  z-index: 2;
  background: rgba(0, 230, 204, 0.04);
  padding: 14px 0 10px;
  font-size: 0.85rem;
}
.product-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--ink-mute);
}
.product-crumbs a { color: var(--ink-mute); }
.product-crumbs a:hover { color: var(--teal-readable); }
.product-crumbs li[aria-current="page"] { color: var(--teal-readable); font-weight: 500; }
@media (max-width: 640px) {
  .product-crumbs { padding-top: 12px; padding-bottom: 8px; }
}

.product-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(0, 230, 204, 0.04) 0%, var(--white) 80%);
  padding: clamp(56px, 8vw, 110px) 0;
  overflow: hidden;
}
.product-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 85% 30%, rgba(0, 230, 204, 0.06), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(0, 184, 160, 0.04), transparent 70%);
  pointer-events: none;
}
/* When crumbs precede the hero, tighten the hero's top padding — the crumbs
   already provide the breath above the eyebrow. */
.product-crumbs + .product-hero { padding-top: clamp(14px, 2vw, 22px); }

/* Shared product-page hero image — contained 4:5 card with rounded corners,
   soft shadow, cream-2 backstop. Used by Hydro Nova / Gen / Medic so the
   three pages share one image treatment. */
.product-hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: 0 24px 60px -20px rgba(10, 31, 31, 0.18);
}
.product-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 900px) {
  .product-hero__media { aspect-ratio: 4 / 3; max-width: 560px; margin: 0 auto; }
}

/* Phone reassurance block — appears on product pages below the CTA cluster */
.product-phone-reassurance {
  margin: 20px 0 8px;
  padding: 14px 18px;
  background: var(--cream-2);
  border-left: 2px solid var(--teal-deep);
  border-radius: 4px 4px 0 0;
}
.product-phone-reassurance__lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.product-phone-reassurance__cta {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0;
}
.product-phone-reassurance__cta a {
  color: var(--ink);
  border-bottom: 1px solid var(--teal-deep);
  padding-bottom: 1px;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--tx) var(--ease), border-color var(--tx) var(--ease);
}
.product-phone-reassurance__cta a:hover,
.product-phone-reassurance__cta a:focus-visible {
  color: var(--teal-deep);
}

/* Pre-order phone reassurance — single line, sits inside .nova-hero__ctas
   between the Stripe pre-order button and the restock-trigger button */
.preorder-phone-reassurance {
  flex-basis: 100%;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 4px 0;
  line-height: 1.5;
}
.preorder-phone-reassurance a {
  color: var(--ink);
  border-bottom: 1px solid var(--teal-deep);
  padding-bottom: 1px;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--tx) var(--ease), border-color var(--tx) var(--ease);
}
.preorder-phone-reassurance a:hover,
.preorder-phone-reassurance a:focus-visible {
  color: var(--teal-deep);
}

/* Pull quote */
.pullquote {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
  font-style: italic;
}
.section--dark .pullquote { color: var(--white); }

/* Testimonial video frame — reusable portrait-video container for testimonial Vimeo embeds. */
.testimonial-video-frame {
  position: relative;
  width: 100%;
  max-width: 405px;
  aspect-ratio: 9 / 16;
  max-height: 720px;
  border-radius: 8px;
  overflow: hidden;
  background: #0A1F1F;
}
.testimonial-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 768px) {
  .testimonial-video-frame {
    max-width: 340px;
    max-height: 600px;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  background: var(--dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transform: translateY(calc(-100% - 24px));
  transition: transform 150ms var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--white); }
.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;
}

/* Forms */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 1rem;
  transition: border-color var(--tx) var(--ease), box-shadow var(--tx) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px rgba(0, 184, 160, 0.15);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field--honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Lazy fade-in */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.fade-in.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* Print */
@media print {
  .nav, .footer { display: none; }
}
