/* ============================================================
   CRUCIBLE - Clean, minimal YC-style landing page
   Palette: #FAFAF8 / #1A1A1A / #E8590C / #888
   Fonts: Source Serif 4 (display) + Inter (body) + JetBrains Mono
   ============================================================ */

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

:root {
  --bg: #FAFAF8;
  --text: #1A1A1A;
  --text-secondary: #666666;
  --accent: #E8590C;
  --border: #E5E5E3;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1140px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

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

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent) !important;
}

.nav-cta:hover {
  text-decoration: underline;
}

/* ---- Hero ---- */

.hero {
  padding: 140px 0 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
}

/* Hero app mockup */

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-window {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
}

.hw-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #FAFAFA;
}

.hw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.hw-body {
  display: flex;
  min-height: 280px;
}

.hw-sidebar {
  width: 120px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  background: #1A1A1A;
}

.hw-nav-item {
  font-family: var(--font-body);
  font-size: 0.625rem;
  padding: 6px 14px;
  color: #888888;
}

.hw-nav-active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.hw-content {
  flex: 1;
  padding: 16px 20px;
}

.hw-heading {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

.hw-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.hw-card {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  color: var(--text-secondary);
}

.hw-card:first-child {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: #FFFFFF;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: #333333;
}

/* ---- Divider ---- */

.divider {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 1px;
}

.divider::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--border);
}

/* ---- Sections ---- */

.section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 48px;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 640px;
}

.section-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ---- Problem: tool list ---- */

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.tool-sep {
  color: var(--border);
}

/* ---- Features grid ---- */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.feature {
  padding: 32px 32px 32px 0;
  border-bottom: 1px solid var(--border);
}

.feature:nth-child(even) {
  padding: 32px 0 32px 32px;
  border-left: 1px solid var(--border);
}

.feature:nth-last-child(-n+2) {
  border-bottom: none;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ---- Workflow ---- */

.workflow {
  display: flex;
  flex-direction: column;
}

.workflow-step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.workflow-step:last-child {
  border-bottom: none;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding-top: 2px;
  flex-shrink: 0;
  width: 28px;
}

.workflow-step h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.workflow-step p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.workflow-note {
  margin-top: 32px;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* ---- Audience ---- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.audience {
  padding: 0 32px 0 0;
}

.audience + .audience {
  padding: 0 32px;
  border-left: 1px solid var(--border);
}

.audience:last-child {
  padding: 0 0 0 32px;
}

.audience h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.audience p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ---- CTA ---- */

.section-cta {
  text-align: center;
}

.section-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.waitlist-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto 12px;
}

.waitlist-form input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--text);
  outline: none;
}

.waitlist-form input:focus {
  border-color: var(--text);
}

.waitlist-form input::placeholder {
  color: #BBBBBB;
}

.cta-fine {
  font-size: 0.75rem;
  color: #BBBBBB;
}

.waitlist-ok {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding: 12px 0;
}

/* ---- Footer ---- */

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---- Active nav link ---- */

.nav-link-active {
  color: var(--text) !important;
}

/* ---- Demo page ---- */

.demo-page {
  padding: 120px 0 80px;
}

.demo-subtitle {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* Video player */

.demo-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111111;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 48px;
}

.demo-player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-player-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #666666;
}

.demo-player-placeholder-inner p {
  font-size: 0.875rem;
}

.demo-iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.demo-iframe-hidden {
  display: none;
}

/* Segment cards */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.demo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: var(--font-body);
  color: var(--text);
}

.demo-card:hover {
  border-color: #CCCCCC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.demo-card-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.demo-card-top {
  margin-bottom: 12px;
}

.demo-card-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(232, 89, 12, 0.06);
  padding: 3px 8px;
  border-radius: 3px;
}

.demo-card-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.demo-card-desc {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---- Contact page ---- */

.contact-page {
  padding: 120px 0 80px;
}

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

.contact-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 12px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.contact-field input,
.contact-field textarea {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--text);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #BBBBBB;
}

.contact-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.contact-ok {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding: 12px 0;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 120px 0 80px;
  }

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

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 24px 0;
  }

  .feature:nth-child(even) {
    padding: 24px 0;
    border-left: none;
  }

  .audience-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .audience,
  .audience + .audience,
  .audience:last-child {
    padding: 0;
    border-left: none;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-header h2,
  .section-cta h2 {
    font-size: 1.375rem;
  }

  .tool-list {
    font-size: 0.75rem;
  }
}
