/* ============================================================
   Filiz — Website Design System
   Based on ui-ux-design-report.md §1-3
   "Weight is not a number. It's a story."
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..500;1,9..144,300..500&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap');

/* ============================================================
   1. CSS Custom Properties (Light Mode)
   ============================================================ */
:root {
  /* — Canvas & Surfaces — */
  --canvas: #F8F4ED;
  --surface: #FFFFFF;
  --surface-alt: #F2EADC;
  --stroke: #E8DFD1;
  --divider: #EFE8DC;

  /* — Text — */
  --text-primary: #1E1B16;
  --text-secondary: #5C544A;
  --text-tertiary: #8F867A;
  --text-disabled: #C9BFAE;

  /* — Accent — */
  --accent-gold: #8A6B3B;
  --accent-sprout: #6B8E4E;
  --accent-sage: #9FA88E;
  --accent-clay: #B8694A;

  /* — Typography — */
  --font-display: 'Fraunces', serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', monospace;

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

  /* — Layout — */
  --max-width: 1200px;
  --content-width: 800px;
  --viewport-margin: 24px;
  --card-radius: 16px;
  --card-radius-lg: 20px;

  /* — Transitions — */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
}

/* ============================================================
   2. Dark Mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1C1A17;
    --surface: #24211D;
    --surface-alt: #2C2823;
    --stroke: #3A342E;
    --divider: #2A2621;

    --text-primary: #F5F0E8;
    --text-secondary: #C7BCA8;
    --text-tertiary: #8F867A;
    --text-disabled: #4A4239;

    --accent-gold: #B0925E;
    --accent-sprout: #7D8570;
    --accent-sage: #6E7560;
    --accent-clay: #C17E5E;
  }
}

/* ============================================================
   3. Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--canvas);
  overflow-x: hidden;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: opacity var(--duration-fast) ease;
}

a:hover {
  opacity: 0.75;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   4. Typography
   ============================================================ */

/* Display — hero tagline */
.type-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 120, "SOFT" 50, "WONK" 1;
}

/* H1 */
.type-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0;
}

/* H2 */
.type-h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36, "SOFT" 50;
}

/* H3 */
.type-h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.33;
  letter-spacing: -0.005em;
}

/* Body */
.type-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
}

/* Body Small */
.type-body-s {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.43;
}

/* Caption */
.type-caption {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.33;
  letter-spacing: 0.005em;
}

/* Eyebrow */
.type-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.27;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Metric Hero */
.type-metric {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Italic emphasis */
.italic-emphasis {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent-gold);
  font-variation-settings: "opsz" 72, "SOFT" 50, "WONK" 0;
}

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

.container--narrow {
  max-width: var(--content-width);
}

.section {
  padding: var(--sp-10) 0;
}

.section--compact {
  padding: var(--sp-9) 0;
}

/* Grid */
.grid {
  display: grid;
  gap: var(--sp-4);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Text alignment */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ============================================================
   6. Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--stroke);
  transition: transform var(--duration-normal) var(--ease-out),
              background var(--duration-normal) ease;
}

.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--viewport-margin);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text-primary);
}

.nav__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 2rem;
  color: var(--accent-gold);
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}

.nav__wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
  position: relative;
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
  opacity: 1;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 1px;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  background: var(--text-primary);
  color: var(--canvas);
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity var(--duration-fast) ease;
}

.nav__cta:hover {
  opacity: 0.85;
  color: var(--canvas);
}

/* Mobile nav */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: var(--sp-6);
    background: var(--canvas);
    border-top: 1px solid var(--stroke);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    z-index: 99;
  }

  .nav__links.nav__links--open {
    transform: translateX(0);
  }

  .nav__link {
    width: 100%;
    padding: var(--sp-4) 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--divider);
  }

  .nav__link--active::after {
    display: none;
  }

  .nav__cta {
    margin-top: var(--sp-6);
    width: 100%;
    justify-content: center;
    padding: var(--sp-4);
    font-size: 1rem;
  }

  .nav__toggle {
    display: flex;
  }
}

/* ============================================================
   7. Hero Section
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-10) var(--viewport-margin);
  position: relative;
  overflow: hidden;
}

.hero__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--accent-gold);
  opacity: 0.9;
  line-height: 1;
  margin-bottom: var(--sp-8);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

.hero__headline {
  max-width: 700px;
  margin-bottom: var(--sp-6);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--sp-8);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.hero__chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  opacity: 0.12;
}

/* ============================================================
   8. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.25;
  padding: var(--sp-4) var(--sp-7);
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--duration-fast) ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--canvas);
}

.btn--primary:hover {
  opacity: 0.85;
  color: var(--canvas);
}

.btn--secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--stroke);
}

.btn--secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
  opacity: 1;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-4);
}

.btn--ghost:hover {
  color: var(--text-primary);
  opacity: 1;
}

.btn--small {
  font-size: 0.875rem;
  padding: var(--sp-2) var(--sp-5);
}

/* ============================================================
   9. Cards
   ============================================================ */

/* Tier-1: Content card */
.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--card-radius);
  padding: var(--sp-6);
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-fast) ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card--accent-gold:hover { border-color: var(--accent-gold); }
.card--accent-sprout:hover { border-color: var(--accent-sprout); }
.card--accent-clay:hover { border-color: var(--accent-clay); }

