/* ============================================
   KENPO HUB — Global Stylesheet
   Aesthetic: Dark luxury / martial precision
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Outfit:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg:          #0f0d0b;
  --bg2:         #181410;
  --bg3:         #1e1a14;
  --surface:     #242018;
  --surface2:    #2c2820;
  --border:      rgba(201,126,42,0.18);
  --border2:     rgba(201,126,42,0.35);
  --gold:        #c97e2a;
  --gold-light:  #e8a84a;
  --gold-dim:    rgba(201,126,42,0.12);
  --cream:       #e8dfd0;
  --cream-dim:   rgba(232,223,208,0.6);
  --text:        #e8dfd0;
  --text-muted:  #8a7a68;
  --text-faint:  #4a3e32;
  --red:         #c0392b;
  --green:       #27664e;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 24px rgba(201,126,42,0.2);
  --font-display: 'Cinzel', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--cream);
}

/* ---- Utility ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---- Gold Divider ---- */
.gold-line {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #0f0d0b;
}
.btn-primary:hover {
  background: var(--gold-light);
  color: #0f0d0b;
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border2);
}
.btn-outline:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
}

/* ---- Header / Navbar ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(15,13,11,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav-logo .logo-bolt {
  color: var(--gold);
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
}
.nav-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-tab.active { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 0.75rem; }

/* ---- Upgrade Banner ---- */
.upgrade-banner {
  background: linear-gradient(90deg, var(--bg2) 0%, #2a1f0f 50%, var(--bg2) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.upgrade-banner:hover { background: var(--gold-dim); color: var(--text); }
.upgrade-banner strong { color: var(--gold); }

/* ---- Belt Filter ---- */
.belt-filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 64px;
  z-index: 150;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.belt-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 40px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.belt-btn:hover { border-color: var(--border2); color: var(--text); }
.belt-btn.active { background: var(--gold); border-color: var(--gold); color: #0f0d0b; }
.belt-btn.locked { opacity: 0.45; }
.belt-btn.locked::after { content: " 🔒"; font-size: 0.65rem; }

/* ---- Content Grid ---- */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 2rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---- Technique Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.card-visual {
  height: 120px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind icons */
.card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,126,42,0.08) 0%, transparent 70%);
}

.card-visual svg { width: 56px; height: 56px; position: relative; }

.card-body { padding: 1rem 1.1rem 1.1rem; }

.card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.card-belt {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 40px;
}

/* Belt color chips */
.belt-white  { background: rgba(245,240,232,0.12); color: #c8b89a; border: 1px solid rgba(200,184,154,0.25); }
.belt-yellow { background: rgba(255,215,0,0.1);    color: #d4a830; border: 1px solid rgba(212,168,48,0.25); }
.belt-orange { background: rgba(201,126,42,0.12);  color: var(--gold); border: 1px solid var(--border); }
.belt-purple { background: rgba(120,80,160,0.12);  color: #a07fd0; border: 1px solid rgba(160,127,208,0.25); }
.belt-blue   { background: rgba(44,107,158,0.12);  color: #5a9fd4; border: 1px solid rgba(90,159,212,0.25); }
.belt-green  { background: rgba(45,106,47,0.12);   color: #5aad5c; border: 1px solid rgba(90,173,92,0.25); }
.belt-brown  { background: rgba(139,90,43,0.12);   color: #b07840; border: 1px solid rgba(176,120,64,0.25); }
.belt-brown2 { background: rgba(139,90,43,0.12);   color: #b07840; border: 1px solid rgba(176,120,64,0.25); }
.belt-brown3 { background: rgba(139,90,43,0.12);   color: #b07840; border: 1px solid rgba(176,120,64,0.25); }
.belt-black  { background: rgba(232,223,208,0.06); color: var(--cream); border: 1px solid rgba(232,223,208,0.15); }
.belt-black2 { background: rgba(232,223,208,0.06); color: var(--cream); border: 1px solid rgba(232,223,208,0.15); }
.belt-black3 { background: rgba(232,223,208,0.06); color: var(--cream); border: 1px solid rgba(232,223,208,0.15); }
.belt-black4 { background: rgba(232,223,208,0.06); color: var(--cream); border: 1px solid rgba(232,223,208,0.15); }
.belt-black5 { background: rgba(232,223,208,0.06); color: var(--cream); border: 1px solid rgba(232,223,208,0.15); }

.card-lock {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---- Modal ---- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.active { display: flex; }

.modal-content {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-header {
  padding: 1.75rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); border-color: var(--border2); }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.4rem;
  padding-right: 2.5rem;
}

.modal-body { padding: 1.5rem 1.75rem 1.75rem; }

.modal-section { margin-bottom: 1.5rem; }
.modal-section:last-child { margin-bottom: 0; }

.modal-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.modal-section p,
.modal-section li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.modal-steps { list-style: none; counter-reset: steps; }
.modal-steps li {
  counter-increment: steps;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.modal-steps li:last-child { border-bottom: none; }
.modal-steps li::before {
  content: counter(steps);
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--border2);
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.mistakes-list { list-style: none; }
.mistakes-list li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
}
.mistakes-list li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: #c0392b;
  font-weight: 700;
}

.modal-upgrade-box {
  background: var(--gold-dim);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-top: 1.5rem;
}
.modal-upgrade-box p { color: var(--text-muted); margin-bottom: 1rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); }

.footer-legal { font-size: 0.75rem; color: var(--text-faint); line-height: 1.8; }
.footer-legal a { color: var(--text-faint); }
.footer-legal a:hover { color: var(--text-muted); }

.footer-warning {
  font-size: 0.75rem;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  display: inline-block;
  margin: 0.5rem 0;
}

/* ---- Pricing Page ---- */
.page-hero {
  text-align: center;
  padding: 3.5rem 1.5rem 2.5rem;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.75rem; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 0 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.pricing-card.featured {
  border-color: var(--gold);
  background: linear-gradient(160deg, var(--surface2) 0%, #1e180c 100%);
  box-shadow: 0 0 40px rgba(201,126,42,0.12);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #0f0d0b;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  white-space: nowrap;
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.pricing-price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }

.pricing-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.pricing-features { list-style: none; flex: 1; margin-bottom: 1.5rem; }
.pricing-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  padding-left: 1.4rem;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.pricing-features li.unavail { opacity: 0.4; }
.pricing-features li.unavail::before { content: '—'; color: var(--text-faint); }

/* PayPal button wrapper */
.paypal-btn-wrap {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* ---- FAQ ---- */
.faq-section {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}
.faq-section h2 {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.faq-a { font-size: 0.87rem; color: var(--text-muted); line-height: 1.65; }

/* ---- Alerts (success / error) ---- */
.alert {
  display: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}
.alert.show { display: block; }
.alert-success { background: rgba(39,102,78,0.2); border: 1px solid #27664e; color: #7ad4b0; }
.alert-error   { background: rgba(192,57,43,0.2); border: 1px solid var(--red); color: #e88; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .content-grid { grid-template-columns: 1fr 1fr; gap: 0.85rem; padding: 1rem; }
  .card-visual { height: 90px; }
  .card-title { font-size: 0.82rem; }
  .belt-filter-bar { padding: 0.6rem 1rem; top: 64px; }
  .modal-content { border-radius: var(--radius-lg); }
  .modal-header, .modal-body { padding: 1.25rem; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
  .page-hero { padding: 2rem 1.25rem 1.5rem; }
}

@media (max-width: 400px) {
  .content-grid { grid-template-columns: 1fr; }
}

.btn-instructor {
    background: #1a1a1a;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid #c97e2a;
}
.btn-instructor:hover {
    background: #c97e2a;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ---- Selection ---- */
::selection { background: rgba(201,126,42,0.3); color: var(--cream); }
/* ============================================
   CARD STYLES - Dark Brown Theme
   ============================================ */

/* Card background and text */
.card {
    background: #3d3026;
    color: #ffffff;
}

.card-title {
    color: #ffffff;
}

.card-belt {
    /* Belt badges keep their original colors */
}

/* Card hover effect */
.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Lock icon on locked belts */
.card-lock {
    background: rgba(0,0,0,0.6);
    color: #f5d742;
}

/* ============================================
   MODAL STYLES - Dark Brown Theme
   ============================================ */

/* Modal background and text */
.modal-content {
    background: #3d3026;
    color: #ffffff;
}

.modal-title {
    color: #ffffff;
}

.modal-label {
    color: #c97e2a;
}

.modal-section p,
.modal-section li {
    color: #e8e0d5;
}

/* Modal steps list */
.modal-steps li,
.mistakes-list li {
    color: #e8e0d5;
}

/* Modal close button */
.modal-close {
    color: #e8e0d5;
}

.modal-close:hover {
    color: #c97e2a;
}

/* Modal upgrade box */
.modal-upgrade-box {
    background: #2a241e;
    color: #e8e0d5;
}

.modal-upgrade-box p {
    color: #e8e0d5;
}

/* ============================================
   FLASHCARD STYLES - Dark Brown Theme
   ============================================ */

.flashcard {
    background: #3d3026;
}

.flashcard-question {
    color: #ffffff;
}

.flashcard-answer {
    color: #e8e0d5;
}

.flashcard.revealed .flashcard-question {
    color: #c97e2a;
}

.flashcard-hint {
    color: #b0a898;
}

/* ============================================
   QUIZ STYLES - Dark Brown Theme
   ============================================ */

.quiz-question {
    background: #3d3026;
}

.quiz-question-text {
    color: #ffffff;
}

.quiz-option {
    background: #4a3e32;
    color: #ffffff;
    border-color: #6b5a48;
}

.quiz-option:hover {
    background: #5c4e40;
}

.quiz-feedback {
    background: #2a241e;
    color: #e8e0d5;
}

/* ============================================
   EMPTY STATE STYLES
   ============================================ */

.empty-state {
    background: #3d3026;
    color: #e8e0d5;
}

.empty-state strong {
    color: #ffffff;
}

.empty-state a {
    color: #c97e2a;
}
