/* ─── SHARED STYLESHEET ─────────────────────────────────────────────────────
   styles.css — Value Alignment Consulting
   Shared across: index.html, speaking.html, insights.html
   ──────────────────────────────────────────────────────────────────────────── */

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

/* ─── DESIGN TOKENS ──────────────────────────────────────────────────────── */
:root {
  --bg-dark:    #0E1118;
  --bg-dark-2:  #151B24;
  --bg-light:   #F4EFE5;
  --bg-white:   #FDFAF4;
  --text-dark:  #1A1814;
  --text-light: #EDE8DE;
  --text-muted-dark:  #9A9288;
  --text-muted-light: #5A5550;
  --accent:       #C09030;
  --accent-bright: #D4A843;
  --accent-text:  #7A5A10; /* WCAG AA on light backgrounds (5.5:1 contrast) */
  --rule-dark:  rgba(192,144,48,0.25);
  --rule-light: rgba(26,24,20,0.12);
  --ff-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --ff-body:    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── BASE ───────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── GRAIN OVERLAY ──────────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.028;
}

/* ─── NAV — shared structure ─────────────────────────────────────────────── */
/* Canonical nav sizing — !important forces consistency across
   per-page inline overrides so items don't shift page-to-page. */
nav {
  height: 72px !important;
  padding: 0 clamp(20px, 4vw, 48px) !important;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-decoration: none;
  text-align: center;
}
.nav-logo-name {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

.nav-logo-sub {
  font-family: var(--ff-body);
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px !important;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li {
  display: flex;
  align-items: center;
  line-height: 1;
}
.nav-links a {
  font-family: var(--ff-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text-light); }
.nav-links a.active { color: var(--accent-bright); }

/* ─── TWO-ROW NAV ────────────────────────────────────────────────────────────
   Desktop layout (>=901px):
     Row 1: logo (left) + Contact CTA (right)
     Row 2: full-width centered nav links
   Works with existing flat HTML structure via CSS Grid (no markup changes).
   Mobile (<=900px) styles in each page's own inline block override this
   back to a single-row + hamburger-panel layout. */

@media (min-width: 901px) {
  nav {
    /* Two rows; logo+cta share row 1, ul spans row 2. hamburger hidden. */
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "logo . cta"
      "links links links" !important;
    row-gap: 6px;
    column-gap: 32px;
    padding-top: 14px !important;
    padding-bottom: 10px !important;
    height: auto !important;
    align-items: center;
  }
  nav > .nav-logo     { grid-area: logo; }
  nav > .nav-cta      { grid-area: cta;  justify-self: end; }
  nav > .nav-links    { grid-area: links; justify-self: center; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.06); width: 100%; justify-content: center; padding-top: 10px !important; }
  nav > .nav-hamburger { display: none !important; }
}

/* ─── NAV DROPDOWN (legacy — no longer used in primary nav) ────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  font-family: var(--ff-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] { color: var(--text-light); }
.nav-dropdown-caret {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.15s;
}
.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #0E1118;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 200;
  border-radius: 2px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu li { display: block; padding: 0; margin: 0; }
.nav-dropdown-menu a {
  display: block;
  padding: 11px 18px;
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  color: var(--text-light);
  background: rgba(255,255,255,0.04);
}
.nav-dropdown-menu a .nav-dropdown-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-muted-dark);
  opacity: 0.7;
  text-transform: none;
  margin-top: 3px;
  font-weight: 300;
}

.nav-cta {
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dark);
  background: var(--accent);
  text-decoration: none;
  padding: 10px 22px;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent-bright); transform: translateY(-1px); }

/* ─── SKIP LINK ──────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--accent);
  color: var(--text-dark);
  padding: 8px 20px;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ─── FOCUS STYLES ───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

/* ─── HAMBURGER NAV ──────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  z-index: 101;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── SCROLL ANIMATIONS ──────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
