/* ==========================================================================
   HexaMSP — base.css
   Design tokens, reset, typography, and shared utilities.
   Load order: base.css -> layout.css -> components.css -> pages.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette — "night sky + gulf sunset" ----------------------------- */
  --navy-900: #0A0F1E;   /* page background                                 */
  --navy-800: #0D1526;   /* alternating band background (derived)           */
  --navy-700: #12213A;   /* cards, header, footer                           */
  --navy-600: #1B2E4D;   /* raised surfaces, hover fills (derived)          */
  --cyan:     #00D4FF;   /* structural + interactive accent                 */
  --coral:    #FF7A45;   /* PRIMARY CTA ONLY — keep rare so it keeps impact */
  --coral-hi: #FF6428;   /* coral hover (derived)                           */
  --paper:    #F5F8FB;   /* text on dark, and light-section backgrounds     */

  /* Text ------------------------------------------------------------------ */
  --text:       var(--paper);
  --text-muted: rgba(245, 248, 251, 0.68);
  --text-faint: rgba(245, 248, 251, 0.46);

  /* Lines, fills, shadow -------------------------------------------------- */
  --line:        rgba(245, 248, 251, 0.09);
  --line-strong: rgba(245, 248, 251, 0.16);
  --cyan-line:   rgba(0, 212, 255, 0.34);
  --cyan-wash:   rgba(0, 212, 255, 0.07);
  --cyan-wash-2: rgba(0, 212, 255, 0.13);
  --shadow-card: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-lift: 0 24px 50px -26px rgba(0, 0, 0, 0.95);

  /* Type ------------------------------------------------------------------ */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step-hero: clamp(2.55rem, 1.55rem + 4.3vw, 4.85rem);
  --step-h2:   clamp(1.95rem, 1.42rem + 2.3vw, 3.1rem);
  --step-h3:   clamp(1.25rem, 1.12rem + 0.55vw, 1.5rem);
  --step-h4:   1.0625rem;
  --step-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --step-body: 1.0625rem;
  --step-sm:   0.9375rem;
  --step-xs:   0.8125rem;
  --step-label: 0.72rem;

  /* Layout ---------------------------------------------------------------- */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 72px;

  /* Motion ---------------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.18s var(--ease);
  --t-mid: 0.3s var(--ease);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::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) + 1.5rem);
}

body {
  background-color: var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Keeps full-bleed decorative layers from creating a horizontal scrollbar */
  overflow-x: hidden;
}

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

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

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

table { border-collapse: collapse; width: 100%; }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 { font-size: var(--step-hero); line-height: 1.03; letter-spacing: -0.032em; }
h2 { font-size: var(--step-h2); letter-spacing: -0.026em; }
h3 { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.018em; }
h4 { font-size: var(--step-h4); font-weight: 600; letter-spacing: -0.01em; }

p { text-wrap: pretty; }

a { color: var(--cyan); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--paper); }

strong { font-weight: 600; color: var(--paper); }

/* Eyebrow — mono kicker with a short cyan rule. Sits above every section H2. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.15rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
  flex: none;
}

.lead {
  font-size: var(--step-lead);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 62ch;
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   4. Utilities
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: calc(860px + var(--gutter) * 2); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head > p { margin-top: 1.15rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--cyan);
  color: var(--navy-900);
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: transform var(--t-fast);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--navy-900); }

/* Hexagon tessellation — the site's signature texture.
   Hexagons tile a surface with no gaps, which is the shape of the promise:
   coverage without holes. Kept faint, and used in only two places. */
.hexfield {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34.64' height='60' viewBox='0 0 34.64 60'%3E%3Cg fill='none' stroke='%2300D4FF' stroke-width='1'%3E%3Cpath d='M17.32 -5 0 5 0 25 17.32 35 34.64 25 34.64 5Z'/%3E%3Cpath d='M0 25 -17.32 35 -17.32 55 0 65 17.32 55 17.32 35Z'/%3E%3Cpath d='M34.64 25 17.32 35 17.32 55 34.64 65 51.96 55 51.96 35Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 52px 90px;
  background-repeat: repeat;
}

/* --------------------------------------------------------------------------
   5. Focus + motion preferences
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--cyan); color: var(--navy-900); }

/* Scroll reveal. Scoped to html.js so the page stays fully readable
   without JavaScript instead of being stuck at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
