/* =========================================================================
   Braeside AI — braesideai.com
   Plain CSS, no build step. Design tokens from ../assets/brand/brand-sheet.md
   ========================================================================= */

/* ----------------------------- Tokens -------------------------------- */
:root {
  /* Brand palette */
  --navy: #2E4159;   /* primary */
  --ink: #1F2B3A;    /* deep backgrounds */
  --steel: #3C4A5B;  /* depth / panels */
  --mist: #C9D3DC;   /* pale backgrounds / dividers */
  --gold: #E7A33C;   /* single warm accent */
  --gold-deep: #cf8c27;
  --muted: #6B7280;  /* secondary text */
  --white: #FFFFFF;

  /* Applied roles */
  --bg: var(--white);
  --bg-soft: #F5F7F9;
  --text: var(--navy);
  --text-soft: var(--muted);
  --border: #E3E8ED;

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

  /* Layout */
  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31, 43, 58, 0.06), 0 12px 32px -12px rgba(31, 43, 58, 0.18);
  --shadow-lift: 0 2px 4px rgba(31, 43, 58, 0.08), 0 22px 48px -16px rgba(31, 43, 58, 0.28);
}

/* ----------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.section { padding-block: clamp(4rem, 8vw, 7rem); }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.75rem;
}
.eyebrow-dark { color: var(--gold-deep); }
.eyebrow-on-dark { color: var(--gold); }

.accent { color: var(--gold); }

.section-head { max-width: 46rem; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }
.section-title-light { color: var(--white); }
.section-lede, .contact-lede { color: var(--text-soft); font-size: 1.125rem; margin-top: 1rem; }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--navy); color: var(--white);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); z-index: 200;
}
.skip-link:focus { left: 0.5rem; }

/* Visible focus for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ----------------------------- Buttons ------------------------------- */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.9375rem; }
.btn-block { width: 100%; }

.btn-gold { --btn-bg: var(--gold); --btn-fg: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); }

.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.link-gold { color: var(--gold-deep); font-weight: 600; text-decoration-color: rgba(207,140,39,0.4); text-underline-offset: 3px; }
.link-gold:hover { text-decoration-color: var(--gold-deep); }

/* ------------------------------ Header ------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 40px; width: auto; }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 1.75rem; }
.nav-menu a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.9875rem;
  text-decoration: none; color: var(--navy);
}
.nav-menu a:not(.btn):hover { color: var(--gold-deep); }
.nav-menu .btn { color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle-bar { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--navy); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

/* ------------------------------- Hero -------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--ink) 70%);
  color: var(--white);
  padding-block: clamp(4.5rem, 12vw, 8.5rem);
}
.hero-motif { position: absolute; inset: 0; z-index: 0; }
.hero-motif svg { width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 1; max-width: 44rem; }
.hero .eyebrow { color: var(--gold); }
.hero-title {
  font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-sub { font-size: clamp(1.0625rem, 2.5vw, 1.3125rem); color: #D6DEE7; max-width: 34rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

/* ----------------------------- Services ------------------------------ */
.services { background: var(--bg); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.75rem; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--mist); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(231, 163, 60, 0.14); color: var(--gold-deep);
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.6rem; }
.card-body { color: var(--text-soft); font-size: 1rem; }

/* ------------------------------ About -------------------------------- */
.about { background: var(--bg-soft); }
.about-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-copy p { color: #47566a; margin-top: 1.1rem; max-width: 40rem; }
.about-copy .section-title { margin-bottom: 0.5rem; }
.about-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 1.75rem !important; padding: 0.6rem 1.1rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font-head); font-weight: 500; font-size: 0.9375rem; color: var(--navy);
}
.about-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.about-mark { display: flex; justify-content: center; }
.about-mark-img { width: min(260px, 70%); opacity: 0.95; }

/* ----------------------------- Contact ------------------------------- */
.contact { background: linear-gradient(160deg, var(--navy) 0%, var(--ink) 100%); color: var(--white); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.contact-copy .section-title { margin-bottom: 0.75rem; }
.contact-lede { color: #CBD5E0; }

.contact-form { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow-lift); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: 0.9375rem; color: var(--navy); margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--navy);
  padding: 0.75rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fbfcfd; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231,163,60,0.18); outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.field.invalid input, .field.invalid textarea { border-color: #d9534f; }
.form-note { font-size: 0.875rem; color: var(--muted); margin-top: 0.9rem; text-align: center; }
.form-note.error { color: #d9534f; font-weight: 500; }
.form-note.success { color: #2f8f4e; font-weight: 500; }

/* ------------------------------ Footer ------------------------------- */
.site-footer { background: var(--ink); color: #9AA7B4; padding-block: 3rem; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; }
.footer-logo { height: 44px; width: auto; }
.footer-tag { color: var(--mist); font-family: var(--font-head); font-weight: 500; }
.footer-meta { font-size: 0.9375rem; }
.link-muted { color: var(--gold); text-decoration: none; }
.link-muted:hover { text-decoration: underline; }

/* --------------------------- Responsive ------------------------------ */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}
@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-mark { order: -1; }
  .about-mark-img { width: 180px; }
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* Mobile nav */
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .nav-menu .btn { margin-top: 0.85rem; width: 100%; }
}
