/*
  Terminal22 — Landing page stylesheet
  Dark theme, terminal-native feel
*/

/* ── Tokens ───────────────────────────────────────────────────────────────── */

:root {
  --bg:         #0a0a0f;
  --bg-card:    #111118;
  --bg-card-hover: #16161f;
  --bg-surface: #0e0e14;
  --blue:       #4a9eff;
  --blue-dim:   #3478cc;
  --blue-glow:  rgba(74, 158, 255, 0.15);
  --green:      #34d399;
  --green-dim:  rgba(52, 211, 153, 0.15);
  --red:        #f87171;
  --yellow:     #fbbf24;
  --text:       #e4e4eb;
  --text-mid:   #9b9bb0;
  --text-dim:   #5a5a72;
  --border:     #1e1e2a;
  --border-light: #2a2a3a;
  --font:       -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono:       'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  --radius:     10px;
  --max-w:      1080px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

/* subtle grid noise */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.015) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--blue); text-decoration: none; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav-scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.nav-logo-accent { color: var(--blue); }

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

.nav-link {
  font-size: 14px;
  color: var(--text-mid);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

.nav-btn {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
  padding: 8px 20px;
  border-radius: 8px;
  transition: opacity 0.15s;
}
.nav-btn:hover { opacity: 0.85; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  padding: 160px 24px 80px;
  overflow: hidden;
}

/* glow blob */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(74, 158, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.hero-badge {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid rgba(74, 158, 255, 0.2);
  padding: 6px 16px;
  border-radius: 99px;
}

.hero-h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #fff;
}

.hero-h1-accent {
  background: linear-gradient(135deg, var(--blue) 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 580px;
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── CTAs ─────────────────────────────────────────────────────────────────── */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  text-decoration: none;
}

.cta-primary {
  background: var(--blue);
  color: #fff;
}
.cta-primary:hover { opacity: 0.88; }
.cta-primary:active { transform: translateY(1px); }

.cta-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-light);
}
.cta-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.cta-full { width: 100%; justify-content: center; }

.cta-lg { font-size: 16px; padding: 14px 36px; }

/* ── Terminal Mockup ──────────────────────────────────────────────────────── */

.terminal-mock {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin-top: 32px;
  border-radius: 12px;
  overflow: visible;
  border: 1px solid var(--border-light);
  background: #0d0d14;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #141420;
  border-bottom: 1px solid var(--border);
}

.td {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.td.red    { background: #ff5f57; }
.td.yellow { background: #ffbd2e; }
.td.green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

.term-line { white-space: nowrap; overflow: hidden; }
.term-prompt { color: var(--green); }
.term-cmd { color: #fff; }
.term-dim { color: var(--text-dim); }
.term-highlight { color: var(--yellow); font-weight: 600; }
.term-success { color: var(--green); }
.term-typing { color: var(--text); }

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--blue);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.term-fade-1 { animation: fadeIn 0.5s 0.8s both; }
.term-fade-2 { animation: fadeIn 0.5s 1.6s both; }
.term-fade-3 { animation: fadeIn 0.5s 2.4s both; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Phone float */
.phone-float {
  position: absolute;
  bottom: -20px;
  right: -40px;
  width: 180px;
  background: #111118;
  border-radius: 20px;
  border: 2px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  transform: rotate(2deg);
}

.phone-notch {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  margin: 8px auto 0;
}

.phone-screen { padding: 10px 12px 12px; }

.phone-status {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.phone-session {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--green);
  margin-bottom: 8px;
}

.phone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.phone-terminal {
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  font-family: var(--mono);
}

.phone-terminal .term-line { font-size: 10px; }
.phone-term-line { font-size: 10px; }

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}

.phone-mic { color: var(--blue); display: flex; }

.phone-input-text {
  font-size: 10px;
  color: var(--text-dim);
}

/* ── Section Shared ───────────────────────────────────────────────────────── */

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

.section-h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 16px;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.7;
}

/* ── How It Works ─────────────────────────────────────────────────────────── */

.how {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  flex: 1;
  max-width: 240px;
}

.step-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-glow);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(74, 158, 255, 0.25);
}

.step-icon {
  color: var(--text-mid);
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.step-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

.step-arrow {
  color: var(--text-dim);
  margin-top: 56px;
  flex-shrink: 0;
}

/* ── Features ─────────────────────────────────────────────────────────────── */

.features {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.feature-icon {
  color: var(--blue);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-glow);
  border-radius: 10px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── Security ─────────────────────────────────────────────────────────────── */

.security {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
  flex-wrap: wrap;
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px;
  min-width: 160px;
}

.arch-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid rgba(74, 158, 255, 0.2);
}

.arch-icon-blind {
  color: var(--red);
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

.arch-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

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

.arch-pipe {
  display: flex;
  align-items: center;
  gap: 0;
}

.arch-pipe-line {
  width: 32px;
  height: 2px;
  background: var(--border-light);
}

.arch-pipe-data {
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.arch-cipher {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── Pricing ──────────────────────────────────────────────────────────────── */

.pricing {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.pricing-card-pro {
  border-color: var(--blue-dim);
  box-shadow: 0 0 40px rgba(74, 158, 255, 0.08);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

.pricing-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pricing-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.pricing-price {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.pricing-period {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-mid);
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-item {
  font-size: 14px;
  color: var(--text-mid);
  padding-left: 24px;
  position: relative;
}

.pricing-item::before {
  position: absolute;
  left: 0;
  font-size: 14px;
}

.pricing-yes::before {
  content: '\2713';
  color: var(--green);
}

.pricing-no::before {
  content: '\2717';
  color: var(--text-dim);
}
.pricing-no { color: var(--text-dim); }

/* ── Download ─────────────────────────────────────────────────────────────── */

.download {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  text-align: center;
}

.download-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
}

.footer-sep {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Reveal Animations ────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.revealed {
  opacity: 1;
  transform: none;
}

/* stagger within groups */
.step:nth-child(1).reveal   { transition-delay: 0s; }
.step:nth-child(3).reveal   { transition-delay: 0.1s; }
.step:nth-child(5).reveal   { transition-delay: 0.2s; }

.feature-card:nth-child(1).reveal { transition-delay: 0s; }
.feature-card:nth-child(2).reveal { transition-delay: 0.05s; }
.feature-card:nth-child(3).reveal { transition-delay: 0.1s; }
.feature-card:nth-child(4).reveal { transition-delay: 0.15s; }
.feature-card:nth-child(5).reveal { transition-delay: 0.2s; }
.feature-card:nth-child(6).reveal { transition-delay: 0.25s; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

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

  .hero { padding: 120px 20px 60px; }

  .steps {
    flex-direction: column;
    align-items: center;
  }
  .step { max-width: 320px; }
  .step-arrow { transform: rotate(90deg); margin: 0; }

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

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

  .arch-diagram {
    flex-direction: column;
  }
  .arch-pipe {
    flex-direction: column;
  }
  .arch-pipe-line {
    width: 2px;
    height: 24px;
  }

  .phone-float {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 20px auto 0;
    transform: none;
  }

  .terminal-mock {
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .hero-h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .section-h2 { font-size: 24px; }
  .cta { font-size: 14px; padding: 10px 20px; }
}
