/* ===== RESET ===== */

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

:root {
  --bg: #0a0a0a;
  --bg-raised: #111;
  --bg-block: #0d0d0d;
  --border: #222;
  --border-light: #333;

  --text: #e0e0e0;
  --text-muted: #999;
  --text-dim: #666;
  --text-faint: #555;

  --accent: #00ff88;
  --accent-dim: #00dd77;
  --red: #ef4444;
  --amber: #f59e0b;

  --mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Source Code Pro', monospace;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(0, 255, 136, 0.18);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 30px;
}


/* ===== HERO ===== */

.hero {
  padding-top: 80px;
  margin-bottom: 0;
}

.logo {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-svg {
  flex-shrink: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6em;
  margin-bottom: 16px;
  color: #fff;
  letter-spacing: -1px;
}

.typewriter-accent {
  color: var(--accent);
}

.subtitle {
  font-size: 20px;
  color: #888;
  margin-bottom: 28px;
  font-weight: 300;
}

.hero-bullets {
  list-style: none;
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.hero-bullets li {
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
  padding-left: 16px;
}

.hero-bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.hero-cta-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  color: var(--bg);
  background: var(--accent);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s, background 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.25), 0 0 60px rgba(0, 255, 136, 0.08);
}

.hero-cta-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.35), 0 0 80px rgba(0, 255, 136, 0.12);
}


/* ===== SECTION TAGS ===== */

.section-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-tag-amber {
  color: #d97706;
}

.section-tag-dim {
  color: var(--text-dim);
}

.emphasis {
  color: var(--accent);
  font-weight: 500;
}


/* ===== PROBLEM + GAP (unified) ===== */

.section-problem-gap {
  margin-top: 80px;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.section-problem-gap .section-tag {
  margin-bottom: 32px;
}

.pg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.pg-heading {
  font-size: 26px;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 24px;
}

.pg-narrative p {
  font-size: 15px;
  color: #a0a0a0;
  margin-bottom: 18px;
  line-height: 1.75;
}

.pg-narrative p:last-child {
  margin-bottom: 0;
}

.pg-proof {
  border-left: 1px solid var(--border-light);
  padding-left: 40px;
}

.pg-proof-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.kd-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.kd-block {
  padding: 20px 22px;
  background: var(--bg-block);
}

.kd-knowing {
  border-left: 2px solid var(--accent);
}

.kd-doing {
  border-left: 2px solid var(--text-dim);
}

.kd-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.kd-knowing .kd-header {
  color: var(--accent);
}

.kd-doing .kd-header {
  color: var(--text-dim);
}

.kd-block ul {
  list-style: none;
}

.kd-block li {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.kd-block li:last-child {
  margin-bottom: 0;
}

.kd-check {
  color: var(--accent);
  flex-shrink: 0;
}

.kd-q {
  color: var(--text-dim);
  flex-shrink: 0;
}

.kd-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-dim);
  padding: 10px 0;
  opacity: 0.4;
}

.kd-punchline {
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
  margin-bottom: 0;
}


/* ===== THE REALITY ===== */

.reality-single {
  margin-top: 48px;
  padding: 40px;
  background: var(--bg);
}

.reality-single .section-tag {
  margin-bottom: 16px;
}

.reality-single h3 {
  font-size: 20px;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 24px;
  max-width: 600px;
}

.reality-single ul {
  list-style: none;
  margin-bottom: 24px;
}

.reality-single li {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-left: 22px;
  position: relative;
  line-height: 1.7;
}

.reality-single li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
}

.reality-single li:last-child {
  margin-bottom: 0;
}

.reality-closing {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
}


/* ======================================================== */
/* HOW IT WORKS + CHALLENGE SHOWCASE                        */
/* ======================================================== */

