:root {
  --cream: #faf7f2;
  --ink: #1a1210;
  --ink-light: #3d332c;
  --ink-muted: #8a7e76;
  --gold: #c4943a;
  --gold-dark: #a67c2e;
  --gold-light: #f0dbb8;
  --burgundy: #6b1d30;
  --burgundy-deep: #2d0f16;
  --burgundy-light: #8b2942;
  --terminal-bg: #1a1210;
  --terminal-fg: #d4ccc4;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ——— Header ——— */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 18, 16, 0.08);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.header-cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  transition: all 0.2s;
}

.header-cta:hover {
  background: var(--gold);
  color: white;
}

/* ——— View Toggle ——— */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.view-toggle {
  display: flex;
  border: 1.5px solid rgba(26, 18, 16, 0.15);
  border-radius: 4px;
  overflow: hidden;
}

.toggle-btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--ink);
  color: white;
}

.toggle-btn:hover:not(.active) {
  background: rgba(26, 18, 16, 0.05);
}

/* ——— Agent View ——— */
.agent-view {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.agent-content pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

body.agent-mode {
  background: #ffffff;
}

body.agent-mode header {
  background: rgba(255, 255, 255, 0.9);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding: 12rem 2rem 8rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  pointer-events: none;
}

canvas.hero-bg {
  display: block;
}

.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--gold-dark);
  letter-spacing: 0.01em;
  margin-bottom: 3rem;
}

.hero-cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
  background: var(--ink);
  padding: 1rem 3rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s;
}

.hero-cta:hover {
  background: var(--burgundy);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(107, 29, 48, 0.3);
}

/* Hero canvas handled by JS */

/* ——— Verify ——— */
.verify {
  padding: 6rem 2rem;
  background: var(--burgundy-deep);
  color: white;
}

.verify-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.verify-icon {
  margin-bottom: 2rem;
}

.verify-icon svg {
  display: inline-block;
}

.check-draw {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.6s ease 1s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.verify-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 3px;
  padding: 0.35rem 1rem;
  margin-bottom: 2rem;
}

.verify h2 {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.verify p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}

/* ——— Products ——— */
.products {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 2rem;
}

.product.reverse {
  direction: rtl;
  margin-bottom: 0;
}

.product.reverse > * {
  direction: ltr;
}

.product-text h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}

.product-headline {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.product-body {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* Terminal blocks */
.product-code {
  background: var(--terminal-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-code:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.3);
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.terminal-dot:first-child { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.product-code pre {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 2;
  color: var(--terminal-fg);
  overflow-x: auto;
  padding: 1.5rem 2rem;
}

.product-code.terminal-visible pre {
  animation: terminalFadeIn 0.8s ease forwards;
}

@keyframes terminalFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.c-dim { color: #5a4f47; }
.c-gold { color: var(--gold); }
.c-burg { color: #d45d7a; }

/* Network divider */
.network-divider {
  text-align: center;
  padding: 1rem 0;
  opacity: 0.6;
}

/* ——— How it works ——— */
.how-it-works {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--cream) 0%, #f3ede5 100%);
  text-align: center;
}

.how-it-works h2 {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  margin-bottom: 4rem;
}

.steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  max-width: 250px;
  text-align: center;
}

.step-icon {
  margin-bottom: 1.5rem;
}

.step h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.step p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.step-arrow {
  padding-top: 1.5rem;
  flex-shrink: 0;
}

/* ——— Trust ——— */
.trust {
  padding: 7rem 2rem;
  background: var(--ink);
  color: white;
  text-align: center;
}

.trust h2 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 4rem;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.trust-icon {
  margin-bottom: 1rem;
}

.trust-item h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.trust-item p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* ——— Waitlist ——— */
.waitlist {
  padding: 7rem 2rem;
  text-align: center;
}

.waitlist h2 {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.waitlist-sub {
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
}

.waitlist form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

.waitlist input[type="email"],
.waitlist select,
.waitlist textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: white;
  border: 1.5px solid rgba(26, 18, 16, 0.15);
  border-radius: 5px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.waitlist input:focus,
.waitlist select:focus,
.waitlist textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 148, 58, 0.1);
}

.waitlist input::placeholder,
.waitlist textarea::placeholder {
  color: var(--ink-muted);
}

.waitlist select {
  cursor: pointer;
  color: var(--ink-muted);
}

.waitlist textarea {
  resize: vertical;
  min-height: 60px;
}

.waitlist button {
  padding: 1rem 2rem;
  background: var(--gold);
  color: white;
  border: none;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}

.waitlist button:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(166, 124, 46, 0.3);
}

/* ——— Footer ——— */
footer {
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(26, 18, 16, 0.08);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ——— Scroll animations ——— */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Mobile ——— */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .hero { padding: 8rem 1.5rem 5rem; }
  .hero h1 { font-size: 2.8rem; }
  .hero-bg { display: none; }

  .verify { padding: 4rem 1.5rem; }
  .verify h2 { font-size: 2rem; }

  .products { padding: 4rem 1.5rem; }
  .product {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .product.reverse { direction: ltr; }
  .product-headline { font-size: 2rem; }
  .product-code pre { font-size: 0.68rem; padding: 1rem 1.25rem; }

  .network-divider { display: none; }

  .how-it-works { padding: 4rem 1.5rem; }
  .how-it-works h2 { font-size: 2rem; }
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  .trust { padding: 4rem 1.5rem; }
  .trust h2 { font-size: 2rem; }
  .trust-items {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .waitlist { padding: 4rem 1.5rem; }
  .waitlist h2 { font-size: 2rem; }
}
