/* ================================================================
   TARABA BizComm — Base stylesheet
   css/base.css | Loaded first, by all 5 pages.
   Contains: design tokens (one source of truth), reset, typography
   utilities, buttons, and the shared form-validation states.

   Split out of the old css/style.css during the CSS-architecture
   refactor (Task 7) — this file now holds only truly page-agnostic
   rules; nav/footer/WhatsApp/.bottom-cta moved to css/layout.css, and
   every page-specific selector that used to live here moved to its
   own css/pages/<page>.css.
================================================================ */

/* ─────────────────────────────────────────────
       FONTS — self-hosted (QA 2026-10-27)
       Latin subsets of the two Google Fonts (SIL Open Font
       License), both variable, so one file covers every weight.
       Self-hosting removes a render-blocking request to a second
       server; every page also <link rel="preload">s both files.
    ───────────────────────────────────────────── */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────────────────────────
       DESIGN TOKENS — LIGHT THEME
    ───────────────────────────────────────────── */
:root {
  /* Core palette */
  --navy: #0d1b3e;
  --navy-deep: #0a1628;
  --navy-mid: #1a3060;
  --slate: #3a5a8c;
  --slate-light: #a8bfda;
  --orange: #eaa221;
  --orange-h: #f4b400;
  --orange-pale: #fdf3e1;

  /* Light backgrounds */
  --bg-white: #ffffff;
  --bg-cool: #f4f7ff; /* sections: cool tint */
  --bg-warm: #fffaf0; /* sections: warm tint */
  --bg-hero: linear-gradient(140deg, #ebf0ff 0%, #f8faff 48%, #fff8e8 100%);

  /* Text */
  --text-head: #0d1b3e;
  --text-body: #374151;
  --text-soft: #626976; /* 4.5:1+ on white, paper and cool tints (QA 2026-10-27) */
  --text-xsoft: #9ca3af;

  /* Borders & shadows */
  --border: #e5e9f2;
  --border-h: #cbd5e9;
  --shadow-xs: 0 1px 4px rgba(13, 27, 62, 0.06);
  --shadow-sm: 0 2px 12px rgba(13, 27, 62, 0.08);
  --shadow-md: 0 6px 28px rgba(13, 27, 62, 0.11);
  --shadow-lg: 0 12px 48px rgba(13, 27, 62, 0.14);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 50px;

  /* Spacing */
  --max-w: 1280px;
  --pad-x: 32px;
  --sec-y: 96px;

  /* Font stacks */
  --f-display: "Plus Jakarta Sans", sans-serif;
  --f-body: "Inter", sans-serif;

  /* Transitions */
  --tr: 220ms ease;

  /* ── Showroom tokens (Phase 5 — see docs/design-system.md) ── */
  /* Brand colours sampled from the logo file */
  --brand-navy: #063b6f;
  --amber: #f4b400;
  /* Brand accent #EAA221 (--orange) + glow #F4B400 (--amber), client 2026-10-28 */
  --orange-ink: #95650e; /* #EAA221 darkened for text: 4.65:1 on paper, 5.1:1 on white */
  --orange-ink-lg: #ba7e12; /* large/bold headings only: 3.2:1 on paper, 3.5:1 on white */
  --paper: #f7f5f1;
  --white: #ffffff;

  /* Type scale */
  --fs-display: clamp(44px, 6.4vw, 84px);
  --fs-h1: clamp(36px, 4.6vw, 60px);
  --fs-h2: clamp(28px, 3.2vw, 44px);
  --fs-h3: clamp(19px, 1.6vw, 22px);
  --fs-lead: clamp(17px, 1.4vw, 20px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 12px;

  /* Spacing scale (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --room-y: clamp(72px, 10vw, 128px);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-micro: 200ms;
  --dur-reveal: 600ms;
}

/* ─────────────────────────────────────────────
       RESET
    ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--f-body);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ─────────────────────────────────────────────
       UTILITIES
    ───────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.d1 {
  transition-delay: 0.08s;
}
.d5 {
  transition-delay: 0.4s;
}
.d6 {
  transition-delay: 0.48s;
}

/* ─────────────────────────────────────────────
       BUTTONS
    ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-pill);
  padding: 13px 30px;
  cursor: pointer;
  border: none;
  transition: all 180ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--navy); /* white fails contrast on the amber accent */
  box-shadow: 0 4px 16px rgba(234, 162, 33, 0.3);
}
.btn-primary:hover {
  background: var(--orange-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(234, 162, 33, 0.38);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-h);
}
.btn-outline:hover {
  border-color: var(--navy);
  background: var(--bg-cool);
}
.btn-outline-orange {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-outline-orange:hover {
  background: var(--orange);
  color: #fff;
}

/* ─────────────────────────────────────────────
       RESPONSIVE — TABLET / MOBILE token overrides
    ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  :root {
    --sec-y: 72px;
    --pad-x: 24px;
  }
}
@media (max-width: 767px) {
  :root {
    --sec-y: 56px;
    --pad-x: 18px;
  }
}

/* ─────────────────────────────────────────────
   FORM VALIDATION / SUBMIT STATES — shared by
   #modalForm (index.html) and #contactForm
   (contact.html) via js/forms.js
   ───────────────────────────────────────────── */
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #dc2626;
}
.field-error.show {
  display: block;
}
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid,
.modal__input.is-invalid,
.modal__select.is-invalid,
.modal__textarea.is-invalid {
  border-color: #f87171;
}
.form-send-error {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13.5px;
  line-height: 1.6;
}
.form-send-error.show {
  display: block;
}
.form-send-error a {
  color: #991b1b;
  font-weight: 700;
  text-decoration: underline;
}
/* Honeypot — present for bots, invisible and unreachable for people */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─────────────────────────────────────────────
       ACCESSIBILITY (Task 8)
    ───────────────────────────────────────────── */

/* "Skip to content" — invisible until it receives keyboard focus,
   then jumps above everything (including the fixed nav) so it's the
   very first thing a keyboard/screen-reader user can act on. */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 2000;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
}

/* Visible keyboard-focus outline for every interactive element.
   Uses :focus-visible so it shows for keyboard/switch navigation
   without adding a ring to every mouse click. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Locks background scroll while the mobile drawer or the contact
   modal is open (toggled on <body> by js/main.js / js/pages/index.js). */
body.no-scroll {
  overflow: hidden;
}
