/**
 * typography.css — Mobile-first typography styles.
 * Headlines, subtext, quotes, typewriter cursor, feature descriptions.
 * Fonts: Press Start 2P (headlines), VT323 (body), Space Mono (UI).
 */

/* ========== HEADLINES ========== */

.headline {
  font-family: 'Press Start 2P', 'VT323', monospace;
  font-size: clamp(0.5rem, 2.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  max-width: 95vw;
  /* Glowing outline effect — lightest blue from PPCO logo */
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
  text-shadow:
    0 0 10px rgba(184, 220, 232, 0.5),
    0 0 20px rgba(184, 220, 232, 0.3),
    0 0 40px rgba(184, 220, 232, 0.2);
}

/* CTA slide headline — same size as hero */
.slide-cta .headline {
  font-size: clamp(0.5rem, 2.5vw, 2.5rem);
}

/* Small headline variant for Portfolio/FAQ */
.headline.small {
  font-size: clamp(0.45rem, 2vw, 1.8rem);
  margin-bottom: 1rem;
}

/* Filled variant (solid text, no stroke) */
.headline.filled {
  color: var(--text);
  -webkit-text-stroke: none;
}

/* Individual chars — hidden by default, revealed by animation */
.headline .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100px);
}

/* ========== SUBTEXT ========== */

.subtext {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(0.9rem, 3vw, 2.4rem);
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-align: center;
}

.subtext-second {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.subtext .word {
  display: inline-block;
  opacity: 0;
}

/* ========== TYPEWRITER CURSOR ========== */

.typewriter-cursor {
  display: inline-block;
  width: 0.45em;
  height: 0.85em;
  background: var(--text);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.7s step-end infinite;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Legacy typewriter class */
.typewriter {
  font-family: 'VT323', 'Courier New', monospace;
  display: inline;
  overflow: hidden;
}

.typewriter-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
}

.typewriter-char {
  display: inline;
  opacity: 0;
}

.typewriter-char.visible {
  opacity: 1;
}

/* ========== QUOTE ========== */

.quote {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(0.9rem, 3vw, 2.4rem);
  font-style: normal;
  color: var(--text);
  max-width: 95vw;
  margin: 0 auto;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.quote .line {
  display: block;
  opacity: 0;
  transform: translateX(-30px);
  min-height: 1.2em; /* Ensure spacer lines have height */
}

/* ========== FEATURES LIST ========== */

.features {
  --indent: 2rem;
  list-style: none;
  text-align: left;
  max-width: 95vw;
  margin: 1.5rem 0;
}

.features li {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  padding: 0.6rem 0;
  padding-left: var(--indent);
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  letter-spacing: 0.03em;
}

.features li::before {
  content: '\2733'; /* ✳ */
  color: var(--accent);
  font-family: 'Press Start 2P', system-ui, monospace;
  font-size: 0.6em;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.features li:not(.feature-desc) {
  font-weight: bold;
  color: var(--text);
}

.features li.feature-desc {
  color: var(--text-muted);
  padding-top: 0.25rem;
  padding-bottom: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-left: 0;
}

.features li.feature-desc::before {
  content: none;
  display: none;
}

/* ========== FOOTNOTE ========== */

.footnote {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem; /* Closer to features list */
  padding-left: 0;
  opacity: 0; /* Hidden until animated */
}

/* ========== RESPONSIVE: sm (640px+) ========== */

@media (min-width: 640px) {
  .headline {
    font-size: clamp(0.6rem, 3vw, 2.5rem);
    max-width: 90vw;
  }

  .headline.small {
    font-size: clamp(0.5rem, 2.3vw, 1.8rem);
  }

  .subtext {
    font-size: clamp(1rem, 3.2vw, 2.4rem);
  }

  .quote {
    font-size: clamp(1rem, 3.2vw, 2.4rem);
    max-width: 85vw;
  }

  .features {
    --indent: 2.5rem;
    max-width: 85vw;
    margin: 2rem 0;
  }

  .features li {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    padding: 0.75rem 0;
    padding-left: var(--indent);
  }

  .footnote {
    padding-left: 0;
    margin-top: 1.5rem;
  }

  .subtext-second {
    margin-bottom: 2rem;
  }
}

/* ========== RESPONSIVE: md (768px+) ========== */

@media (min-width: 768px) {
  .headline {
    font-size: clamp(0.65rem, 3.2vw, 2.5rem);
  }

  .quote {
    max-width: 750px;
  }

  .features {
    max-width: 650px;
  }

  .footnote {
    font-size: 1.4rem;
  }
}

/* ========== RESPONSIVE: lg (1024px+) ========== */

@media (min-width: 1024px) {
  .headline {
    font-size: clamp(0.7rem, 3.2vw, 2.5rem);
    margin-bottom: 2rem;
  }

  .headline.small {
    font-size: clamp(0.6rem, 2.5vw, 1.8rem);
    margin-bottom: 1.5rem;
  }

  .features li {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  }

  .features li.feature-desc {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    padding-bottom: 1.25rem;
  }
}

/* ========== MOBILE: larger headlines + reduced glow (pointer: coarse) ========== */

@media (pointer: coarse) {
  /* Headlines: 40% larger, reduced glow for readability */
  .headline {
    font-size: clamp(0.7rem, 3.5vw, 2.5rem); /* +40% from 0.5rem/2.5vw */
    text-shadow:
      0 0 6px rgba(184, 220, 232, 0.3),
      0 0 12px rgba(184, 220, 232, 0.15);
  }

  .headline.small {
    font-size: clamp(0.63rem, 2.8vw, 1.8rem); /* +40% */
    text-shadow:
      0 0 6px rgba(184, 220, 232, 0.3),
      0 0 12px rgba(184, 220, 232, 0.15);
  }

  /* Body text: +15% larger on mobile */
  .subtext {
    font-size: clamp(1.05rem, 3.5vw, 2.4rem);
  }

  .quote {
    font-size: clamp(1.05rem, 3.5vw, 2.4rem);
    text-align: left;
    margin: 0 auto;
    width: fit-content;
    max-width: 90vw;
  }

  .features li {
    font-size: clamp(1.15rem, 2.9vw, 1.6rem);
  }

  .features li.feature-desc {
    font-size: clamp(1.15rem, 2.9vw, 1.5rem);
  }

  .footnote {
    font-size: clamp(1.15rem, 2.3vw, 1.4rem);
  }

  /* Asterisk and line-height tweaks */
  .features li::before {
    content: '*';
    font-size: 1em;
  }

  .slide-offer .subtext {
    line-height: 1.2;
  }

  .features {
    padding-left: 0.5rem;
  }
}
