/*
 * BuildVision Design Tokens & Global Styles
 * Single source of truth — linked from every page via:
 *   <link rel="stylesheet" href="/typography-tokens.css">
 *
 * Google Fonts URL (every page, before this stylesheet):
 *   https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;1,9..144,600&family=Inter:wght@400;500;600;700&display=swap
 */

:root {
  /* ── Color palette ── */
  --bv-blue-100: #E8E8FF;
  --bv-blue-400: #4F2AE0;
  --bv-blue-600: #2D1B69;
  --bv-blue-700: #2D1B8D;
  --olive-400:   #B5B840;
  --olive-100:   #F4F4E0;
  --neutral-50:  #F5F3F0;
  --neutral-100: #EDEDED;
  --neutral-200: #C9CBCF;
  --neutral-400: #9E9EA5;
  --neutral-700: #535357;
  --neutral-900: #1A1A1A;
  --green-50:    #EEFBF4;
  --green-100:   #82FFDA;
  --green-400:   #4ADE80;
  --green-700:   #0B8648;
  --red-100:     #FFDADA;
  --red-400:     #EC4343;
  --yellow-100:  #FFECAA;
  --yellow-400:  #FFCC17;
  --yellow-700:  #CC9300;

  /* ── Gold/cream accent ── */
  --gold-400: #D4C9A8;
  --gold-100: #EDE8D8;

  /* ── Gradients ── */
  --gradient-start: #2D1B69;
  --gradient-end:   #6C3AED;
  --gradient-hero: linear-gradient(135deg, #2D1B69, #6C3AED);

  /* ── Semantic aliases ── */
  --ink:   var(--neutral-900);
  --paper: var(--neutral-50);

  /* ── Font ── */
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Fraunces', serif;

  /* ── Text color tokens ── */
  --text-primary:   var(--neutral-900);
  --text-secondary: var(--neutral-700);
  --text-muted:     var(--neutral-400);
  --text-inverse:   #FFFFFF;
  --text-accent:    var(--bv-blue-400);
  --text-link:      var(--green-700);

  /* ── Type scale ── */
  --text-display:  clamp(40px, 8vw, 60px);
  --text-h1:       clamp(32px, 6vw, 44px);
  --text-h2:       34px;
  --text-h3:       20px;
  --text-subtitle: 20px;
  --text-body-lg:  17px;
  --text-body:     16px;
  --text-sm:       14px;
  --text-xs:       13px;

  /* ── Weights ── */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ── Line heights ── */
  --leading-tight:  1.1;
  --leading-snug:   1.2;
  --leading-normal: 1.6;

  /* ── Radii ── */
  --radius-pill:    999px;
  --radius-card:    16px;
  --radius-section: 24px;

  /* ── Spacing ── */
  --space-section-gap: clamp(80px, 12vw, 120px);
  --space-row-gap: 40px;
  --space-panel-gap: 24px;
  --space-before-footer: 48px;
  --main-padding-top: 88px;
  --main-padding-bottom: 72px;
  --space-card-padding: clamp(24px, 5vw, 48px);
  --space-card-padding-lg: clamp(40px, 8vw, 80px);
  --space-card-padding-sm: 24px;
  --space-page-gutter: 24px;

  /* ── Motion (spring curves only) ── */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snappy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Shadows ── */
  --shadow-card:
    0 0 0 1px rgba(27, 26, 24, 0.03),
    0 1px 2px rgba(27, 26, 24, 0.04),
    0 4px 12px rgba(27, 26, 24, 0.03);
  --shadow-card-hover:
    0 0 0 1px rgba(27, 26, 24, 0.03),
    0 4px 8px rgba(27, 26, 24, 0.04),
    0 8px 24px rgba(27, 26, 24, 0.06);
  --shadow-hero-cta: 0 2px 8px rgba(27, 26, 24, 0.08);
  --shadow-hero-glow:
    0 8px 40px rgba(45, 27, 105, 0.25),
    0 2px 8px rgba(108, 58, 237, 0.15);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Base typography ── */
body {
  font-family: var(--font-primary);
  background: var(--paper);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, button, input {
  font-family: var(--font-primary);
  color: var(--text-primary);
}

p, li, td, th {
  font-family: var(--font-primary);
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: opacity 0.15s var(--ease-spring);
}

a:hover {
  opacity: 0.8;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--bv-blue-400);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── Content headings (inside main) ── */
main h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-rendering: optimizeLegibility;
}

main h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 14px;
}

main h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  margin-top: 28px;
  margin-bottom: 10px;
}

/* ── Navigation (site header only — not <nav class="breadcrumb"> or in-page nav) ── */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(245, 243, 240, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s var(--ease-spring);
}

.nav-link:hover {
  color: var(--text-accent);
  opacity: 1;
}

.nav-link--active {
  color: var(--text-accent);
  font-weight: var(--weight-semibold);
}

.nav-btn {
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  padding: 10px 24px;
  background: var(--bv-blue-400);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
  display: inline-block;
}

.nav-btn:hover {
  background: var(--bv-blue-600);
  transform: translateY(-1px);
  opacity: 1;
}

.nav-btn:active {
  transform: scale(0.98) translateY(0);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border-radius: 10px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(245, 243, 240, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--neutral-200);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    align-items: stretch;
  }

  .nav-links.nav-open { display: flex; }
  .nav-link { font-size: var(--text-body); text-align: left; }
  .nav-btn { font-size: var(--text-body); padding: 12px 24px; text-align: center; }
}

/* ── Buttons ── */
.btn-primary {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  background: var(--bv-blue-400);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 36px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
}

.btn-primary:hover {
  background: var(--bv-blue-600);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-primary:active {
  transform: scale(0.98) translateY(0);
}

.btn-secondary {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--olive-400);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s var(--ease-spring), transform 0.15s var(--ease-spring);
}

.btn-secondary:hover {
  background: var(--olive-100);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-secondary:active {
  transform: scale(0.98) translateY(0);
}

/* ── Cards ── */
.card {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  box-shadow: var(--shadow-card);
  transition: transform 200ms var(--ease-spring), box-shadow 200ms var(--ease-spring);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card--mint {
  background: var(--green-50);
}

.card--bordered {
  border: 1.5px solid var(--olive-400);
  box-shadow: none;
}

.card--bordered:hover {
  box-shadow: none;
}

/* ── Section wrapper ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-page-gutter);
}

.section + .section {
  margin-top: var(--space-section-gap);
}

/* ── Footer ── */
footer {
  background: var(--neutral-900);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: var(--space-before-footer);
  padding: 56px var(--space-page-gutter) 36px;
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  text-decoration: none;
  font-weight: var(--weight-normal);
  transition: color 0.15s var(--ease-spring);
}

footer a:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

footer a:focus-visible {
  outline-color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
  max-width: 1060px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
}

/* ── Breadcrumbs (guides, articles) — in-flow, not full-bleed flex row ── */
.breadcrumb {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-normal);
  margin: 0 0 12px;
  padding: 0;
  background: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 0;
}

.faq-item:last-child { border-bottom: 1px solid var(--neutral-200); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: var(--weight-normal);
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.2s var(--ease-spring);
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0;
  line-height: var(--leading-snug);
}

.faq-item p {
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  margin-top: 10px;
}

