@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Space+Grotesk:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'Space Mono', Courier, monospace;
  
  --bg-default: #FAF9F7;
  --bg-card: #FFFFFF;
  --text-default: #2E2F38;
  --text-muted: #797A8B;
  --primary: #5B47F4;
  --primary-hover: #4533D1;
  --border-color: #ECEAF5;
  --accent-teal: #00B894;
  --accent-teal-dark: #008F72;
  --pastel-purple: #F3EEFF;
  --pastel-teal: #E8F9F5;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-default);
  color: var(--text-default);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  color: var(--text-default);
}

.logo-symbol {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(91, 71, 244, 0.2);
}

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

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--primary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(91, 71, 244, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(91, 71, 244, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-default);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  background-color: var(--bg-default);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lang {
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-default);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding-top: 180px;
  padding-bottom: 96px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background-color: var(--pastel-purple);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

.badge-teal {
  background-color: var(--pastel-teal);
  color: var(--accent-teal);
  margin-left: 8px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto 24px auto;
  color: var(--text-default);
}

.hero h1 em {
  font-style: italic;
  position: relative;
}

.hero p {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

.badge-download-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.app-store-btn {
  display: inline-block;
  transition: transform 0.2s ease;
}

.app-store-btn:hover {
  transform: translateY(-2px);
}

.app-store-btn img {
  height: 48px;
  display: block;
}

.google-play-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.google-play-btn {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.google-play-btn img {
  height: 48px;
  display: block;
}

.google-play-coming-soon {
  position: absolute;
  top: -12px;
  right: -24px;
  background-color: var(--accent-teal);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: rotate(6deg);
  box-shadow: 0 4px 8px rgba(0, 184, 148, 0.2);
}

/* Mockup Window */
.hero-mockup {
  max-width: 1000px;
  margin: 0 auto;
}

.mockup-window {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(91, 71, 244, 0.06);
}

.mockup-header {
  height: 48px;
  background-color: #FAF9F7;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.mockup-dots {
  display: flex;
  gap: 6px;
  position: absolute;
  left: 16px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ECEAF5;
}

.mockup-address {
  margin: 0 auto;
  width: 400px;
  height: 24px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.mockup-content {
  width: 100%;
  aspect-ratio: 16/10;
  background-color: #FAF9F7;
  overflow: hidden;
}

.mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sections General */
section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-default);
  letter-spacing: -0.01em;
}

.section-header p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
}

.bento-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 10px 30px rgba(91, 71, 244, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  box-shadow: 0 12px 36px rgba(91, 71, 244, 0.08);
  transform: translateY(-3px);
}

.bento-card-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-default);
}

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

.bento-card .badge-mono {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.bento-large-left {
  grid-column: span 7;
}

.bento-large-right {
  grid-column: span 5;
}

.bento-half {
  grid-column: span 6;
}

.bento-visual {
  width: 100%;
  height: 280px;
  background-color: var(--bg-default);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Interactive Bento Component: PDF Upload */
.demo-upload-area {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  background-color: #FFFFFF;
}

.upload-dashed-box {
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(91, 71, 244, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.demo-upload-area:hover .upload-dashed-box {
  border-color: var(--primary);
  background-color: var(--pastel-purple);
}

.pdf-icon {
  width: 54px;
  height: 54px;
  background-color: var(--pastel-purple);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(91, 71, 244, 0.15);
}

.pdf-icon svg {
  color: var(--primary);
}

/* Custom simulated progress bar */
.demo-progress-container {
  display: none;
  width: 80%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 16px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.1s linear;
}

.demo-upload-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.success-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--pastel-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-teal);
  box-shadow: 0 4px 10px rgba(0, 184, 148, 0.2);
}

/* Simulated lessons list after upload */
.demo-modules-list {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #FFFFFF;
}

.demo-modules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.demo-modules-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-default);
}

.demo-modules-header span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-teal-dark);
  font-weight: 700;
  background-color: var(--pastel-teal);
  padding: 2px 6px;
  border-radius: 4px;
}

.demo-modules-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 190px;
}

