/* ============================================
   TYPING THE WORD - Main Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --gold: #E2B34D;
  --gold-light: #F6DA85;
  --gold-bright: #FFE9A8;
  --gold-dim: #BE8A25;
  --navy: #1e3a5f;
  --navy-dark: #0f1f35;
  --navy-light: #2a4f7a;
  --bg-primary: #0a1628;
  --bg-secondary: #111d30;
  --bg-card: rgba(38, 68, 110, 0.35);
  --bg-card-hover: rgba(42, 79, 122, 0.55);
  --bg-glass: rgba(17, 29, 48, 0.7);
  --text-primary: #e8ecf1;
  --text-secondary: #9aa8b8;
  --text-dim: #5a6a7a;
  --correct: #4ade80;
  --incorrect: #f87171;
  --cursor-color: #E2B34D;
  --upcoming: #64748b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --glow-gold: 0 0 24px rgba(242, 196, 90, 0.35);
  --glow-gold-soft: 0 0 14px rgba(242, 196, 90, 0.22);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1100px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- Particle Background --- */
#particles-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(242,196,90,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 50%, rgba(30,58,95,0.32) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(242,196,90,0.10) 0%, transparent 50%);
}
.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.2); }
}

/* --- Navigation --- */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(242,196,90,0.15);
  transition: background var(--transition);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: var(--text-primary);
}
.nav-logo:hover { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition); position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 1px;
}
.nav-btn-outline {
  border: 1.5px solid var(--gold) !important;
  padding: 6px 18px !important; border-radius: 8px !important;
  color: var(--gold) !important;
  transition: all var(--transition) !important;
}
.nav-btn-outline:hover {
  background: var(--gold) !important; color: var(--bg-primary) !important;
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: var(--transition);
}

/* --- Mobile Nav --- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-logo-img { height: 34px; max-height: 34px; }
  .nav-logo .logo-text { font-size: 1.1rem; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; justify-content: flex-start;
    padding: 32px 24px; gap: 20px;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(20px);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; padding: 12px 0; width: 100%; display: block; }
}

/* --- Main Content --- */
#app {
  position: relative; z-index: 1;
  min-height: calc(100vh - 64px - 80px);
  padding-top: 64px;
}
.page { display: none; padding: 40px 24px 60px; max-width: var(--max-width); margin: 0 auto; }

