/* ═══════════════════════════════════════════════════════════
   PORTFOLIO BASE — shared by index.html and motion.html
   Tokens, reset, layout, header, buttons, hero, sections, footer.
   Page-specific styles stay inline in each page, after this file.
   ═══════════════════════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS — 9Bit Studios Dark Theme
   ═══════════════════════════════════════════════════ */
:root {
  --bg:              #0B010D;
  --bg-card:         #110413;
  --violet:          #BF5AF2;
  --violet-dim:      rgba(191,90,242,0.28);
  --violet-glow:     rgba(191,90,242,0.10);
  --gold:            #E4C06A;
  --gold-dim:        rgba(228,192,106,0.16);
  --text-primary:    rgba(240,244,255,0.96);
  --text-secondary:  rgba(240,244,255,0.65);
  --text-muted:      rgba(240,244,255,0.38);
  --border:          rgba(191,90,242,0.16);
  --border-hover:    rgba(191,90,242,0.45);
  --shadow-card:     0 4px 24px rgba(0,0,0,0.32);
  --shadow-hover:    0 8px 40px rgba(0,0,0,0.48);
  --max-width:       1400px;   /* matches runsmart-prototype sections */
  --gutter:          clamp(20px, 3vw, 32px);
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  /* RunSmart accent — trial for the solid button; a later migration can map --violet to it */
  --purple-primary:  #7B00FF;
  --purple-hover:    #8C45FF;
  --glow-purple:     0 0 20px rgba(123,0,255,0.30);
}

/* ═══════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }
body {
  font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ═══════════════════════════════════════════════════
   SITE HEADER
   ═══════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,1,13,0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center;
  justify-content: space-between;
  height: 56px; gap: 16px;
}
.header-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 590;
  letter-spacing: -0.01em; flex-shrink: 0;
  transition: opacity 0.15s;
}
.header-logo:hover { opacity: 0.8; }
.header-logo img { width: 22px; height: 22px; }
.header-ctas { display: flex; align-items: center; gap: 8px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 510; line-height: 1;
  cursor: pointer; min-height: 36px; white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  background: var(--violet-glow);
}
.btn-primary {
  background: rgba(191,90,242,0.14);
  border: 1px solid var(--violet-dim); color: var(--violet);
}
.btn-primary:hover {
  background: rgba(191,90,242,0.24);
  border-color: rgba(191,90,242,0.50);
}
/* Solid primary action — RunSmart "View Live" style */
.btn-solid {
  background: var(--purple-primary); border: 1px solid var(--purple-primary);
  color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn-solid:hover {
  background: var(--purple-hover); border-color: var(--purple-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), var(--glow-purple);
}
.btn-solid:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
  padding: 100px 0 84px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  top: -160px; left: 50%; transform: translateX(-60%);
  width: 960px; height: 720px;
  background: radial-gradient(ellipse at center, rgba(110,0,255,0.07) 0%, transparent 68%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 590;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 22px;
}
.eyebrow-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.55;
}
.hero h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700; letter-spacing: -0.035em;
  line-height: 1.06; margin-bottom: 20px;
}
.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 540px; line-height: 1.70;
  margin-bottom: 36px; font-weight: 400;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ═══════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════ */
.section { padding: clamp(80px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-header { margin-bottom: 56px; }
.section-eyebrow {
  font-size: 11px; font-weight: 590;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700; letter-spacing: -0.025em;
}
.section-desc {
  font-size: 18px; color: var(--text-secondary);
  max-width: 760px; line-height: 1.6; margin-top: 16px;
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0; margin-top: 24px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
}
.footer-brand img { width: 18px; height: 18px; opacity: 0.6; }
.footer-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-link {
  font-size: 13px; color: var(--text-muted); transition: color 0.15s;
}
.footer-link:hover { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero { padding: 68px 0 56px; }
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }
  .section-desc { font-size: 16px; }
  .header-ctas .btn-ghost:not(:last-child) { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
