/* ═══════════════════════════════════════════════════════════════
   AIMLSE Landing Page
   Warm ivory ground, charcoal ink, serif display headlines.
   The one deliberate dark element is the product showcase window:
   a view into the real dark-mode editor on an otherwise light page.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #faf9f5;
  --surface: #f0eee6;
  --surface-2: #e8e5da;
  --ink: #141413;
  --ink-dim: #5e5d59;
  --border: #e3e0d5;
  --border-strong: #d1cec2;
  --accent: #9c6908;
  --accent-dark: #7c5406;
  --accent-rgb: 156, 105, 8;
  --code-bg: #15130d;
  --code-border: #2c2820;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 100px;
  --font-display: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 200;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.beta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(22, 179, 87, 0.08);
  color: #0f9e4a;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(22, 179, 87, 0.18);
  text-transform: uppercase;
}

.beta-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16b357;
  animation: beta-pulse 1.8s ease-in-out infinite;
}

@keyframes beta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 179, 87, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(22, 179, 87, 0); }
}

.nav-links {
  display: flex;
  gap: 26px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Nav-right CTAs. Explicit colors (no bare variables) so these anchors never
   fall back to default link-blue if a stylesheet loads partially. Hierarchy:
   Get a Demo = loud gold, Sign up = solid dark, Sign in = quiet outline. */
.btn-demo,
.btn-signin,
.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-pill, 100px);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: var(--transition, all 0.2s cubic-bezier(0.4, 0, 0.2, 1));
}

/* Quiet outline — least emphasis. */
.btn-signin {
  color: #141413;
  background: #ffffff;
  border-color: #d1cec2;
  font-weight: 600;
}
.btn-signin:hover {
  color: #7c5406;
  border-color: #c9a227;
  background: #fdf9ef;
}

/* Primary top-nav CTA: sales-led "Get a Demo". Loudest button in the navbar. */
.btn-demo {
  background: linear-gradient(135deg, #b5820f 0%, #9c6908 100%);
  color: #ffffff;
  padding: 10px 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(156, 105, 8, 0.30);
}
.btn-demo:hover {
  background: linear-gradient(135deg, #9c6908 0%, #7c5406 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(156, 105, 8, 0.42);
}

/* Solid dark — secondary emphasis. */
.btn-signup {
  background: #141413;
  color: #faf9f5;
  border-color: #141413;
  font-weight: 600;
}
.btn-signup:hover {
  background: #2b2926;
  border-color: #2b2926;
  transform: translateY(-1px);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
/* Explicit color fallbacks (not bare variables) so these anchors never fall
   back to default link-blue if :root vars don't resolve / the CSS is stale. */
.btn-primary {
  display: inline-block;
  text-decoration: none;
  background: var(--ink, #141413);
  color: var(--bg, #faf9f5);
  border: 1px solid var(--ink, #141413);
  padding: 14px 32px;
  border-radius: var(--radius-pill, 100px);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition, all 0.2s cubic-bezier(0.4, 0, 0.2, 1));
}

.btn-primary:hover {
  background: #33312c;
  border-color: #33312c;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(20, 20, 19, 0.18);
}

.btn-secondary {
  display: inline-block;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border-strong, #d1cec2);
  color: var(--ink, #141413);
  padding: 14px 32px;
  border-radius: var(--radius-pill, 100px);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition, all 0.2s cubic-bezier(0.4, 0, 0.2, 1));
}

.btn-secondary:hover {
  border-color: var(--ink, #141413);
  background: #fdf9ef;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 110px 32px 70px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
  background: var(--bg);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-dim);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-dim);
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.section {
  padding: 100px 32px;
}

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-container.narrow {
  max-width: 760px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.section-intro {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 680px;
  margin-bottom: 56px;
  line-height: 1.7;
}

.prose {
  font-size: 18px;
  color: var(--ink-dim);
  line-height: 1.8;
}

/* ── STAKES ──────────────────────────────────────────────────── */
.stakes {
  padding-top: 20px;
}

.stakes-lead {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.stakes-follow {
  font-size: 19px;
  color: var(--ink-dim);
  line-height: 1.8;
  max-width: 620px;
}

/* ── SHOWCASE (dark product window) ──────────────────────────── */
.showcase {
  padding: 20px 32px 80px;
}

.shot-box {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(20, 20, 19, 0.22);
}

.editor-frame {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  background: var(--code-bg);
}

/* ── WHITEBOARD SESSION TEASER ───────────────────────────────── */
.whiteboard-teaser {
  padding: 0 32px 40px;
}

.whiteboard-teaser-box {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 36px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.whiteboard-teaser-box:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(20, 20, 19, 0.07);
}

.whiteboard-teaser-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.whiteboard-teaser-box h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 6px;
}

.whiteboard-teaser-box p {
  font-size: 14px;
  color: var(--ink-dim);
  max-width: 52ch;
}

.whiteboard-teaser-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── FOUR LAYERS ─────────────────────────────────────────────── */
.layers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
}

.layer-card {
  padding: 36px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: var(--transition);
}

.layer-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 20, 19, 0.07);
}

.layer-featured {
  grid-column: span 2;
  grid-row: span 1;
  background: var(--bg);
  border-color: var(--border-strong);
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 16px;
}

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

.layer-card p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.75;
}

.layer-stats {
  display: flex;
  gap: 44px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.layer-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-dim);
}

/* ── HONEST / VERIFIED ───────────────────────────────────────── */
.honest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.honest-item {
  padding: 36px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}

.honest-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 20, 19, 0.07);
}

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