/* --- Legal Pages (Privacy / Terms) --- */
.legal-page { max-width: 780px; margin: 0 auto; }
.legal-page .card { padding: 36px 40px; }
.legal-page p { color: var(--text-secondary); margin-bottom: 14px; font-size: 0.94rem; }
.legal-page h2 { color: var(--gold); }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; }
.text-gold { color: var(--gold-light); text-shadow: 0 0 18px rgba(242,196,90,0.35); }
.text-dim { color: var(--text-secondary); }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dim));
  color: #221a06; box-shadow: 0 4px 18px rgba(242,196,90,0.4), 0 0 0 1px rgba(255,233,168,0.2) inset;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(242,196,90,0.55), 0 0 34px rgba(242,196,90,0.25);
}
.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1.5px solid rgba(242,196,90,0.35);
}
.btn-secondary:hover {
  border-color: var(--gold-light); background: var(--bg-card-hover);
  box-shadow: 0 0 18px rgba(242,196,90,0.15);
}
.btn-ghost { color: var(--gold-light); padding: 12px 16px; }
.btn-ghost:hover { background: rgba(242,196,90,0.12); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(242,196,90,0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.card:hover {
  border-color: rgba(242,196,90,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* --- Hero Section --- */
.hero {
  text-align: center; padding: 80px 0 60px;
}
.hero h1 { margin-bottom: 16px; }
.hero h1 .accent { color: var(--gold); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Feature Grid --- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin: 48px 0;
}
.feature-card { text-align: left; }
.feature-icon {
  font-size: 2rem; margin-bottom: 12px; display: block;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Stats Bar --- */
.stats-bar {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  margin: 32px 0;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(242,196,90,0.1);
  min-width: 120px;
}
.stat-value {
  font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700;
  color: var(--gold);
}
.stat-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* --- Typing Area --- */
.typing-container {
  background: var(--bg-card);
  border: 1px solid rgba(242,196,90,0.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 24px 0;
}
.typing-verse-ref {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--gold);
  margin-bottom: 16px; font-weight: 600;
}
.typing-display {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 2;
  padding: 20px 0;
  min-height: 120px;
  user-select: none;
  letter-spacing: 0.02em;
}
.typing-display .char-correct { color: var(--correct); }
.typing-display .char-incorrect {
  color: var(--incorrect);
  background: rgba(248,113,113,0.15);
  border-radius: 2px;
}
.typing-display .char-current {
  border-bottom: 3px solid var(--cursor-color);
  animation: blink 1s step-end infinite;
}
.typing-display .char-upcoming { color: var(--upcoming); }
.typing-display .char-space-incorrect {
  background: rgba(248,113,113,0.3);
  border-radius: 2px;
}
@keyframes blink { 50% { border-color: transparent; } }

.typing-input-area {
  margin-top: 16px;
  position: relative;
}
.typing-input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  background: rgba(10, 22, 40, 0.6);
  border: 2px solid rgba(242,196,90,0.2);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.typing-input:focus { border-color: var(--gold); }
.typing-input::placeholder { color: var(--text-dim); }

/* --- Live Stats --- */
.live-stats {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin: 16px 0; padding: 12px 0;
  border-top: 1px solid rgba(242,196,90,0.1);
}
.live-stat {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.9rem;
}
.live-stat .label { color: var(--text-secondary); font-family: var(--font-body); font-size: 0.8rem; }
.live-stat .value { color: var(--gold); font-weight: 600; }

/* --- Controls --- */
.typing-controls {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 16px;
}

/* --- Journey Grid --- */
.journey-phase {
  margin: 40px 0;
}
.journey-phase h2 {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.phase-badge {
  display: inline-flex; align-items: center; padding: 4px 14px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-family: var(--font-body);
}
.phase-foundations { background: rgba(74,222,128,0.15); color: var(--correct); }
.phase-growth { background: rgba(242,196,90,0.15); color: var(--gold); }
.phase-endurance { background: rgba(248,113,113,0.15); color: var(--incorrect); }

.journey-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.journey-step {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: var(--bg-card);
  border: 2px solid rgba(242,196,90,0.12);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.journey-step:hover { border-color: var(--gold); transform: translateY(-2px); }
.journey-step .step-num { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.journey-step .step-status { font-size: 0.7rem; color: var(--text-dim); }
.journey-step.completed {
  border-color: var(--correct);
  background: rgba(74,222,128,0.08);
}
.journey-step.completed .step-num { color: var(--correct); }
.journey-step.locked { opacity: 0.5; cursor: not-allowed; }
.journey-step.locked:hover { transform: none; border-color: rgba(242,196,90,0.12); }
.journey-step.current {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(242,196,90,0.2);
}

/* --- Bible Browser --- */
.bible-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin: 24px 0;
}
.bible-book {
  padding: 16px; text-align: center;
  background: var(--bg-card);
  border: 1px solid rgba(242,196,90,0.1);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.bible-book:hover { border-color: var(--gold); transform: translateY(-1px); }
.bible-book h4 { font-size: 0.95rem; margin-bottom: 4px; }
.bible-book span { font-size: 0.75rem; color: var(--text-dim); }

/* --- Pricing Cards --- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin: 40px 0;
}
.pricing-card {
  text-align: center; padding: 36px 28px;
}
.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(242,196,90,0.15);
  position: relative;
}
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--bg-primary);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 4px 16px; border-radius: 12px;
}
.pricing-card h3 { margin-bottom: 8px; }
.pricing-price {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 700;
  color: var(--gold); margin: 16px 0;
}
.pricing-price span { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }
.pricing-features { list-style: none; margin: 24px 0; text-align: left; }
.pricing-features li {
  padding: 8px 0; border-bottom: 1px solid rgba(242,196,90,0.08);
  color: var(--text-secondary); font-size: 0.9rem;
  display: flex; align-items: center; gap: 10px;
}
.pricing-features li::before { content: '\2713'; color: var(--gold); font-weight: 700; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid rgba(242,196,90,0.2);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 500px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close {
  float: right; font-size: 1.5rem; color: var(--text-dim);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

/* --- Toast --- */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px; border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid rgba(242,196,90,0.2);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: slideInRight 0.4s ease;
  display: flex; align-items: center; gap: 10px;
  max-width: 360px;
}
.toast-success { border-color: var(--correct); }
.toast-success::before { content: '\2713'; color: var(--correct); font-weight: 700; }
.toast-error { border-color: var(--incorrect); }
.toast-error::before { content: '\2717'; color: var(--incorrect); font-weight: 700; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Certificates --- */
.certificate {
  background: linear-gradient(135deg, var(--bg-secondary), var(--navy-dark));
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 48px; text-align: center;
  max-width: 600px; margin: 40px auto;
  position: relative; overflow: hidden;
}
.certificate::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(242,196,90,0.3);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.certificate h1 { color: var(--gold); margin-bottom: 8px; font-size: 1.8rem; }
.certificate h2 { font-weight: 400; font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 24px; }
.certificate .cert-name {
  font-family: var(--font-display); font-size: 2rem;
  color: var(--gold); margin: 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(242,196,90,0.3);
  display: inline-block;
}

/* --- Form Elements --- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
}
.form-input {
  width: 100%; padding: 12px 16px;
  font-family: var(--font-body); font-size: 0.95rem;
  background: rgba(10, 22, 40, 0.6);
  border: 1.5px solid rgba(242,196,90,0.2);
  border-radius: 8px;
  color: var(--text-primary);
  outline: none; transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--gold); }

/* --- Section Headers --- */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
}

/* --- Difficulty Selector --- */
.difficulty-selector {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.difficulty-btn {
  padding: 8px 20px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600;
  background: var(--bg-card);
  border: 1.5px solid rgba(242,196,90,0.15);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.difficulty-btn:hover { border-color: var(--gold); color: var(--text-primary); }
.difficulty-btn.active {
  background: var(--gold); color: var(--bg-primary);
  border-color: var(--gold);
}

/* --- Empty State --- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

/* --- Footer --- */
#main-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(242,196,90,0.1);
  padding: 24px;
  background: rgba(10, 22, 40, 0.5);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-inner p { font-size: 0.85rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.85rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }

/* --- Verse Selection (Bible browse) --- */
.verse-select-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px; margin: 16px 0;
}
.verse-select-btn {
  padding: 10px; text-align: center;
  background: var(--bg-card);
  border: 1px solid rgba(242,196,90,0.1);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
}
.verse-select-btn:hover { border-color: var(--gold); color: var(--gold); }

/* --- Memorize Mode --- */
.memorize-controls {
  display: flex; gap: 12px; justify-content: center; margin: 20px 0;
}
.peek-btn {
  padding: 6px 16px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  background: rgba(242,196,90,0.1);
  border: 1px solid rgba(242,196,90,0.3);
  color: var(--gold);
  transition: all var(--transition);
}
.peek-btn:hover { background: rgba(242,196,90,0.2); }
.peek-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* --- On-Screen Keyboard --- */
.content-with-keyboard {
  display: flex; flex-direction: column; gap: 20px;
}
.osk {
  background: rgba(10, 22, 40, 0.8);
  border: 1px solid rgba(242,196,90,0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 720px;
  margin: 0 auto;
  backdrop-filter: blur(8px);
}
.osk-row {
  display: flex; justify-content: center; gap: 4px;
  margin-bottom: 4px;
}
.osk-row:last-child { margin-bottom: 0; }
.osk-key {
  min-width: 36px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30, 58, 95, 0.4);
  border: 1px solid rgba(242,196,90,0.15);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.osk-key.osk-active {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(242,196,90,0.5);
}
.osk-key-space {
  min-width: 280px !important;
  font-size: 0.75rem;
}
.osk-key-wide {
  min-width: 52px !important;
  font-size: 1rem;
}
@media (max-width: 600px) {
  .osk { padding: 8px; }
  .osk-key { min-width: 28px; height: 34px; font-size: 0.7rem; }
  .osk-key-space { min-width: 180px !important; }
  .osk-key-wide { min-width: 40px !important; }
}

/* --- Visual Home Page --- */
.hero-visual {
  position: relative;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../assets/hero-bg.jpg') center top / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}
.hero-visual::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 620px 300px at 50% -20px, rgba(242,196,90,0.28) 0%, rgba(242,196,90,0.10) 45%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(242,196,90,0.10);
  border: 1px solid rgba(242,196,90,0.25);
  padding: 8px 18px;
  border-radius: 40px;
  margin-bottom: 20px;
  text-shadow: 0 0 14px rgba(242,196,90,0.35);
}
.hero h1 { margin-bottom: 16px; }
.hero-visual h1 { margin-bottom: 16px; }
.hero h1 .accent {
  color: var(--gold-light);
  text-shadow: 0 0 22px rgba(242,196,90,0.5), 0 0 60px rgba(242,196,90,0.25);
}
.hero-visual p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 32px;
}

/* --- Stats Plaques --- */
.stats-plaques {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin: 40px 0;
}
.plaque {
  background: linear-gradient(135deg, rgba(242,196,90,0.16), rgba(242,196,90,0.05));
  border: 1px solid rgba(242,196,90,0.30);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
  min-width: 140px;
  transition: all var(--transition);
  box-shadow: inset 0 0 24px rgba(242,196,90,0.05), 0 0 18px rgba(242,196,90,0.06);
}
.plaque:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 28px rgba(242,196,90,0.08), 0 0 28px rgba(242,196,90,0.22);
}
.plaque-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(242,196,90,0.65)) drop-shadow(0 0 22px rgba(242,196,90,0.3));
}
.plaque-value {
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(242,196,90,0.4);
}
.plaque-label {
  font-size: 0.75rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 4px;
}

/* --- Showcase Grid (replaces feature-grid) --- */
.showcase-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin: 40px 0;
}
.showcase-item {
  background: var(--bg-card);
  border: 1px solid rgba(242,196,90,0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: all var(--transition);
}
.showcase-item:hover {
  border-color: rgba(242,196,90,0.25);
  transform: translateY(-2px);
}
.showcase-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(242,196,90,0.4)) drop-shadow(0 0 26px rgba(242,196,90,0.18));
}
.showcase-item h3 { margin-bottom: 8px; font-size: 1.05rem; }
.showcase-item p { color: var(--text-secondary); font-size: 0.88rem; }

/* --- CTA Section --- */
.cta-section {
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, rgba(242,196,90,0.10), rgba(30,58,95,0.25));
  border: 1px solid rgba(242,196,90,0.22);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  margin-top: 40px;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 480px 240px at 50% 0%, rgba(242,196,90,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { margin-bottom: 8px; position: relative; }

/* --- Typing Progress Bar --- */
.typing-progress-bar {
  height: 4px;
  background: rgba(242,196,90,0.1);
  border-radius: 2px;
  margin: 12px 0;
  overflow: hidden;
}
.typing-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* --- Textarea (visible input) --- */
.typing-input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  background: rgba(10, 22, 40, 0.6);
  border: 2px solid rgba(242,196,90,0.2);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
  resize: none;
  overflow: hidden;
  min-height: 56px;
}
.typing-input:focus { border-color: var(--gold); }
.typing-input::placeholder { color: var(--text-dim); }

/* --- Verse Complete Overlay --- */
.verse-complete { padding: 8px 0; }
.cert-icon { font-size: 3rem; margin-bottom: 8px; }

/* --- Blog Page --- */
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px; margin: 24px 0;
}
.blog-card { overflow: hidden; }
.blog-badge {
  display: inline-block;
  padding: 4px 12px; border-radius: 12px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(242,196,90,0.15);
  color: var(--gold);
  margin-bottom: 12px;
}
.blog-card h2 { margin-bottom: 8px; font-size: 1.2rem; }
.blog-content { margin-top: 16px; }
.blog-content h3 {
  font-size: 1rem; margin: 16px 0 6px;
  color: var(--gold);
}
.blog-content p {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Overflow Fix --- */
.page { overflow-x: hidden; word-wrap: break-word; }
.typing-container { overflow: hidden; }
.typing-display {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .page { padding: 24px 16px 40px; overflow-x: hidden; }
  .typing-container { padding: 20px 16px; }
  .stats-bar { gap: 12px; }
  .stat-item { min-width: 90px; padding: 12px 16px; }
  .stat-value { font-size: 1.4rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .hero { padding: 48px 0 32px; }
  .hero-visual { padding: 48px 16px 32px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .stats-plaques { gap: 12px; }
  .plaque { min-width: 100px; padding: 14px 18px; }
  .plaque-value { font-size: 1.2rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .typing-input { font-size: 1rem; padding: 12px 16px; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* --- Locked difficulty buttons --- */
.difficulty-btn-locked {
  position: relative;
  opacity: 0.6;
  border: 1px dashed var(--navy-light) !important;
  background: transparent !important;
  color: var(--text-dim) !important;
  cursor: pointer;
}
.difficulty-btn-locked:hover {
  opacity: 1;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  background: rgba(242,196,90,0.05) !important;
}

/* --- Premium banner --- */
.premium-banner {
  margin: 0 0 24px;
}
.premium-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(242,196,90,0.08), rgba(242,196,90,0.03));
  border: 1px solid rgba(242,196,90,0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.premium-banner-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.premium-banner-inner a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}
.premium-banner-inner a:hover {
  text-decoration: underline;
}

/* --- Nav logo (image-based) --- */
.nav-logo-img {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
  vertical-align: middle;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
.nav-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.nav-logo .logo-a {
  color: #ffffff;
}
.nav-logo .logo-b {
  color: rgba(255,255,255,0.55);
  font-style: italic;
  font-weight: 500;
  font-size: 0.72em;
  padding: 0 2px;
}
.nav-logo .logo-c {
  background: linear-gradient(120deg, #FFE9A8, #F6DA85 40%, #E2B34D 75%, #C8941F);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-light);
}

/* --- Email signup form (Netlify Forms) --- */
.email-signup-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 440px;
  margin: 16px auto 0;
}
.email-signup-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--navy-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.email-signup-form input[type="email"]:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(242,196,90,0.15);
}
.email-signup-form button {
  padding: 12px 24px;
}

/* --- Print (for certificates) --- */
@media print {
  #main-nav, #main-footer, .btn, .typing-controls, #particles-bg { display: none !important; }
  body { background: white; color: black; }
  .certificate { border-color: #333; box-shadow: none; background: white; }
  .certificate h1, .certificate .cert-name { color: #333; }
}
