/* ==========================================================================
   Reset + base typography
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header */
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text-body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip` contains the marquee/caustic overhang WITHOUT making body a scroll
     container, which would break the sticky header. `hidden` is the fallback. */
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Images are wrapped in <picture> for the WebP source. A <picture> is
   height:auto, so an inner `height:100%` has nothing to resolve against and
   the image collapses to its natural ratio instead of covering the box.
   Any container that expects a full-bleed image must size the wrapper too. */
.hero__bg picture,
.page-hero__bg picture,
.product-card__media picture,
.gallery-item picture,
.mega__link picture {
  display: block;
  width: 100%;
  height: 100%;
}

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: var(--marine-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--marine-blue-lift); }

ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; }

p { text-wrap: pretty; }

hr { border: 0; border-top: 1px solid var(--hairline); }

/* --- Focus: visible ring on every interactive element -------------------- */
:focus-visible {
  outline: 3px solid var(--marine-blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* --- Selection ----------------------------------------------------------- */
::selection { background: var(--aqua-mint); color: var(--text-ink); }

/* --- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  background: var(--marine-blue);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-sm);
  transition: top var(--t-micro) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* --- Screen-reader only --------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.section { padding-block: var(--section-y); position: relative; }

/* Light theme: the page is light by default. --hull and --mist are the two
   alternating tints; --deep is the one deliberate dark accent band. */
.section--hull  { background: var(--surface-1); }
.section--mist  { background: var(--surface-2); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-body);
  max-width: var(--maxw-text);
}

/* ---- Deep accent band (CTA, spotlight) --------------------------------- */
.section--deep {
  background: var(--ink-deep);
  color: var(--text-on-deep-body);
}
.section--deep h1, .section--deep h2, .section--deep h3 { color: var(--text-on-deep); }
.section--deep p, .section--deep .lead,
.section--deep .section-head__lead { color: var(--text-on-deep-body); }
.section--deep .eyebrow { color: var(--aqua-mint); }
.section--deep a { color: var(--sky-link); }
.section--deep a:hover { color: var(--aqua-mint); }

/* Eyebrow / technical label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--marine-blue);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.section-head { max-width: 760px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head__lead {
  margin-top: var(--sp-4);
  font-size: var(--fs-lead);
  color: var(--text-mute);
}

/* Generic responsive grid */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* Noise overlay for depth */
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .018;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
