/* ==========================================================
   FCoV-23 — Base Styles & Layout
   ========================================================== */
@import 'tokens.css';

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg);
  transition: background var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
a:hover { color: var(--link-hover); }
button { cursor: pointer; font-family: inherit; }
::selection { background: var(--accent-soft); color: var(--accent); }

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.container--sm { max-width: var(--container-sm); }
.container--lg { max-width: var(--container-lg); }

/* --- Section --- */
.section {
  padding-block: var(--section-y);
}
.section--subtle { background: var(--bg-subtle); }
.section--dark {
  background: var(--color-gray-900, #1a1a1c);
  color: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; }
h5 { font-size: var(--text-base); font-family: var(--font-sans); font-weight: 600; }

p { max-width: 70ch; }
p + p { margin-top: var(--sp-4); }

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--text-secondary);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.section-header {
  margin-bottom: var(--sp-12);
}
.section-header h2 { margin-bottom: var(--sp-4); }
.section-header p { color: var(--text-secondary); }

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.625rem var(--sp-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  border: none;
  transition: all var(--t-med) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding-inline: var(--sp-3);
}
.btn--ghost:hover { color: var(--text-primary); background: var(--bg-subtle); }

/* Arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--t-fast) var(--ease-out), color var(--t-fast);
}
.arrow-link::after { content: '→'; transition: transform var(--t-fast) var(--ease-out); }
.arrow-link:hover { color: var(--accent-hover); }
.arrow-link:hover::after { transform: translateX(4px); }

/* --- Divider --- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--sp-8);
}

/* --- Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
