/* Design tokens and global reset */

:root {
  --primary: #4B2A63;
  --primary-dark: #3A2050;
  --primary-light: #844CAC;
  --primary-pale: #C7A6DE;
  --accent: #9BCF6A;
  --error: #C7553A;
  --cream: #F6F5F1;
  --white: #FFFFFF;
  --charcoal: #1A1A1A;
  --charcoal-75: rgba(26, 26, 26, 0.75);
  --charcoal-50: rgba(26, 26, 26, 0.50);
  --charcoal-15: rgba(26, 26, 26, 0.15);

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);

  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 350ms;

  --radius-pill: 9999px;

  /* Semantic color aliases */
  --surface: #F6F5F1;
  --surface-dark: #2A1738;
  --surface-darker: #1A0E25;
  --on-surface: #1A1A1A;
  --white: #FFFFFF;

  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Typography */
  --font-display: "Fraunces", serif;
  --font-ui: "Instrument Sans", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Type scale — font sizes */
  --fs-display-xl:    clamp(44px, 5.8vw, 78px);
  --fs-display-lg:    clamp(36px, 4.4vw, 60px);
  --fs-display-md:    clamp(30px, 3.4vw, 44px);
  --fs-display-md-lg: clamp(34px, 4vw, 52px);
  --fs-display-sm:    clamp(20px, 2.2vw, 26px);

  --fs-num-2xl: 64px;
  --fs-num-xl:  clamp(1.75rem, 2.5vw, 2.25rem);
  --fs-num-lg:  22px;
  --fs-num-md:  18px;

  --fs-headline-lg: 26px;

  --fs-body-lg:   17px;
  --fs-body-md:   16px;
  --fs-body-sm:   15px;
  --fs-body-base: 14px;
  --fs-body-xs:   13px;

  --fs-ui-lg: 12.5px;
  --fs-ui-md: 12px;
  --fs-ui-sm: 10.5px;

  --fs-label-lg:  11.5px;
  --fs-label-md:  10.5px;
  --fs-label-sm:  10px;
  --fs-label-xs:  9.5px;
  --fs-label-2xs: 9px;

  --fs-mono-md: 11.5px;
  --fs-mono-sm: 10.5px;
  --fs-mono-xs: 9.5px;

  /* Spacing scale */
  --spacing-xs: 8px;
  --spacing-sm: 14px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 56px;
  --spacing-2xl: 72px;
  --spacing-3xl: 96px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }

body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 85% 10%, rgba(199, 166, 222, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 10% 90%, rgba(132, 76, 172, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #F3EBF7 0%, var(--cream) 45%, #EFE6F5 100%);
  z-index: 0;
  pointer-events: none;
}

/* ===== SHARED ANIMATIONS ===== */
@keyframes pulse-dot {
  0%, 100% { transform: scale(0.55); opacity: 0.9; }
  50% { transform: scale(0.85); opacity: 1; }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(155, 207, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0); }
}
@keyframes pulse-lime {
  0% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(155, 207, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0); }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-player {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
@keyframes float-reveal {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scroll-travel {
  0% { top: -28px; }
  100% { top: 28px; }
}
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 8px 24px rgba(155, 207, 106, 0.4), 0 0 0 4px rgba(155, 207, 106, 0.15); }
  50% { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(155, 207, 106, 0.5), 0 0 0 8px rgba(155, 207, 106, 0.1); }
}
@keyframes reveal-scale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes flatline {
  0%, 100% { transform: scaleY(0.15); }
  48%, 52% { transform: scaleY(0.15); }
  50% { transform: scaleY(0.9); }
}
@keyframes dial-in {
  from { opacity: 0; letter-spacing: 0.4em; }
  to { opacity: 1; letter-spacing: 0.25em; }
}
@keyframes uptime-pulse {
  0% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(155, 207, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 207, 106, 0); }
}

/* ===== SHARED SECTION HEADERS ===== */
.section-intro { text-align: center; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(75, 42, 99, 0.06);
  border: 1px solid rgba(75, 42, 99, 0.15);
  border-radius: var(--radius-pill);
  font-size: var(--fs-label-lg);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.section-eyebrow .dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.section-title {
  color: var(--charcoal);
  margin-top: 20px;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}
.section-title .italic {
  font-style: italic;
  color: var(--primary);
  position: relative;
}
.section-title .italic::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -0.03em;
  height: 0.05em;
  background: linear-gradient(90deg, transparent, rgba(75, 42, 99, 0.4), transparent);
}
.section-subtitle {
  margin-top: 18px;
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--charcoal-75);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* ===== TYPE SCALE CLASSES ===== */

/* Display — Fraunces, fluid, for section/page-level headings */
.ts-display-xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-xl);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.ts-display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-lg);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.ts-display-md {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-md);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.ts-display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-display-sm);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

/* Headline — Fraunces, fixed size, for card/component headings */
.ts-headline-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-headline-lg);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Numeric — Fraunces, for metric/stat values */
.ts-num-2xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-num-2xl);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.ts-num-xl {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-num-xl);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ts-num-lg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-num-lg);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ts-num-md {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-num-md);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Body — Instrument Sans */
.ts-body-lg   { font-size: var(--fs-body-lg);   line-height: 1.55; }
.ts-body-md   { font-size: var(--fs-body-md);   line-height: 1.6;  }
.ts-body-base { font-size: var(--fs-body-base); line-height: 1.45; }
.ts-body-xs   { font-size: var(--fs-body-xs);   line-height: 1.45; }

/* Label — Instrument Sans, uppercase + tracked */
.ts-label-lg {
  font-size: var(--fs-label-lg);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.ts-label-md {
  font-size: var(--fs-label-md);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.ts-label-sm {
  font-size: var(--fs-label-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.ts-label-xs {
  font-size: var(--fs-label-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

/* Mono — JetBrains Mono, tabular numerals */
.ts-mono-md {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-md);
  font-variant-numeric: tabular-nums;
}
.ts-mono-sm {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  font-variant-numeric: tabular-nums;
}
.ts-mono-xs {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xs);
  font-variant-numeric: tabular-nums;
}
