/* ==========================================================================
   HYTES — base.css
   Design tokens, reset, typography, layout primitives, motion utilities.
   ========================================================================== */

:root {
  /* --- Brand palette, sampled from the HYTES logo ------------------------ */
  --ink:            #05070f;   /* near-black navy — darkest surface        */
  --navy:           #0a1129;   /* deep navy — primary dark surface         */
  --navy-2:         #0e1738;   /* raised navy — cards on dark              */
  --navy-3:         #16214b;   /* hairlines on dark                        */
  --blue:           #0263fe;   /* electric blue — logo aircraft            */
  --blue-deep:      #0146bc;
  --cyan:           #03ccfe;   /* cyan — logo ring                         */
  --violet:         #6e4bff;   /* violet — secondary accent, used sparingly */
  --paper:          #f4f7fc;   /* light section surface                    */
  --paper-2:        #e9eefa;
  --white:          #ffffff;

  /* --- Text ------------------------------------------------------------- */
  --text:           #0b1020;
  --text-muted:     #4a5570;
  --text-faint:     #6b7590;
  --text-on-dark:   #eaf0ff;
  --text-on-dark-muted: #9aa8cc;

  /* --- Lines & shadows -------------------------------------------------- */
  --line:           #dbe3f2;
  --line-strong:    #c3cfe6;
  --line-dark:      rgba(120, 160, 255, 0.16);

  --shadow-sm:  0 1px 2px rgba(10, 17, 41, 0.06);
  --shadow-md:  0 8px 24px -12px rgba(10, 17, 41, 0.22);
  --shadow-lg:  0 28px 60px -32px rgba(10, 17, 41, 0.35);
  --shadow-blue: 0 16px 40px -18px rgba(2, 99, 254, 0.55);

  /* --- Type ------------------------------------------------------------- */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.813rem, 0.79rem + 0.11vw, 0.875rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.063rem);
  --step-1:  clamp(1.125rem, 1.07rem + 0.28vw, 1.281rem);
  --step-2:  clamp(1.375rem, 1.27rem + 0.52vw, 1.688rem);
  --step-3:  clamp(1.688rem, 1.5rem + 0.94vw, 2.25rem);
  --step-4:  clamp(2.125rem, 1.79rem + 1.68vw, 3.125rem);
  --step-5:  clamp(2.5rem, 1.99rem + 2.55vw, 4rem);

  /* --- Space & shape ---------------------------------------------------- */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;
  --maxw: 1240px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --header-h: 76px;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

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

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

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

/* ==========================================================================
   Typography
   ========================================================================== */

.display,
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-variation-settings: "wdth" 112;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); font-variation-settings: "wdth" 106; letter-spacing: -0.015em; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
  text-wrap: pretty;
}

.body-muted { color: var(--text-muted); text-wrap: pretty; }

/* Mono utility face — labels, coordinates, step numbers, data */
.mono {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 0.9rem;
}

.eyebrow--dark { color: var(--cyan); }

.grad-text {
  background: linear-gradient(96deg, var(--cyan) 6%, var(--blue) 52%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

.wrap--narrow { max-width: 900px; }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head p { margin-top: 1.1rem; }

.section--dark {
  background: var(--navy);
  color: var(--text-on-dark);
}
.section--dark h2 { color: var(--white); }
.section--dark .body-muted,
.section--dark .lede { color: var(--text-on-dark-muted); }

.section--paper { background: var(--paper); }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--white);
  color: var(--navy);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.section--dark :where(a, button, input, select, textarea):focus-visible {
  outline-color: var(--cyan);
}

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

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; will-change: auto; }

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