/* ==========================================================================
   SCRUB & GLOW — Design System
   Tokens, reset, typography, layout primitives, header, footer, buttons
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Brand palette ---- */
  --navy: #06101F;
  --navy-soft: #0B1C33;
  --ink: #101925;
  --blue-rich: #1258D6;
  --blue-electric: #3A94FF;
  --blue-ice: #BDEBFF;
  --white-cloud: #F7FBFF;
  --gray-soft: #E9EEF5;
  --gray-mid: #9FB0C3;
  --gold-glow: #F0C987;

  /* ---- Semantic tokens ---- */
  --bg-dark: var(--navy);
  --bg-dark-soft: var(--navy-soft);
  --bg-light: var(--white-cloud);
  --bg-light-alt: var(--gray-soft);
  --text-on-dark: var(--white-cloud);
  --text-on-dark-muted: #9FB4D1;
  --text-on-light: var(--ink);
  --text-on-light-muted: #4C5A6E;
  --accent: var(--blue-electric);
  --accent-rich: var(--blue-rich);
  --accent-ice: var(--blue-ice);

  /* ---- Typography ---- */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* ---- Spacing scale ---- */
  --sp-3xs: 0.25rem;
  --sp-2xs: 0.5rem;
  --sp-xs: 0.75rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;
  --sp-2xl: 6rem;
  --sp-3xl: 9rem;

  /* ---- Layout ---- */
  --container-max: 1360px;
  --container-pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.5s;
  --dur-slow: 0.9s;

  /* ---- Elevation ---- */
  --shadow-soft: 0 20px 60px -20px rgba(6, 16, 31, 0.25);
  --shadow-deep: 0 40px 100px -30px rgba(6, 16, 31, 0.55);
  --shadow-glow: 0 0 80px -10px rgba(58, 148, 255, 0.35);

  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-cursor: 400;

  color-scheme: light;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-on-light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ---- Fluid type scale ---- */
.h-display { font-size: clamp(2.75rem, 7vw, 6.5rem); font-weight: 700; }
.h-xl { font-size: clamp(2.25rem, 5vw, 4.25rem); font-weight: 700; }
.h-lg { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.h-md { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.h-sm { font-size: clamp(1.15rem, 1.4vw, 1.5rem); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-on-light-muted);
  max-width: 54ch;
}
section.on-dark .lede,
.on-dark .lede { color: var(--text-on-dark-muted); }

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

.section { position: relative; padding-block: var(--sp-3xl); }
.section--tight { padding-block: var(--sp-2xl); }
.section.on-dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section.on-dark h1, .section.on-dark h2, .section.on-dark h3 { color: var(--text-on-dark); }

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

.skip-link {
  position: fixed;
  top: -60px; left: var(--sp-md);
  z-index: 999;
  background: var(--navy);
  color: var(--white-cloud);
  padding: 0.8em 1.4em;
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-md); }

/* ---- Focus states ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Buttons ---- */
.btn {
  position: relative;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  padding: 1.05em 2em;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  will-change: transform;
  white-space: nowrap;
}
.btn__label { white-space: nowrap; }
.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  display: block;
}

@media (max-width: 420px) {
  .btn {
    padding: 0.95em 1.5em;
    font-size: clamp(0.82rem, 3.6vw, 0.95rem);
    gap: 0.45em;
  }
}

.btn--primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 16px 40px -14px rgba(58, 148, 255, 0.6);
}
.btn--primary:hover { box-shadow: 0 20px 50px -12px rgba(58, 148, 255, 0.75); }

.btn--ghost-dark {
  background: transparent;
  color: var(--white-cloud);
  border: 1.5px solid rgba(247, 251, 255, 0.35);
}
.btn--ghost-dark:hover { border-color: var(--white-cloud); background: rgba(247, 251, 255, 0.08); }

.btn--ghost-light {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(16, 25, 37, 0.2);
}
.btn--ghost-light:hover { border-color: var(--navy); background: rgba(16, 25, 37, 0.05); }

.btn--text {
  padding: 0.3em 0;
  border-radius: 0;
  gap: 0.5em;
}
.btn--text::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
  opacity: 0.5;
}
.btn--text:hover::after { transform: scaleX(1); opacity: 1; }

.btn--sm { padding: 0.75em 1.5em; font-size: 0.85rem; }