.section-full {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-full + .section-full {
  border-top: none;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
}

.section-label-hw {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
  text-align: center;
}

.section-heading-hw {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #fff;
}

.section-sub-hw {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
  line-height: 1.7;
}


/* --- Steps --- */

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

.steps {
  max-width: 860px;
  margin: 64px auto 0;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  padding-top: 4px;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.step-content p {
  font-size: 15px;
  color: #888;
  line-height: 1.7;
}


/* --- Terminal window chrome --- */

.terminal-window {
  background: var(--bg-block);
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.terminal-window:hover {
  border-color: var(--border-light);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid #1a1a1a;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: 8px;
  transition: opacity 0.3s;
}

.terminal-body {
  padding: 16px 18px;
  overflow: hidden;
}

.terminal-body pre {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}

.terminal-body code {
  font-family: inherit;
}

.code-muted { color: var(--text-faint); }
.code-cmd { color: var(--accent-dim); }
.code-green { color: var(--accent); }
.code-red { color: var(--red); }
.code-accent { color: var(--accent); font-weight: 600; }

.step-connector {
  display: flex;
  justify-content: flex-start;
  padding-left: 19px;
  height: 48px;
}


/* --- Tree Rotator --- */

.tree-rotator {
  position: relative;
  min-height: 265px;
}

.tree-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.tree-item.active {
  opacity: 1;
  pointer-events: auto;
}


/* --- Challenge Showcase --- */

.section-preview {
  background: var(--bg-raised);
}

.challenge-showcase {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 16px;
}

.showcase-sidebar {
  border-right: 1px solid var(--border);
  padding: 8px;
}

.showcase-challenge {
  padding: 14px;
  cursor: default;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  border: 1px solid transparent;
}

.showcase-challenge:hover {
  background: var(--bg-raised);
  border-color: var(--border);
  transform: translateX(2px);
}

.showcase-challenge.active {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.15);
}

.showcase-challenge h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.showcase-challenge p {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.showcase-difficulty {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.showcase-difficulty.hard {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.showcase-difficulty.medium {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
}

.showcase-more {
  padding: 14px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}


/* --- Showcase Detail (rich content) --- */

.showcase-detail {
  padding: 28px 32px;
  overflow-y: auto;
}

.detail-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-diff {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
}

.detail-diff.hard {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.detail-time {
  font-size: 12px;
  color: var(--text-dim);
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h5 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.detail-section p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.detail-section ul {
  list-style: none;
}

.detail-section li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}

.detail-section li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

.detail-section li strong {
  color: var(--text);
  font-weight: 500;
}

.detail-file {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: rgba(0, 255, 136, 0.06);
  padding: 4px 10px;
  border: 1px solid rgba(0, 255, 136, 0.12);
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.showcase-tags span {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 4px 12px;
}


/* ===== CTA ===== */

.cta-wrap {
  margin-top: 0;
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.cta-section {
  text-align: center;
  padding: 0;
  background: none;
  margin-bottom: 0;
}

.cta-section h2 {
  font-size: 44px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

.cta-section p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 36px;
  
}

.waitlist-form {
  max-width: 460px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group input[type="email"] {
  flex: 1;
  padding: 13px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 13px;
  transition: border-color 0.3s;
}

.input-group input[type="email"]:focus {
  border-color: var(--accent);
}

.input-group input[type="email"]::placeholder {
  color: var(--text-faint);
}

.input-group button {
  padding: 13px 28px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
}

.input-group button:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.3);
}

.input-group button:active {
  transform: translateY(0);
}

.privacy-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 15px;
}

.success-message {
  display: none;
  margin-top: 20px;
  color: var(--accent);
  font-size: 16px;
}


/* ===== FOOTER ===== */

.footer {
  margin-top: 10px;
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.8;
}

.footer-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.footer-contact {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
}

.footer-contact a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.footer-contact a:hover {
  opacity: 0.85;
}

.footer-copy {
  margin-top: 20px;
  font-size: 11px;
}


/* ===== GRAIN TEXTURE ===== */

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}


/* ===== HERO ENTRANCE ===== */

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero > * {
  opacity: 0;
  animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.15s; }
.hero > *:nth-child(3) { animation-delay: 0.25s; }
.hero > *:nth-child(4) { animation-delay: 0.35s; }
.hero > *:nth-child(5) { animation-delay: 0.45s; }


/* ===== TYPEWRITER CURSOR ===== */

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-accent::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: baseline;
  animation: cursor-blink 1.2s step-end infinite;
}


/* ===== SCROLL REVEAL ===== */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ===== TEST LINE ANIMATION ===== */

.test-line {
  display: block;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.test-line.visible {
  opacity: 1;
  transform: translateX(0);
}


/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .challenge-showcase {
    grid-template-columns: 1fr;
  }

  .showcase-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .showcase-more {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .step {
    grid-template-columns: auto 1fr;
    gap: 20px;
  }

  .terminal-window {
    grid-column: 1 / -1;
  }

  .showcase-sidebar {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .pg-proof {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 32px;
  }

  .reality-single {
    padding: 32px 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .container-wide {
    padding: 0 20px;
  }

  h1 {
    font-size: 30px;
    height: 3.9em;
  }

  .subtitle {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .hero-bullets {
    flex-direction: column;
    gap: 8px;
  }

  .hero-cta-btn {
    width: 100%;
    text-align: center;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group button {
    width: 100%;
  }

  .step {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-number {
    font-size: 2rem;
  }

  .step-connector {
    display: none;
  }

  .section-full {
    padding: 60px 0;
  }

  .showcase-sidebar {
    grid-template-columns: 1fr;
  }

  .showcase-detail {
    padding: 24px 20px;
  }

  .cta-wrap {
    padding: 60px 0;
  }

  .kd-punchline {
    font-size: 13px;
  }

  .section-problem-gap {
    padding: 40px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .test-line {
    opacity: 1;
    transform: none;
  }
}