/* Tier-2: Ambient card */
.card--ambient {
  background: var(--surface-alt);
  border: none;
  border-radius: var(--card-radius-lg);
  padding: var(--sp-5);
}

/* Card elements */
.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-4);
  background: var(--surface-alt);
  border-radius: 12px;
}

.card__title {
  margin-bottom: var(--sp-3);
}

.card__body {
  color: var(--text-secondary);
  line-height: 1.6;
}

.card__divider {
  height: 1px;
  background: var(--divider);
  margin: var(--sp-5) 0;
}

.card__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-decoration: none;
}

/* ============================================================
   10. Feature Section
   ============================================================ */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-9);
  align-items: center;
  padding: var(--sp-9) 0;
}

.feature-row:not(:last-child) {
  border-bottom: 1px solid var(--divider);
}

@media (min-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row--reverse {
    direction: rtl;
  }

  .feature-row--reverse > * {
    direction: ltr;
  }
}

.feature__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.feature__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border-radius: var(--card-radius-lg);
  padding: var(--sp-7);
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

/* ============================================================
   11. EWMA Chart SVG (Hero decoration)
   ============================================================ */
.ewma-chart {
  width: 100%;
  height: 100%;
}

.ewma-chart__dots {
  fill: var(--text-tertiary);
  opacity: 0.4;
}

.ewma-chart__trend {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ewma-chart__projection {
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 4;
}

.ewma-chart__goal {
  stroke: var(--accent-sprout);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ewma-chart__today {
  stroke: var(--accent-clay);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

/* ============================================================
   12. Privacy Section
   ============================================================ */
.privacy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .privacy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .privacy-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.privacy-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--card-radius);
}

.privacy-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border-radius: 8px;
  font-size: 1rem;
}

.privacy-item__text h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--sp-1);
}

.privacy-item__text p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   13. Pricing Section
   ============================================================ */
.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--card-radius);
  padding: var(--sp-7);
  text-align: center;
  position: relative;
  transition: border-color var(--duration-fast) ease,
              transform var(--duration-normal) var(--ease-out);
}

.pricing-card:hover {
  transform: translateY(-2px);
}

.pricing-card--featured {
  border-color: var(--accent-gold);
  border-width: 2px;
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: var(--canvas);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card__name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}

.pricing-card__price {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: var(--sp-1);
}

.pricing-card__period {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}

.pricing-card__features {
  text-align: left;
  margin-bottom: var(--sp-6);
}

.pricing-card__features li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: var(--sp-2) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.pricing-card__features li::before {
  content: '✓';
  color: var(--accent-sprout);
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================================
   14. Footer
   ============================================================ */
.footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--stroke);
  padding: var(--sp-9) 0 var(--sp-7);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-9);
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__brand-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--accent-gold);
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}

.footer__wordmark {
  font-weight: 600;
  font-size: 1rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 260px;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--sp-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.footer__link:hover {
  color: var(--text-primary);
  opacity: 1;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-start;
  padding-top: var(--sp-7);
  margin-top: var(--sp-7);
  border-top: 1px solid var(--stroke);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer__company {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ============================================================
   15. Legal Pages
   ============================================================ */
.legal {
  padding-top: calc(64px + var(--sp-9));
  padding-bottom: var(--sp-10);
}

.legal__header {
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--divider);
}

.legal__meta {
  margin-top: var(--sp-3);
}

.legal__content {
  max-width: var(--content-width);
}

.legal__content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36, "SOFT" 50;
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--divider);
}

.legal__content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal__content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
}

.legal__content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

.legal__content ul,
.legal__content ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-6);
}

.legal__content ul {
  list-style: disc;
}

.legal__content ol {
  list-style: decimal;
}

.legal__content li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-2);
}

.legal__content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__content a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   16. Animations
   ============================================================ */

/* Fade in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 500ms; }

/* SVG line drawing */
.draw-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease-out);
}

.draw-line.drawn {
  stroke-dashoffset: 0;
}

/* Typewriter dot pulse */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Chart dot entrance */
@keyframes dot-pop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   17. Chip / Tag
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px;
  background: var(--surface-alt);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.chip--active {
  background: var(--text-primary);
  color: var(--canvas);
}

/* ============================================================
   18. Section Headers
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-8);
}

.section-header__eyebrow {
  margin-bottom: var(--sp-3);
}

.section-header__title {
  margin-bottom: var(--sp-4);
}

.section-header__subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* ============================================================
   19. Responsive Utilities
   ============================================================ */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: initial;
  }

  .hide-desktop {
    display: none;
  }
}

/* ============================================================
   20. Scroll snap for features page
   ============================================================ */
.features-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
}

/* ============================================================
   21. 404 Page
   ============================================================ */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8);
}

.page-404__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 6rem;
  color: var(--accent-gold);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--sp-6);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}

/* ============================================================
   22. App Store Badge
   ============================================================ */
.app-store-badge {
  height: 48px;
  transition: opacity var(--duration-fast) ease;
}

.app-store-badge:hover {
  opacity: 0.8;
}

/* ============================================================
   23. Inline EWMA demo chart (feature visual)
   ============================================================ */
.chart-demo {
  width: 100%;
  max-width: 500px;
}

.chart-demo__axis-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-tertiary);
}

/* ============================================================
   24. Comparison table
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.comparison-table th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--stroke);
}

.comparison-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--divider);
  color: var(--text-secondary);
}

.comparison-table td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .highlight-col {
  background: var(--surface-alt);
}
