/* ================================================================
   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 — three brand colours only (client, 2026-11-13):
     Marine Blue #01386A, Marigold #EAA221 and its glow #eaa221. The
     old navy/slate shades all collapse onto the one blue; the names
     stay so the rest of the CSS keeps working. */
  --navy: #01386a;
  --navy-deep: #01386a;
  --navy-mid: #01386a;
  --slate: #01386a;
  /* Secondary text on the dark blue rooms. It cannot be the blue itself
     (it would vanish into the background) and the client wants no greys,
     so it is the page's own white, dimmed. */
  --slate-light: rgba(255, 255, 255, 0.78);
  --orange: #eaa221;
  --orange-h: #eaa221;

  /* Light backgrounds — the cool and warm tints were off-brand blues
     and creams, so light sections are plain white now */
  --bg-white: #ffffff;
  --bg-cool: #ffffff;
  --bg-warm: #ffffff;
  --bg-hero: #ffffff;

  /* Text */
  --text-head: #01386a;
  --text-body: #01386a;
  --text-soft: rgba(1, 56, 106, 0.78); /* 4.5:1+ on white, paper and cool tints (QA 2026-10-27) */
  --text-xsoft: rgba(1, 56, 106, 0.55);

  /* Borders & shadows */
  --border: rgba(1, 56, 106, 0.16);
  --border-h: rgba(1, 56, 106, 0.3);
  --shadow-xs: 0 1px 4px rgba(1, 56, 106, 0.06);
  --shadow-sm: 0 2px 12px rgba(1, 56, 106, 0.08);
  --shadow-md: 0 6px 28px rgba(1, 56, 106, 0.11);
  --shadow-lg: 0 12px 48px rgba(1, 56, 106, 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: #01386a;
  --amber: #eaa221;
  /* Brand accent #EAA221 (--orange) + glow #eaa221 (--amber), client 2026-10-28 */
  /* These two used to be #EAA221 darkened so small yellow text met
     WCAG AA on white. The client asked for the exact brand yellow
     everywhere (2026-11-13), so they are plain #EAA221 now — small
     yellow-on-white text no longer meets the 4.5:1 minimum. */
  --orange-ink: #eaa221;
  --orange-ink-lg: #eaa221;
  --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;
}
