/* ============================================================
   BRK Global Solutions — base.css
   Design tokens · reset · typography · buttons · header · footer
   ============================================================ */

:root {
  /* Palette — ink navy, warm ivory, signature gold */
  --ink: #0a1628;
  --ink-2: #0e1d33;
  --ink-3: #16273f;
  --ink-soft: #22354f;
  --ivory: #faf9f6;
  --paper: #f3f1ec;
  --white: #ffffff;
  --gold: #c9a227;
  --gold-bright: #d4af37;
  --gold-soft: #e7c65c;
  --gold-deep: #8f6b14;
  --slate: #4b5a6b;
  --slate-light: #7c8a9a;
  --line: #e4e0d6;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-dark-2: rgba(255, 255, 255, 0.07);

  /* Typography */
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Rhythm */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.18s;
  --t-med: 0.35s;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.06), 0 2px 8px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 6px 24px rgba(10, 22, 40, 0.10), 0 2px 6px rgba(10, 22, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(10, 22, 40, 0.16), 0 8px 20px rgba(10, 22, 40, 0.08);
}

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

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

@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;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

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

::selection { background: rgba(201, 162, 39, 0.28); color: var(--ink); }

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { padding-block: var(--section-y); position: relative; }
.alt { background: var(--white); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}

h1 em, h2 em, .cta-title em {
  font-style: italic;
  color: var(--gold-deep);
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-index {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.section-index::after {
  content: "";
  height: 1px;
  width: 3.5rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

.section-sub {
  margin-top: 1.1rem;
  font-size: 1.05rem;
  max-width: 60ch;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
  transition: gap var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.text-link:hover { gap: 0.85rem; color: var(--gold-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease),
    background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
  will-change: transform;
}

.btn svg { width: 1.05em; height: 1.05em; }

.btn-lg { padding: 1rem 2.1rem; font-size: 1rem; }

.btn:active { transform: translateY(1px) scale(0.99); }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(201, 162, 39, 0.45);
  background: linear-gradient(160deg, var(--gold-soft), var(--gold-bright));
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--ivory);
  transform: translateY(-2px);
}

.btn-ghost-light {
  color: var(--ivory);
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

.btn-ghost-light:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: var(--ivory);
  background: transparent;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
}

.btn-outline-light:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: top var(--t-med) var(--ease);
}

.skip-link:focus { top: 1rem; }

/* ---------- Screen-reader-only text ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-dark-2);
  transition: background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(10, 22, 40, 0.88);
  box-shadow: 0 10px 30px rgba(4, 10, 20, 0.35);
  border-bottom-color: var(--line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(201, 162, 39, 0.35);
}

.brand-text {
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  display: flex;
  flex-direction: column;
}

.brand-text em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 249, 246, 0.55);
  margin-top: 0.3rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.site-nav ul { display: flex; gap: 1.6rem; }

.site-nav ul a {
  color: rgba(250, 249, 246, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  position: relative;
  transition: color var(--t-fast) var(--ease);
}

.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}

.site-nav ul a:hover,
.site-nav ul a.is-active { color: var(--ivory); }

.site-nav ul a:hover::after,
.site-nav ul a.is-active::after { transform: scaleX(1); }

.btn-nav { padding: 0.6rem 1.3rem; font-size: 0.88rem; flex-shrink: 0; }

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(250, 249, 246, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.nav-phone svg { width: 1rem; height: 1rem; color: var(--gold-bright); }

.nav-phone:hover { color: var(--gold-bright); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ivory);
  border-radius: 2px;
  margin-inline: auto;
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(250, 249, 246, 0.66);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
}

.footer-brand p { margin-top: 1.1rem; font-size: 0.95rem; max-width: 34ch; }

.footer-phone {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.footer-col h3 {
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.footer-col ul { display: grid; gap: 0.55rem; }

.footer-col ul a {
  font-size: 0.95rem;
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}

.footer-col ul a:hover { color: var(--gold-bright); padding-left: 4px; }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line-dark-2);
  font-size: 0.85rem;
}

.footer-tag { color: rgba(250, 249, 246, 0.6); letter-spacing: 0.08em; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  background: rgba(14, 29, 51, 0.85);
  backdrop-filter: blur(8px);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease),
    visibility var(--t-med), background var(--t-fast) var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.to-top:hover { background: var(--gold); color: var(--ink); }

.to-top svg { width: 20px; height: 20px; }

/* ---------- Reveal-on-scroll (JS-gated) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- Count-up stats ---------- */
.hero-stats dt {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.1;
}

.hero-stats dt::after {
  content: attr(data-suffix);
  color: var(--gold-bright);
}
