/* ═══════════════════════════════════════════════════════════
   TraceLayer v3 — Observatory Aesthetic
   Serif display · Amber/Teal accents · Dot-grid atmosphere
   ═══════════════════════════════════════════════════════════ */

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

:root {
  /* Backgrounds */
  --bg:          #08090D;
  --bg-subtle:   #0C0D12;
  --surface:     #111219;
  --surface-2:   #191A23;

  /* Borders */
  --border:      #1D1E28;
  --border-2:    #292A37;

  /* Text */
  --text:        #B0B4C0;
  --text-dim:    #6C7080;
  --text-bright: #ECEEF2;

  /* Accents */
  --amber:       #E4A53A;
  --amber-dim:   #8D6520;
  --teal:        #4FD1A5;
  --red:         #E5534B;

  /* Typography */
  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --body:    'Outfit', -apple-system, sans-serif;
  --mono:    'JetBrains Mono', 'SF Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Subtle dot-grid atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(236, 238, 242, 0.027) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────── */
.container        { max-width: 1100px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.container-wide   { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.container-narrow { max-width: 700px;  margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 15%, var(--amber) 50%, transparent 85%);
  opacity: 0.5;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.wordmark {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }
.wm-trace { color: var(--amber); }
.wm-dot { color: var(--text-dim); font-weight: 400; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(228, 165, 58, 0.25);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--amber-dim);
  color: var(--text-bright);
  transform: translateY(-1px);
}
.btn-ghost:active { transform: translateY(0); }
.btn-full { width: 100%; justify-content: center; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(228, 165, 58, 0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero-tag {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.hero-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--amber);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-bright);
  margin: 0 auto 28px;
  max-width: 820px;
}
.hero h1 em {
  color: var(--amber);
  font-style: italic;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 660px;
  line-height: 1.7;
  margin: 0 auto 40px;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-grid-inner {
  display: grid;
  width: 100%;
  height: 100%;
}
.hero-grid-inner > div {
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  transition: background-color 1.5s ease-out;
}
.hero-grid-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 25%, var(--bg) 72%);
  pointer-events: none;
}

/* ── Terminal ────────────────────────────────────── */
.terminal {
  background: #050508;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(228, 165, 58, 0.03);
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.term-dots { display: flex; gap: 5px; }
.term-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-2);
}
.term-path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.term-body {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.9;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.t-prompt  { color: var(--teal); user-select: none; }
.t-cmd     { color: var(--text-bright); }
.t-var     { color: var(--teal); }
.t-str     { color: #A5D6FF; }
.t-comment { color: var(--text-dim); }
.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--teal);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.2s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Section Commons ─────────────────────────────── */
section { padding: 80px 0; position: relative; z-index: 1; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section-tag::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--amber);
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 660px;
  line-height: 1.7;
  margin-bottom: 40px;
  font-weight: 300;
}

/* ── Story ───────────────────────────────────────── */
.story {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.story .section-tag { justify-content: center; }
.story h2 { text-align: center; }
.story-body { max-width: 740px; margin: 0 auto; }
.story-body p {
  font-size: 17px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 18px;
}
.story-list {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
}
.story-list li {
  font-size: 17px;
  color: var(--text);
  line-height: 1.8;
  padding: 4px 0 4px 24px;
  position: relative;
}
.story-list li::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  font-weight: 500;
}
.pullquote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-bright);
  border-left: 2px solid var(--amber);
  padding-left: 24px;
  margin: 32px 0 24px;
  line-height: 1.45;
}
.pullquote em {
  color: var(--amber);
  font-style: italic;
}

/* ── How ─────────────────────────────────────────── */
.how .terminal { max-width: 100%; }
.how-note {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-dim);
  border-left: 2px solid var(--border-2);
  padding-left: 16px;
  line-height: 1.7;
  font-weight: 300;
}

/* ── Bento Features ──────────────────────────────── */
.features {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.bento-card {
  background: var(--bg);
  padding: 36px;
  transition: background 0.2s ease;
}
.bento-card:hover { background: var(--bg-subtle); }
.bento-lg { grid-column: span 2; }
.bento-id {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  opacity: 0.7;
}
.bento-card h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.bento-card p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Voices (testimonials as log entries) ─────────── */
.log-feed {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.log-entry {
  background: var(--surface);
  padding: 28px 32px;
}
.log-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.log-source {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber);
  font-weight: 500;
}
.log-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.log-entry p {
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
}

/* ── Pricing ─────────────────────────────────────── */
.pricing .section-tag { justify-content: center; }
.pricing h2, .pricing .pricing-sub { text-align: center; }
.pricing-sub {
  font-size: 17px;
  color: var(--text-dim);
  margin: 0 auto 36px;
  font-weight: 300;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 0 auto 28px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 36px;
}
.plan-featured {
  border-color: var(--amber);
  box-shadow:
    0 0 0 1px rgba(228, 165, 58, 0.15),
    0 8px 32px rgba(228, 165, 58, 0.08);
}
.plan-header { margin-bottom: 24px; }
.plan-name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge {
  background: var(--amber);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.plan-price {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
}
.plan-period {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-dim);
}
.plan ul { list-style: none; margin-bottom: 28px; }
.plan li {
  font-size: 14px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
.plan li.dim { color: var(--text-dim); }
.pricing-note {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 300;
  text-align: center;
}

/* ── Waitlist ────────────────────────────────────── */
.waitlist {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.waitlist h2 { margin-bottom: 12px; }
.waitlist p {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 28px;
  font-weight: 300;
}
.waitlist-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.waitlist-form input[type="email"]:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(228, 165, 58, 0.1);
}
.waitlist-form input[type="email"]::placeholder {
  color: var(--text-dim);
}
.waitlist-alt {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); }
.footer p {
  font-size: 12px;
  color: var(--text-dim);
  width: 100%;
  font-family: var(--mono);
  margin-top: 4px;
  font-weight: 300;
}

/* ── Reveal Animations ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.stagger > .reveal:nth-child(1) { transition-delay: 0.00s; }
.stagger > .reveal:nth-child(2) { transition-delay: 0.06s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.06s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.12s; }
.stagger > .reveal:nth-child(5) { transition-delay: 0.18s; }
.stagger > .reveal:nth-child(6) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-tag::before { animation: none; }
  .cursor { animation: none; opacity: 1; }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-lg { grid-column: span 2; }
}

@media (max-width: 600px) {
  .hero { padding: 64px 0 56px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .nav-links a:not(:last-child) { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento-lg { grid-column: span 1; }
  .log-entry { padding: 20px; }
  .waitlist-form { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pullquote { font-size: 1.1rem; padding-left: 18px; }
}
