/* ==========================================================================
   Gatepro Corporate Website — global.css
   Wave 00 · Design tokens · Reset · Base elements · Layout utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-navy-900: #07111f;
  --color-navy-800: #0c1d33;
  --color-navy-700: #14304f;
  --color-blue-500: #146cff;
  --color-blue-600: #0b57d0; /* text-safe blue on light surfaces (AA) */
  --color-blue-400: #3f8bff;
  --color-cyan-400: #20c7e8;
  --color-teal-500: #16b8a6;
  --color-teal-600: #0c8275; /* text-safe teal on light surfaces (AA) */
  --color-emerald-500: #21c783;
  --color-soft-white: #f5f8fc;
  --color-white: #ffffff;

  /* Derived neutrals (tints & shades of Deep Navy for text/surfaces) */
  --color-ink: #0e1a2c;   /* primary text on light surfaces   */
  --color-slate: #46566c; /* secondary text on light surfaces */
  --color-mist: #7e8ca0;  /* tertiary text / captions         */
  --color-line: #dde5f0;  /* borders on light surfaces        */
  --color-line-dark: rgba(245, 248, 252, 0.14); /* borders on navy */

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #146cff 0%, #20c7e8 58%, #16b8a6 100%);

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.65;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm: 40rem;
  --container-md: 56rem;
  --container-lg: 75rem; /* 1200px */
  --container-pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-height: 4.5rem;
  --section-space: clamp(4.5rem, 3.5rem + 4vw, 7.5rem);

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(7, 17, 31, 0.06), 0 2px 8px rgba(7, 17, 31, 0.05);
  --shadow-md: 0 12px 32px -12px rgba(7, 17, 31, 0.22);
  --shadow-lg: 0 28px 64px -24px rgba(7, 17, 31, 0.4);
  --shadow-glow: 0 10px 28px -8px rgba(20, 108, 255, 0.5);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
  --duration-base: 260ms;
  --duration-slow: 480ms;

  /* Z-index scale */
  --z-header: 100;
  --z-overlay: 200;

  /* Breakpoints — consumed in responsive.css (documented here):
     sm 640 · md 768 · lg 1024 · xl 1280 */
}

/* --------------------------------------------------------------------------
   2. Modern reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-wrap: balance;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

strong { font-weight: 600; }

::selection {
  background: rgba(20, 108, 255, 0.92);
  color: var(--color-white);
}

:focus-visible {
  outline: 2px solid var(--color-cyan-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect reduced-motion preferences */
@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;
  }
}

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

.container--wide { max-width: 82rem; }
.container--narrow { max-width: var(--container-md); }

.section {
  padding-block: var(--section-space);
}

.section--muted {
  background-color: var(--color-soft-white);
}

/* Section heading block: eyebrow + title + lead */
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.section-head .eyebrow { margin-bottom: var(--space-4); }

.section-head .lead {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-slate);
}

/* --------------------------------------------------------------------------
   4. Typographic utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-blue-600);
}

.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 2rem;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
}

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

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   5. Accessibility helpers
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: calc(var(--z-overlay) + 1);
  padding: var(--space-3) var(--space-5);
  background: var(--color-navy-900);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}
