:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --accent: #F97316;
  --accent-dark: #EA580C;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --bg: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-warm: #FFFBF5;
  --line: #E2E8F0;
  --line-light: #F1F5F9;
  --success: #16A34A;
  --error: #DC2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon { font-size: 28px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.brand-ai {
  color: var(--primary);
  font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 8px; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navlinks a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.navlinks a:hover { color: var(--text); background: var(--bg-light); }

.nav-cta {
  margin-left: 8px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 860px) {
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .navlinks {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
    padding: 6px 0;
  }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 15px 28px; border-radius: 0; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-outline:hover {
  background: var(--bg-light);
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 50%, var(--bg-warm) 100%);
  height: calc(100vh - 68px);
  min-height: 520px;
  max-height: 900px;
  display: flex;
  align-items: center;
  padding: 40px 0;
  overflow: hidden;
}

.hero-content {
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  color: var(--primary);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-light);
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-proof {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============ SECTIONS ============ */
.section {
  padding: 80px 0;
}

.section-light { background: var(--bg-light); }
.section-white { background: var(--bg); }

.section-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #4F46E5 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}

.section-cta h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-cta p {
  font-size: 18px;
  opacity: .85;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ============ STEPS ============ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
}

/* ============ FEATURE SPLIT ============ */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.feature-text h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.feature-text p {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.feature-list {
  list-style: none;
  margin: 16px 0 24px;
}

.feature-list li {
  padding: 6px 0 6px 28px;
  position: relative;
  color: var(--text-light);
  font-size: 15px;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ============ CHAT PREVIEW ============ */
.chat-preview {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
}

.chat-bubble {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.chat-bubble:last-child { margin-bottom: 0; }

.chat-user {
  background: var(--primary);
  color: #fff;
  margin-left: 40px;
  border-bottom-right-radius: 4px;
}

.chat-ai {
  background: var(--bg);
  color: var(--text);
  margin-right: 40px;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.chat-ai p { margin-bottom: 10px; }
.chat-ai p:last-child { margin-bottom: 0; }

/* ============ DESTINATIONS GRID ============ */
.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.destination-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  text-decoration: none;
}

.destination-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.dest-flags {
  font-size: 32px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dest-arrow {
  font-size: 18px;
  color: var(--text-muted);
}

.destination-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.destination-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ============ WHY GRID ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 32px;
}

.why-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.why-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.why-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.6;
}

/* ============ PRICING ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.price-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}

.price-card-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.price-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.price-amount span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.price-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.price-features {
  list-style: none;
  margin-bottom: 28px;
}

.price-features li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 1px solid var(--line-light);
}

.price-features li:last-child { border-bottom: none; }

.price-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ============ FAQ ============ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.faq-item summary {
  padding: 20px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 0 20px;
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--line);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-tagline {
  color: var(--text-light);
  font-size: 15px;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-light);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--bg);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.form-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ============ AUTH PAGES ============ */
.auth-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  padding: 40px 16px;
}

.auth-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .auth-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 28px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-light);
}

/* ============ DASHBOARD ============ */
.page-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.page-header p {
  color: var(--text-light);
  margin-top: 4px;
}

.page-body {
  padding: 40px 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.dash-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.dash-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.progress-bar {
  height: 8px;
  background: var(--line-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tier-free { background: var(--line-light); color: var(--text-muted); }
.tier-traveler { background: #DBEAFE; color: #1D4ED8; }
.tier-explorer { background: #FEF3C7; color: #B45309; }
.tier-nomad { background: #EDE9FE; color: #7C3AED; }

/* ============ LEARN PAGES ============ */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  transition: all var(--transition);
}

.module-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  color: var(--text);
}

.module-item.locked {
  opacity: .6;
}

.module-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.module-info { flex: 1; }

.module-info h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.module-info p {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 2px;
}

.module-meta {
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
}

.lesson-content {
  max-width: 720px;
  margin: 0 auto;
}

.lesson-content h2, .lesson-content h3 {
  font-family: var(--font-display);
  margin-top: 32px;
  margin-bottom: 12px;
}

.lesson-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.phrase-block {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.phrase-block .phrase-local {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.phrase-block .phrase-pronunciation {
  font-size: 15px;
  color: var(--primary);
  font-style: italic;
}

.phrase-block .phrase-english {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ============ PHRASE COACH ============ */
.coach-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px - 80px);
}

.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
}

.coach-input-area {
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
}

.coach-input-area input {
  flex: 1;
}

.coach-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.scenario-chip {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.scenario-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ============ ADMIN ============ */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-light);
  font-size: 14px;
}

/* ============ SUCCESS STATE ============ */
.success-state {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.success-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
  .feature-split { grid-template-columns: 1fr; gap: 32px; }
  .why-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .price-card-featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 26px; }
  .hero-title { font-size: 32px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .auth-card { padding: 28px 20px; }
  .admin-stats { grid-template-columns: 1fr; }
}
