/* ============================================
   SOPHIT TRAINING — BASE
   Design tokens, reset, typography, buttons, utilities
============================================ */

:root {
  /* Brand colours */
  --c-bg: #FAFAF7;
  --c-surface: #FFFFFF;
  --c-text: #1A1625;
  --c-text-soft: #6B6678;
  --c-text-faint: #A6A1AD;
  --c-line: #EEEAE2;
  --c-line-soft: #F4F1EB;

  --c-purple: #A14EB8;
  --c-purple-deep: #7A3A8E;
  --c-purple-dark: #3D1F4E;
  --c-purple-soft: #EBD5F4;
  --c-purple-tint: #F8EFFB;

  --c-cream: #F5EFE0;
  --c-rose: #E94B2A;   /* now coral — Sophit secondary accent */
  --c-gold: #C9A961;
  --c-yellow: #F5D67A;

  /* Type */
  --f-display: 'Fraunces', Georgia, serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(26,22,37,0.06), 0 1px 2px rgba(26,22,37,0.04);
  --shadow-md: 0 4px 12px rgba(26,22,37,0.08), 0 2px 4px rgba(26,22,37,0.04);
  --shadow-lg: 0 16px 40px rgba(26,22,37,0.10), 0 4px 12px rgba(26,22,37,0.06);
  --shadow-purple: 0 10px 30px rgba(161,78,184,0.30);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t-base: 250ms var(--ease);
  --t-slow: 400ms var(--ease);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

/* Sticky header anchor offset */
section[id] { scroll-margin-top: 80px; }

body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--c-text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1rem; }

p { color: var(--c-text-soft); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-8);
}
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head p { font-size: 1.125rem; }
.section-head.light h2 { color: #fff; }
.section-head.light p { color: rgba(255,255,255,0.75); }

.section-eyebrow {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-purple);
  margin-bottom: var(--sp-4);
}
.section-eyebrow.light { color: var(--c-rose); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 14px 26px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  transition: all var(--t-base);
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-purple);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-purple-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-purple);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--c-purple);
  border-color: var(--c-purple);
}
.btn-outline:hover {
  background: var(--c-purple);
  color: #fff;
}
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 18px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

::selection { background: var(--c-purple); color: #fff; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
