:root {
  --ink: #0f1117;
  --paper: #f8f6f1;
  --cream: #eee9df;
  --accent: #d35233;
  --accent-light: #f0a68e;
  --accent-glow: rgba(211, 82, 51, 0.12);
  --teal: #1a7a6d;
  --teal-light: #a3d9cf;
  --slate: #4a4e5a;
  --muted: #8a8d96;
  --card-bg: #ffffff;
  --border: #e2ddd4;
  --radius: 14px;
  --shadow-sm:
    0 1px 3px rgba(15, 17, 23, 0.04), 0 1px 2px rgba(15, 17, 23, 0.06);
  --shadow-md:
    0 4px 16px rgba(15, 17, 23, 0.06), 0 2px 4px rgba(15, 17, 23, 0.04);
  --shadow-lg:
    0 12px 40px rgba(15, 17, 23, 0.08), 0 4px 12px rgba(15, 17, 23, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === GRAIN OVERLAY === */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

pre.debug {
  position: fixed;
  bottom: 0;
  left: 10px;
  font-family: "JetBrains Mono", monospace;
  text-align: left;
  background: var(--card-bg);
  color: var(--slate);
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  overflow-x: auto;
  max-width: 300px;
  max-height: 300px;
  z-index: 999999;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  background: rgba(248, 246, 241, 0.85);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.5px;
}

.logo-text {
  font-family: "DM Serif Display", serif;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--paper) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition:
    transform 0.2s,
    box-shadow 0.2s !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 2rem 80px;
  position: relative;
}

.hero-bg-shape {
  position: absolute;
  top: -120px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    ellipse at 30% 40%,
    var(--accent-glow) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero-bg-shape-2 {
  position: absolute;
  bottom: -100px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    ellipse at 60% 50%,
    rgba(26, 122, 109, 0.06) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.03);
  }
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-light);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease both;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hero h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero h1 .highlight {
  color: var(--accent);
  position: relative;
}

.hero h1 .highlight::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-light);
  border-radius: 2px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 480px;
  margin-bottom: 2rem;
  font-weight: 300;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(211, 82, 51, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(211, 82, 51, 0.3);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-light);
  background: var(--accent-glow);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === HERO MOCKUP === */
.hero-visual {
  animation: fadeInUp 0.8s ease 0.35s both;
}

.mockup-window {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mockup-window:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot:nth-child(1) {
  background: #f87171;
}
.mockup-dot:nth-child(2) {
  background: #fbbf24;
}
.mockup-dot:nth-child(3) {
  background: #34d399;
}

.mockup-url {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  background: var(--paper);
  padding: 4px 12px;
  border-radius: 6px;
  margin-left: 8px;
}

.mockup-content {
  padding: 20px;
}

.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.mock-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 2px solid var(--cream);
}

.mock-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--cream);
  color: var(--slate);
}

.mock-table tr:last-child td {
  border-bottom: none;
}

.score-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.score-high {
  background: #d1fae5;
  color: #065f46;
}
.score-mid {
  background: #fef3c7;
  color: #92400e;
}
.score-low {
  background: #fee2e2;
  color: #991b1b;
}

/* === STATS BAR === */
.stats-bar {
  padding: 3rem 2rem;
  background: var(--ink);
  color: var(--paper);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: "DM Serif Display", serif;
  font-size: 2.2rem;
  letter-spacing: -1px;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(248, 246, 241, 0.6);
  margin-top: 4px;
  font-weight: 300;
}

/* === NEW FEATURE === */
.new-feature {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}

.new-feature-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  margin-bottom: 1rem;
}

.section-label .dot {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.new-feature h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.new-feature > .new-feature-inner > p {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 560px;
  font-weight: 300;
  margin-bottom: 3rem;
}

.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.feature-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-step {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-step:hover {
  border-color: var(--teal-light);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--teal);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: "JetBrains Mono", monospace;
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
}

.feature-preview {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--teal);
  color: white;
}

.preview-header span {
  font-size: 0.82rem;
  font-weight: 600;
}

.preview-header .file-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
}

.preview-body {
  padding: 24px;
}

.qcm-question {
  margin-bottom: 1.25rem;
}

.qcm-question:last-child {
  margin-bottom: 0;
}

.qcm-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.q-num {
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
}

.q-text {
  font-size: 0.85rem;
  font-weight: 500;
}

.qcm-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 44px;
}

.qcm-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--slate);
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.qcm-opt.correct {
  background: #d1fae5;
  color: #065f46;
  font-weight: 500;
}

.qcm-opt .radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.qcm-opt.correct .radio {
  border-color: #065f46;
  background: #065f46;
  box-shadow: inset 0 0 0 2px #d1fae5;
}

/* === FEATURES GRID === */
.features {
  padding: 6rem 2rem;
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  text-align: center;
}

.features > .features-inner > p {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.icon-orange {
  background: #fef3e2;
}
.icon-green {
  background: #d1fae5;
}
.icon-blue {
  background: #dbeafe;
}
.icon-purple {
  background: #ede9fe;
}
.icon-pink {
  background: #fce7f3;
}
.icon-teal {
  background: #ccfbf1;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.55;
}

.feature-card .tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 100px;
}

.tag-new {
  background: #d1fae5;
  color: #065f46;
}
.tag-soon {
  background: #fef3c7;
  color: #92400e;
}

/* === HOW IT WORKS === */
.how-it-works {
  padding: 6rem 2rem;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.how-it-works::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    ellipse,
    rgba(211, 82, 51, 0.08),
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.how-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.how-it-works h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
  text-align: center;
}

.how-it-works > .how-inner > p {
  text-align: center;
  color: rgba(248, 246, 241, 0.5);
  font-weight: 300;
  margin-bottom: 3.5rem;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  font-family: "DM Serif Display", serif;
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.85rem;
  color: rgba(248, 246, 241, 0.55);
  font-weight: 300;
}

.step-divider {
  display: none;
}

/* === CTA === */
.cta {
  padding: 6rem 2rem;
  text-align: center;
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem;
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}

.cta h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
}

.cta p {
  color: var(--muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* === FOOTER === */
footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
}

footer strong {
  font-weight: 600;
  color: var(--ink);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    order: -1;
  }

  .mockup-window {
    transform: none;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-showcase {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 100px 1.25rem 60px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .stats-inner {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    padding: 2.5rem 1.5rem;
  }
}

/* === SCROLL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
