/* ============================================================
   Hunterly — Design System Tokens (aligned to official DS)
   Brand: Cyan #36A9E1 → Indigo #312783
   Font: Folito (custom, all weights)
   ============================================================ */

/* ── Folito Font ─────────────────────────────────────────── */
@font-face {
  font-family: 'Folito';
  src: url('fonts/Folito-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Folito';
  src: url('fonts/Folito-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Folito';
  src: url('fonts/Folito-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Folito';
  src: url('fonts/Folito-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Folito';
  src: url('fonts/Folito-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   DS Tokens — Dark Mode (default)
   ============================================================ */
:root {
  /* ---- BRAND ---- */
  --hunterly-cyan:          #36A9E1;
  --hunterly-cyan-light:    #5BC0E8;
  --hunterly-cyan-dark:     #2891C5;
  --hunterly-indigo:        #312783;
  --hunterly-indigo-light:  #4538A0;
  --hunterly-indigo-deep:   #1F1856;

  /* Official DS gradient: indigo → cyan (150deg) */
  --hunterly-gradient:      linear-gradient(150deg, #312783 0%, #36A9E1 100%);
  --hunterly-gradient-135:  linear-gradient(135deg, #36A9E1 0%, #312783 100%);
  --hunterly-gradient-soft: linear-gradient(150deg, rgba(49,39,131,0.18) 0%, rgba(54,169,225,0.18) 100%);
  --hunterly-gradient-veil: linear-gradient(150deg, rgba(49,39,131,0.10) 0%, rgba(54,169,225,0.10) 100%);

  /* ---- SURFACES (dark) ---- */
  --bg:               #0A0E2A;
  --bg-deep:          #050818;
  --bg-elevated:      #131841;
  --bg-elevated-hover:#1A1F52;
  --bg-frosted:       rgba(255,255,255,0.05);
  --bg-frosted-hover: rgba(255,255,255,0.10);

  /* ---- TEXT ---- */
  --text:             #F4F6FB;
  --text-muted:       #B8C0D9;
  --text-ghost:       rgba(184,192,217,0.55);

  /* ---- BORDERS ---- */
  --ring:             rgba(54,169,225,0.18);
  --ring-strong:      rgba(54,169,225,0.45);
  --hairline:         rgba(184,192,217,0.12);

  /* ---- TYPOGRAPHY — Folito ---- */
  --font-display: 'Folito', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Folito', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'Folito', 'Helvetica Neue', Arial, sans-serif;

  /* ---- SPACING (8px base, from DS) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* ---- RADII (from DS) ---- */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* ---- SHADOWS (from DS) ---- */
  --shadow-sm: 0 2px 8px rgba(49,39,131,0.06);
  --shadow-md: 0 4px 24px rgba(49,39,131,0.10);
  --shadow-lg: 0 8px 40px rgba(49,39,131,0.16);
  --shadow-xl: 0 16px 64px rgba(49,39,131,0.22);

  /* ---- CONTAINER ---- */
  --container: 1200px;
}

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

/* ── Smooth anchor navigation ─────────────────────────────── */
html {
  scroll-behavior: smooth;
  /* Offset for fixed nav so titles don't get hidden under it */
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* Give every section a scroll anchor offset too (covers older browsers) */
.section { scroll-margin-top: 96px; }

/* ── Fluid section reveal on scroll ───────────────────────── */
.section {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Hero is always visible — never animate it in (it loads above the fold) */
#top.section {
  opacity: 1;
  transform: none;
}
/* Soft fade for the hairline dividers between sections */
.hairline {
  opacity: 0;
  transition: opacity 700ms ease;
}
.hairline.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .section, .hairline {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-wrap: pretty;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ============================================================
   Typography utilities — Folito
   ============================================================ */
.t-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hunterly-cyan);
}

.t-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.t-lead {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

.t-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-muted);
}

.t-mono {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Gradient text — official Hunterly indigo→cyan */
.gradient-text {
  background: var(--hunterly-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.section {
  padding: var(--s-24) 0;
  position: relative;
}

@media (max-width: 720px) {
  .section { padding: var(--s-16) 0; }
}

/* ============================================================
   Components
   ============================================================ */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* Primary: gradient fill (DS canonical) */
.btn-primary {
  background: var(--hunterly-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  opacity: 0.88;
  box-shadow: var(--shadow-lg);
}

/* Gradient alias (same as primary now) */
.btn-gradient {
  background: var(--hunterly-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  position: relative;
}
.btn-gradient::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--hunterly-gradient);
  filter: blur(12px);
  opacity: 0.4;
  z-index: -1;
}

/* Frost: glass on dark */
.btn-frost {
  background: var(--bg-frosted);
  color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn-frost:hover { background: var(--bg-frosted-hover); }

/* Ghost: nav links */
.btn-ghost {
  color: var(--text);
  padding: 10px 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.btn-ghost:hover { background: var(--bg-frosted); border-radius: var(--r-pill); }

/* Cards */
.card {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: var(--s-6);
  box-shadow: 0 0 0 1px var(--hairline), var(--shadow-sm);
  transition: box-shadow 240ms ease, transform 240ms ease, background 240ms ease;
}
.card:hover {
  box-shadow: 0 0 0 1px var(--ring-strong), var(--shadow-md);
  background: var(--bg-elevated-hover);
  transform: translateY(-2px);
}

/* Tag / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-frosted);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--hairline);
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hunterly-cyan);
  box-shadow: 0 0 8px var(--hunterly-cyan);
}

/* Hairline section divider */
.hairline {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 0;
}

/* Grid utility */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Decorative gradient glow */
.glow {
  position: absolute;
  inset: auto;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  z-index: 0;
}

/* ============================================================
   LIGHT MODE
   ============================================================ */
html[data-theme="light"] {
  /* Surfaces */
  --bg:               #F4F6FA;
  --bg-deep:          #ECEEF5;
  --bg-elevated:      #FFFFFF;
  --bg-elevated-hover:#FAFBFF;
  --bg-frosted:       rgba(49,39,131,0.04);
  --bg-frosted-hover: rgba(49,39,131,0.08);

  /* Text */
  --text:             #0E0E1A;
  --text-muted:       #5E6A7A;
  --text-ghost:       rgba(10,14,42,0.45);

  /* Borders */
  --ring:             rgba(49,39,131,0.15);
  --ring-strong:      rgba(49,39,131,0.35);
  --hairline:         rgba(10,14,42,0.09);
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .btn-frost {
  background: rgba(49,39,131,0.06);
  color: var(--hunterly-indigo);
  box-shadow: inset 0 0 0 1px rgba(49,39,131,0.18);
}
html[data-theme="light"] .btn-frost:hover {
  background: rgba(49,39,131,0.12);
}
html[data-theme="light"] .btn-ghost {
  color: var(--hunterly-indigo);
}

/* Disable gradient fallback */
html[data-no-gradient] {
  --hunterly-gradient: var(--hunterly-indigo);
  --hunterly-gradient-135: var(--hunterly-indigo);
  --hunterly-gradient-soft: rgba(49,39,131,0.12);
}
html[data-no-gradient] .btn-gradient::before { display: none; }