.demo-module-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-default);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.demo-module-item:hover {
  border-color: var(--primary);
  background-color: var(--pastel-purple);
}

.demo-module-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-module-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
}

.demo-module-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-teal-dark);
  background-color: var(--pastel-teal);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Interactive Bento Component: Chat Tutor */
.demo-chat-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: #FFFFFF;
}

.demo-chat-messages {
  flex-grow: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  border-bottom: 1px solid var(--border-color);
  max-height: 180px;
}

.chat-message {
  display: flex;
  max-width: 80%;
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.chat-message .bubble {
  padding: 10px 16px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.chat-message.bot .bubble {
  background-color: var(--bg-default);
  color: var(--text-default);
  border-bottom-left-radius: 4px;
}

.chat-message.user .bubble {
  background-color: var(--primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  border-color: var(--primary);
}

.demo-chat-input-bar {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-prompt {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 6px 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-default);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-prompt:hover:not(:disabled) {
  background-color: var(--pastel-purple);
  border-color: var(--primary);
  color: var(--primary);
}

.chat-prompt:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Interactive Bento Component: Roadmap Node */
.demo-roadmap-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.roadmap-timeline-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.rm-node {
  padding: 8px 12px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
  flex: 1;
  min-width: 75px;
  max-width: 95px;
  text-align: center;
}

.rm-node.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(91, 71, 244, 0.3);
}

.rm-node .node-date {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  opacity: 0.8;
}

.rm-connector {
  flex-grow: 1;
  max-width: 32px;
  height: 3px;
  background-color: var(--border-color);
  border-radius: 2px;
}

/* Interactive Bento Component: Flashcard Click to Reveal */
.demo-flashcard-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.flashcard-mock {
  width: 260px;
  height: 170px;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(91, 71, 244, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.flashcard-mock.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  gap: 12px;
}

.flashcard-face.front {
  z-index: 2;
}

.flashcard-face.back {
  transform: rotateY(180deg);
  background-color: var(--pastel-purple);
  border-radius: 16px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
}

.flashcard-term {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-default);
}

.flashcard-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-default);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* How it Works Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step-card {
  text-align: left;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 20px;
  display: block;
  position: relative;
}

.step-num::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 64px;
  right: -20px;
  height: 2px;
  background-color: var(--border-color);
}

.timeline-step:last-child .step-num::after {
  display: none;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-default);
}

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

/* Comparison Section */
.comparison-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.comparison-box {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 48px;
}

.comparison-box.highlight {
  border: 2px solid var(--primary);
  box-shadow: 0 20px 40px rgba(91, 71, 244, 0.06);
}

.comparison-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.comparison-header h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.comparison-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.comparison-list li {
  display: flex;
  gap: 16px;
  font-size: 15px;
  line-height: 1.5;
}

.comparison-list strong {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-default);
}

.comparison-list span {
  color: var(--text-muted);
}

.comp-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.check-icon {
  background-color: var(--pastel-teal);
  color: var(--accent-teal);
}

.cross-icon {
  background-color: #FFEBEB;
  color: #FF7675;
}

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

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

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-default);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-sans);
}

.faq-trigger svg {
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-trigger svg {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-content p {
  padding-top: 16px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Call to Action (CTA) */
.cta {
  background-color: var(--primary);
  color: #FFFFFF;
  text-align: center;
  padding: 96px 0;
  border-radius: 32px;
  margin: 0 24px 120px 24px;
}

.cta h2 {
  font-family: var(--font-serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
}

.cta p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.cta .badge-download-group {
  justify-content: center;
}

.cta .app-store-btn img {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}

/* Footer */
footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 48px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-bottom p span.powered-by {
  font-weight: 600;
  color: var(--text-default);
}

/* Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Grid Rules */
@media (max-width: 992px) {
  .bento-large-left, .bento-large-right {
    grid-column: span 12;
  }
  .timeline {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .step-num::after {
    display: none;
  }
  .comparison-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 58px;
  }
  .bento-half {
    grid-column: span 12;
  }
  nav {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
