/* ============================================================
   S-Protocol Landing Page — style.css
   ============================================================ */

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

:root {
  --red:       #e02020;
  --red-dim:   #b01818;
  --red-glow:  rgba(224, 32, 32, 0.18);
  --blue:      #3b82f6;
  --blue-dim:  #2563eb;
  --blue-glow: rgba(59, 130, 246, 0.15);
  --bg:        #080a0c;
  --bg2:       #0d1014;
  --bg3:       #111519;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.04);
  --text:      #e8eaf0;
  --text-muted:#8a9ab0;
  --text-dim:  #5a6a7a;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --radius:    10px;
  --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s, opacity 0.18s;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dim); border-color: var(--blue-dim); }

.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}
.btn-red:hover { background: var(--red-dim); border-color: var(--red-dim); box-shadow: 0 0 30px rgba(224,32,32,0.3); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.25); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); }

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

/* ============================================================
   Header
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 10, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border2);
  transition: background 0.2s;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 62px;
  gap: 0;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 700;
}
.logo-s {
  color: var(--red);
  font-size: 22px;
  letter-spacing: -0.5px;
}
.logo-protocol {
  color: var(--blue);
  font-size: 18px;
  letter-spacing: -0.3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 40px;
}
.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.header-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 16px 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  font-size: 15px;
  color: var(--text-muted);
  padding: 12px 8px;
  border-bottom: 1px solid var(--border2);
}
.mobile-nav-link:hover { color: var(--text); }
.mobile-cta { margin-top: 16px; width: 100%; justify-content: center; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border2) 1px, transparent 1px),
    linear-gradient(90deg, var(--border2) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(224,32,32,0.07) 0%, transparent 65%),
              radial-gradient(ellipse at 60% 50%, rgba(59,130,246,0.06) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 24px 100px;
}

/* Hero wordmark — large animated S + protocol */
.hero-wordmark {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 40px;
  line-height: 1;
}

.hero-s {
  font-family: var(--font-head);
  font-size: clamp(96px, 14vw, 160px);
  font-weight: 700;
  color: var(--red);
  letter-spacing: -4px;
  display: inline-block;
  text-shadow: 0 0 40px rgba(224,32,32,0.35), 0 0 80px rgba(224,32,32,0.15);
  animation: s-loop 6s ease-in-out infinite;
  transform-origin: center center;
}

.hero-protocol {
  font-family: var(--font-head);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -1.5px;
  text-shadow: 0 0 30px rgba(59,130,246,0.25);
  align-self: flex-end;
  margin-bottom: 12px;
}

/* The signature looping twist on the S */
@keyframes s-loop {
  0%   { transform: rotateY(0deg)   scaleX(1)    skewX(0deg);  text-shadow: 0 0 40px rgba(224,32,32,0.35), 0 0 80px rgba(224,32,32,0.15); }
  15%  { transform: rotateY(12deg)  scaleX(0.96) skewX(2deg);  text-shadow: 0 0 55px rgba(224,32,32,0.45), 0 0 100px rgba(224,32,32,0.20); }
  30%  { transform: rotateY(0deg)   scaleX(1)    skewX(0deg);  }
  45%  { transform: rotateY(-10deg) scaleX(0.97) skewX(-1.5deg); text-shadow: 0 0 50px rgba(224,32,32,0.40); }
  60%  { transform: rotateY(0deg)   scaleX(1)    skewX(0deg);  }
  72%  { transform: rotateY(8deg)   scaleX(0.98) skewX(1deg);  }
  85%  { transform: rotateY(0deg)   scaleX(1)    skewX(0deg);  text-shadow: 0 0 40px rgba(224,32,32,0.35), 0 0 80px rgba(224,32,32,0.15); }
  100% { transform: rotateY(0deg)   scaleX(1)    skewX(0deg);  }
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  color: #fff;
  max-width: 800px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.hero-price-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  background: rgba(224,32,32,0.1);
  border: 1px solid rgba(224,32,32,0.25);
  border-radius: 100px;
  padding: 6px 20px;
  margin-bottom: 32px;
}
.price-amount {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.5px;
}
.price-period {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-micro {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}

/* ============================================================
   Section Typography
   ============================================================ */
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 18px;
}

.section-intro {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 56px;
}