.honest-item p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.75;
}

/* ── WHO IT'S FOR ────────────────────────────────────────────── */
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.who-card {
  padding: 36px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

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

.who-card p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.75;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section {
  padding: 130px 32px;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 46px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.cta-section p {
  font-size: 17px;
  color: var(--ink-dim);
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 32px;
  background: var(--surface);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ink-dim);
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

.footer-discord:hover {
  color: #4752c4;
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.08);
}

.footer-discord svg { flex-shrink: 0; }

/* ── SCROLL REVEAL ──────────────────────────────────────────────
   Gated behind html.js-ready so content is never hidden if the
   script fails to load. Respects prefers-reduced-motion. */
html.js-ready .section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js-ready .section.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js-ready .section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  /* Interactive editor demo — on iPad/phone the embedded editor is shown as a
     scaled-down desktop preview (driven by lp.js) instead of its cramped
     mobile reflow, so it reads as a clean mini-app rather than clutter. */
  .showcase {
    padding: 16px 24px 64px;
  }

  .shot-box {
    position: relative;
    overflow: hidden;
    min-height: 280px;
  }

  .editor-frame {
    transform-origin: top left;
  }

  .demo-box {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .demo-left {
    border-right: none;
    border-bottom: 1px solid var(--code-border);
  }

  .layers-grid,
  .honest-grid {
    grid-template-columns: 1fr 1fr;
  }

  .layer-featured {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 70px 20px 50px;
  }

  .section {
    padding: 64px 20px;
  }

  .showcase,
  .whiteboard-teaser {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Phones: lighter framing around the scaled preview (sizing is in lp.js). */
  .shot-box {
    border-radius: var(--radius, 12px);
    box-shadow: 0 12px 32px rgba(20, 20, 19, 0.16);
    max-width: 100%;
    min-height: 240px;
  }

  .layers-grid,
  .honest-grid,
  .who-grid {
    grid-template-columns: 1fr;
  }

  .layer-featured {
    grid-column: span 1;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .whiteboard-teaser-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .nav-right .btn-signin,
  .nav-right .btn-signup {
    display: none;
  }
}

@media (max-width: 480px) {
  .showcase {
    padding: 12px 12px 48px;
  }
}
