/* ==========================================================================
   Brightwire Electric — base.css
   Design tokens, reset, typography, layout primitives, animations.
   Edit colors/fonts here once and they cascade everywhere.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand: Navy + electric amber */
  --navy-950: #06121f;
  --navy-900: #0a1c30;
  --navy-800: #0f2740;
  --navy-700: #163450;
  --navy-600: #1e4368;

  --amber-300: #ffd27d;
  --amber-400: #ffc04d;
  --amber-500: #f5a524;   /* primary accent */
  --amber-600: #e08c12;

  /* Text */
  --ink-900: #0c1b2a;     /* darkest headings */
  --ink-700: #27384a;
  --ink-600: #3b4d60;     /* body copy */
  --muted-500: #6b7c8f;   /* secondary / captions */
  --on-dark: #e9f0f7;     /* body text on navy */
  --on-dark-muted: #9fb3c8;

  /* Surfaces */
  --surface-0: #ffffff;
  --surface-50: #f6f8fb;
  --surface-100: #eef2f7;
  --line-200: #e4e9f0;
  --white: #ffffff;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(10, 28, 48, .06), 0 1px 3px rgba(10, 28, 48, .08);
  --shadow-md: 0 6px 16px rgba(10, 28, 48, .08), 0 2px 6px rgba(10, 28, 48, .06);
  --shadow-lg: 0 24px 48px rgba(10, 28, 48, .14), 0 8px 16px rgba(10, 28, 48, .08);
  --ring: 0 0 0 4px rgba(245, 165, 36, .35);

  /* Radii */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Layout */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --header-h: 76px;
  --section-y: clamp(4rem, 9vw, 7.5rem);

  /* Type */
  --font-head: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- Modern reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-600);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Offset for the fixed header when jumping to in-page anchors */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { font-style: italic; color: var(--muted-500); } /* alt-text styling if image is missing */

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

a { color: var(--amber-600); text-decoration: none; }
a:hover { color: var(--amber-500); }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink-900);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 3.85rem); }
h2 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.55rem); }
h4 { font-size: 1.12rem; }

p { text-wrap: pretty; }
strong { color: var(--ink-700); font-weight: 600; }

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

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--navy { background: var(--navy-900); color: var(--on-dark); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--alt { background: var(--surface-50); }

.stack > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }

/* Section header block (eyebrow + title + lead) */
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-600);
  margin-bottom: .9rem;
}
.section--navy .eyebrow { color: var(--amber-400); }
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section-head--center .eyebrow::before { display: none; }

.lead { font-size: 1.15rem; color: var(--ink-600); }
.section--navy .lead, .section--navy p { color: var(--on-dark-muted); }

/* Generic responsive grid */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .95rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--amber-500); color: var(--navy-950); box-shadow: 0 8px 20px rgba(245, 165, 36, .35); }
.btn--primary:hover { background: var(--amber-400); color: var(--navy-950); box-shadow: 0 12px 26px rgba(245, 165, 36, .45); }

.btn--ghost { background: transparent; color: var(--ink-900); border-color: var(--line-200); }
.btn--ghost:hover { color: var(--ink-900); border-color: var(--ink-700); background: var(--surface-50); }

.btn--on-dark { background: rgba(255, 255, 255, .08); color: var(--white); border-color: rgba(255, 255, 255, .22); }
.btn--on-dark:hover { background: rgba(255, 255, 255, .16); color: var(--white); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1.08rem; }
.btn--block { width: 100%; }

/* ---- Scroll-reveal animation ------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---- Accessibility helpers --------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 1000;
  background: var(--navy-900); color: var(--white);
  padding: .7rem 1.1rem; border-radius: var(--radius-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--white); }
