/* ============================================
   Tremor Marketing Website — styles.css
   Colors, typography, and layout from branding spec.
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --seismic-red: #ef4444;
  --seismic-red-hover: #dc2626;
  --tremor-amber: #f59e0b;
  --grid-teal: #14b8a6;
  --deep-obsidian: #0a0a0f;
  --surface: #111118;
  --surface-hover: #1a1a24;
  --slate-muted: #64748b;
  --border: #1e1e2e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --font-body: 'Outfit', 'Avenir Next', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Mono', monospace;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Offset for fixed nav on anchor scroll */
#features, #how-it-works, #download {
  scroll-margin-top: 72px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--deep-obsidian);
  letter-spacing: -0.02em;
  overflow-x: hidden;
}

a {
  color: var(--seismic-red);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--seismic-red-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--tremor-amber);
}

img, svg {
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-primary {
  background: var(--seismic-red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--seismic-red-hover);
  color: #fff;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--slate-muted);
}

/* --- Wordmark --- */
.wordmark {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wm-trem {
  color: var(--text-primary);
}
.wm-or {
  color: var(--seismic-red);
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo .wordmark {
  font-size: 20px;
}
.nav-pulse {
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
}
.nav-links .btn {
  color: #fff;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-pulse {
  margin: 0 auto 32px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-title {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.hero-tagline {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}
.hero-wave svg {
  width: 100%;
  height: 80px;
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
  line-height: 1.7;
}

/* --- Features --- */
.features {
  background: var(--surface);
  padding: 100px 24px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--deep-obsidian);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--slate-muted);
  transform: translateY(-2px);
}
.feature-icon {
  margin-bottom: 16px;
}
.feature-icon svg {
  display: inline-block;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 15px;
  line-height: 1.7;
}

/* --- How It Works --- */
.how-it-works {
  padding: 100px 24px;
  background: var(--deep-obsidian);
}
.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0; /* explicit for clarity */
}
.step {
  display: flex;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child {
  border-bottom: none;
}
.step-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--seismic-red);
  padding-top: 4px;
  flex-shrink: 0;
  width: 32px;
}
.step-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.step-content p {
  font-size: 15px;
  line-height: 1.7;
}

/* --- Comparison --- */
.comparison {
  padding: 100px 24px;
  background: var(--surface);
}
.comparison-table-wrapper {
  overflow-x: auto;
}
.comparison-table {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 15px;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.comparison-table td:first-child,
.comparison-table th:first-child {
  text-align: left;
  color: var(--text-primary);
  font-weight: 600;
}
.comparison-table .highlight {
  background: rgba(239, 68, 68, 0.06);
}
.comparison-table th.highlight {
  color: var(--seismic-red);
}
.check {
  color: var(--grid-teal);
  font-size: 18px;
  font-weight: 700;
}
.cross {
  color: var(--slate-muted);
  font-size: 18px;
}

/* --- Download --- */
.download {
  padding: 100px 24px;
  background: var(--deep-obsidian);
}
.download-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: border-color 0.3s, transform 0.2s;
}
.download-card:hover {
  border-color: var(--slate-muted);
  transform: translateY(-2px);
}
.download-card.detected {
  border-color: var(--seismic-red);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.1);
}
.download-card svg {
  display: inline-block;
  opacity: 0.9;
}
.download-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.download-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.btn-download {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}
.dl-alt {
  font-size: 13px;
  color: var(--slate-muted);
}
.dl-alt a {
  color: var(--text-secondary);
}
.dl-alt a:hover {
  color: var(--text-primary);
}
.download-note {
  text-align: center;
  font-size: 14px;
  color: var(--slate-muted);
}

/* --- CTA --- */
.cta {
  padding: 80px 24px;
  background: var(--surface);
}
.cta-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.cta-pulse {
  margin: 0 auto 24px;
  animation: float 3s ease-in-out infinite;
}
.cta-pulse svg {
  display: inline-block;
}
.cta-inner h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.cta-inner p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  padding: 64px 24px 32px;
  background: var(--deep-obsidian);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.footer-logo svg {
  display: inline-block;
}
.footer-logo .wordmark {
  font-size: 18px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--slate-muted);
  max-width: 280px;
  line-height: 1.6;
}
.footer-links-group h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-links-group a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-links-group a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--slate-muted);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .download-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }
  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }
  .hero-pulse svg {
    width: 120px;
    height: 120px;
  }
  .features {
    padding: 64px 20px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .how-it-works {
    padding: 64px 20px;
  }
  .comparison {
    padding: 64px 20px;
  }
  .comparison-table {
    font-size: 13px;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
  }
  .download {
    padding: 64px 20px;
  }
  .download-cards {
    grid-template-columns: 1fr;
  }
  .cta {
    padding: 48px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step {
    gap: 16px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Animations --- */
@keyframes antenna-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}
#antenna-dot {
  transform-origin: center;
  animation: antenna-pulse 1.5s ease-in-out infinite;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