/* ============================================================
   Why Section
   ============================================================ */
.why-section { background: var(--bg); border-top: 1px solid var(--border2); }

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

.why-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.why-card:hover {
  border-color: rgba(59,130,246,0.25);
  box-shadow: 0 0 24px rgba(59,130,246,0.06);
}

.why-icon {
  font-size: 18px;
  color: var(--blue);
  margin-bottom: 14px;
  opacity: 0.75;
}

.why-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.why-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Features
   ============================================================ */
.features-section { background: var(--bg2); border-top: 1px solid var(--border2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(224,32,32,0.22);
  box-shadow: 0 0 20px rgba(224,32,32,0.06);
  transform: translateY(-2px);
}

.feature-icon-wrap {
  color: var(--red);
  margin-bottom: 14px;
  opacity: 0.85;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Pricing
   ============================================================ */
.pricing-section { background: var(--bg); border-top: 1px solid var(--border2); }

.pricing-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 48px;
  max-width: 820px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--blue));
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
  margin-bottom: 12px;
}
.price-dollar {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
}
.price-num {
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -3px;
  text-shadow: 0 0 30px rgba(224,32,32,0.25);
}
.price-mo {
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pricing-tagline {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.pricing-includes {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
}
.pricing-includes li {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.check {
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.pricing-note {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 480px;
}

/* ============================================================
   Origin
   ============================================================ */
.origin-section { background: var(--bg3); border-top: 1px solid var(--border2); }

.origin-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: start;
  max-width: 900px;
}

.origin-text p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.origin-text p:last-child { margin-bottom: 0; }

.origin-callout {
  flex-shrink: 0;
  max-width: 280px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 24px 20px;
  align-self: flex-start;
  margin-top: 8px;
}
.origin-callout blockquote {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 12px;
  font-style: italic;
}
.origin-callout cite {
  font-size: 12px;
  color: var(--text-dim);
  font-style: normal;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================================
   Integrations
   ============================================================ */
.integrations-section { background: var(--bg2); border-top: 1px solid var(--border2); }

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
}

.integration-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.integration-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 14px;
}
.integration-badge.active    { background: rgba(59,130,246,0.12); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
.integration-badge.custom    { background: rgba(224,32,32,0.1);   color: var(--red);  border: 1px solid rgba(224,32,32,0.22); }
.integration-badge.unavailable { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border2); }

.integration-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.integration-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.integration-card p:last-child { margin-bottom: 0; }

/* ============================================================
   AI Section
   ============================================================ */
.ai-section { background: var(--bg); border-top: 1px solid var(--border2); }

.ai-content {
  max-width: 700px;
}
.ai-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.ai-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.ai-tool-badge {
  font-size: 13px;
  font-weight: 500;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--text-muted);
}
.ai-tool-divider {
  color: var(--text-dim);
  font-size: 18px;
}
.ai-tool-real {
  border-color: rgba(59,130,246,0.2);
  color: var(--blue);
  background: rgba(59,130,246,0.06);
}

/* ============================================================
   Final CTA
   ============================================================ */
.cta-section {
  background: var(--bg3);
  border-top: 1px solid var(--border2);
  padding: 120px 0;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta-wordmark {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 32px;
}
.hero-s-sm {
  font-family: var(--font-head);
  font-size: 56px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -1.5px;
  display: inline-block;
  text-shadow: 0 0 30px rgba(224,32,32,0.35);
  animation: s-loop 6s ease-in-out infinite;
}
.hero-protocol-sm {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.8px;
  align-self: flex-end;
  margin-bottom: 6px;
}

.cta-headline {
  font-family: var(--font-head);
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: #fff;
  max-width: 680px;
  margin-bottom: 18px;
}

.cta-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 36px;
}

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

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border2);
  padding: 36px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--font-head);
  font-weight: 700;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-muted); }
.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .mobile-menu-btn { display: flex; }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .integrations-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .pricing-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 28px;
  }

  .origin-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .origin-callout { max-width: 100%; }
}

@media (max-width: 600px) {
  .section { padding: 72px 0; }

  .hero-inner { padding: 60px 24px 80px; }

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-wordmark { gap: 4px; }
  .hero-s { letter-spacing: -2px; }
}

/* ============================================================
   Scrollbar (webkit)
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e2530; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2a3545; }
