/* ==========================================================================
   Halo Water · Base system
   Palette: flight-manual paper, deep ink, Quell aqua, international-orange signal
   ========================================================================== */

:root {
  /* Color (OKLCH, neutrals tinted toward sand / ink) */
  --paper: oklch(0.975 0.007 235);
  --sand: oklch(0.945 0.015 232);
  --sand-deep: oklch(0.9 0.022 232);
  --line: oklch(0.885 0.014 235);
  --ink: oklch(0.23 0.045 258);
  --ink-2: oklch(0.44 0.035 255);
  --ink-3: oklch(0.58 0.03 255);
  --quell: oklch(0.74 0.1 192);
  --quell-deep: oklch(0.45 0.11 245);
  --mist: oklch(0.92 0.03 200);
  --signal: oklch(0.68 0.19 42);
  --signal-press: oklch(0.62 0.19 40);
  /* Offers: red for discounts, brighter on dark grounds */
  --sale: oklch(0.58 0.22 27);
  --sale-bright: oklch(0.7 0.19 30);
  /* Brand blue: primary buttons and interactive highlights */
  --accent: oklch(0.56 0.14 250);
  --accent-press: oklch(0.49 0.14 252);
  --on-accent: oklch(0.985 0.004 240);
  --orbit: oklch(0.17 0.035 262);
  --orbit-2: oklch(0.225 0.04 262);
  --orbit-line: oklch(0.34 0.04 262);
  --on-orbit: oklch(0.95 0.012 230);
  --on-orbit-2: oklch(0.76 0.03 240);

  /* Type: Arabic faces come after the Latin ones, so Latin letters and digits keep Archivo */
  --font-sans: "Archivo", "IBM Plex Sans Arabic", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "Martian Mono", "IBM Plex Sans Arabic", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Archivo", "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.3125rem;
  --text-xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  --text-2xl: clamp(2.2rem, 1.4rem + 3vw, 3.9rem);
  --text-3xl: clamp(2.8rem, 1.2rem + 5.6vw, 6.6rem);

  /* Space (4pt base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: clamp(6rem, 4rem + 8vw, 11rem);

  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3.5rem);
  --max: 1440px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* How far a masked headline line travels as it slides in or out */
  --line-rise: 105%;

  --radius: 14px;
  --radius-sm: 8px;

  --z-sticky: 50;
  --z-altitude: 40;
  --z-overlay: 90;
  --z-drawer: 100;
  --z-toast: 110;

  /* Reading direction: physical sides for origins and gradients, a sign for horizontal motion */
  --start: left;
  --end: right;
  --flip: 1;
}

:root[dir="rtl"] {
  --start: right;
  --end: left;
  --flip: -1;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--s-4);
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: var(--s-4);
}

/* ---------- Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
}

/* ---------- Type roles ---------- */

.display {
  font-size: var(--text-3xl);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: var(--text-2xl);
  font-stretch: 118%;
  font-weight: 800;
  line-height: 0.98;
}

.h3 {
  font-size: var(--text-xl);
  font-stretch: 112%;
  font-weight: 750;
  line-height: 1.05;
}

.lead {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 44ch;
}

.body {
  max-width: 62ch;
  color: var(--ink-2);
}

.label {
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.num {
  font-variant-numeric: tabular-nums;
}

.accent {
  color: var(--quell);
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 46px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-stretch: 110%;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
}
.btn:hover {
  box-shadow: 0 10px 28px -12px color-mix(in oklch, var(--btn-bg) 80%, transparent);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px) scale(0.985);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 240ms var(--ease-out);
}
.btn:hover svg.arrow {
  transform: translateX(3px);
}

.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}
.btn--light {
  --btn-bg: var(--on-accent);
  --btn-fg: var(--accent-press);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 1.5px currentColor;
  background: color-mix(in oklch, currentColor 8%, transparent);
}
.btn--sm {
  min-height: 38px;
  padding: 0 var(--s-4);
  font-size: var(--text-sm);
}
.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-weight: 650;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) var(--start) calc(100% - 10px) / 100% 1.5px no-repeat;
  transition: background-size 300ms var(--ease-out);
}
.text-link:hover {
  background-size: 0% 1.5px;
  background-position: var(--end) calc(100% - 10px);
}

/* ---------- Reveal motion ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out),
    filter 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Photo fallbacks: studio JPGs on white melt into the paper */
.is-photo {
  mix-blend-mode: multiply;
}

@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;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] {
    transform: none;
    filter: none;
  }
}

/* Section eyebrows: sentence case in the brand sans, not tracked monospace capitals */
.section-head > .label,
.dive__copy > .label,
.lab__intro > .label,
.log__head > .label,
.savings__intro > .label,
.faq__intro > .label {
  font-family: var(--font-sans);
  font-stretch: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