/* magnetic wrapper target set by JS */
.magnetic { display: inline-block; }

/* ---- Site header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding-block: var(--sp-md);
  transition: padding var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), backdrop-filter var(--dur-med) var(--ease-out);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
}

.site-header.is-scrolled {
  padding-block: 0.9rem;
  background: rgba(6, 16, 31, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 20px 50px -30px rgba(0,0,0,0.6);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 0.9rem + 0.55vw, 1.35rem);
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.brand:hover { opacity: 0.88; }
.brand__word { color: var(--white-cloud); }
.brand__word-glow { color: var(--blue-electric); }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}
.nav-desktop__links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.nav-desktop__links a {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(247, 251, 255, 0.82);
  padding-block: 0.4em;
}
.nav-desktop__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--blue-electric);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}
.nav-desktop__links a:hover,
.nav-desktop__links a[aria-current="page"] { color: var(--white-cloud); }
.nav-desktop__links a:hover::after,
.nav-desktop__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: var(--sp-sm); }
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white-cloud);
  white-space: nowrap;
}
.nav-phone svg { width: 1.1em; height: 1.1em; flex: 0 0 auto; color: var(--blue-electric); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247,251,255,0.25);
  color: var(--white-cloud);
  flex-shrink: 0;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) + 1);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  padding: 6.5rem var(--sp-lg) var(--sp-lg);
  transform: translateY(-100%);
  transition: transform var(--dur-slow) var(--ease-in-out);
  overflow-y: auto;
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav__links { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: var(--sp-xl); }
.mobile-nav__links a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 600;
  color: var(--white-cloud);
  padding-block: 0.3em;
  border-bottom: 1px solid rgba(247,251,255,0.08);
}
.mobile-nav__meta { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-md); }
.mobile-nav__meta a:not(.btn) { color: var(--text-on-dark-muted); font-size: 0.95rem; }
.mobile-nav__meta .btn { justify-content: center; }

/* ---- Scroll progress ---- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-rich), var(--blue-electric), var(--blue-ice));
  z-index: calc(var(--z-nav) + 1);
  transition: width 0.1s linear;
}

/* ---- Floating mobile contact ---- */
.float-contact {
  position: fixed;
  right: var(--sp-md);
  bottom: var(--sp-md);
  z-index: var(--z-overlay);
  display: none;
  align-items: center;
  gap: 0.6em;
  background: var(--accent);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.9em 1.3em;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-deep);
}
.float-contact svg { width: 1.2em; height: 1.2em; }
body.nav-open .float-contact { display: none; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: var(--text-on-dark-muted);
  padding-block: var(--sp-2xl) var(--sp-lg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(247, 251, 255, 0.1);
}
.footer-grid > * { min-width: 0; }
.footer-brand .brand { margin-bottom: var(--sp-sm); }
.footer-brand p { max-width: 32ch; font-size: 0.92rem; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-cloud);
  margin-bottom: var(--sp-sm);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6em; }
.footer-col a { font-size: 0.92rem; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--white-cloud); }
.footer-social { display: flex; gap: 0.7em; margin-top: var(--sp-md); }
.footer-social a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(247,251,255,0.18);
  border-radius: 50%;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  padding-top: var(--sp-lg);
  font-size: 0.82rem;
}
.footer-bottom__links { display: flex; gap: var(--sp-md); }

/* ---- Forms (base) ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  margin-bottom: var(--sp-md);
}
.field label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-on-light);
}
.field input,
.field select,
.field textarea {
  background: var(--white-cloud);
  border: 1.5px solid var(--gray-soft);
  border-radius: var(--radius-sm);
  padding: 0.9em 1.1em;
  font-size: 0.98rem;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(58, 148, 255, 0.15);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field--error input,
.field--error select,
.field--error textarea { border-color: #E5484D; }
.field__error { font-size: 0.8rem; color: #E5484D; display: none; }
.field--error .field__error { display: block; }
.field__hint { font-size: 0.8rem; color: var(--text-on-light-muted); }

.checkbox-field { display: flex; align-items: flex-start; gap: 0.7em; }
.checkbox-field input { width: 1.2em; height: 1.2em; margin-top: 0.2em; accent-color: var(--accent-rich); }
.checkbox-field label { font-family: var(--font-body); font-weight: 400; font-size: 0.88rem; color: var(--text-on-light-muted); }
