/* ============================================================
   Security Saga — palette drawn from cloudsecuritypartners.com
   deep purple #25032c / #551163 · gradient #d11e59 → #903084
   accents #ab17c9 / #c32ce0 · neutral #9096a4 · Readex Pro
   ============================================================ */

:root {
  --bg-deep: #16021b;
  --bg: #25032c;
  --bg-raise: #3a1841;
  --brand: #551163;
  --red: #d11e59;
  --purple: #903084;
  --violet: #ab17c9;
  --violet-bright: #c32ce0;
  --text: #ffffff;
  --text-dim: #c9bfd1;
  --muted: #9096a4;
  --line: rgba(255, 255, 255, 0.11);
  --glass: rgba(255, 255, 255, 0.05);
  --grad: linear-gradient(84deg, var(--red), var(--purple));
  --grad-rev: linear-gradient(84deg, var(--purple), var(--red));
  --radius: 18px;
  --font: "Readex Pro", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: var(--red); color: #fff; }

/* ---------- backdrop layers ---------- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 36% at 18% 22%, rgba(209, 30, 89, 0.16), transparent 70%),
    radial-gradient(46% 40% at 82% 12%, rgba(144, 48, 132, 0.2), transparent 70%),
    radial-gradient(50% 44% at 55% 88%, rgba(85, 17, 99, 0.3), transparent 70%);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 100;
  box-shadow: 0 0 12px rgba(209, 30, 89, 0.8);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
}

.nav.scrolled {
  background: rgba(22, 2, 27, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark { display: inline-flex; filter: drop-shadow(0 0 8px rgba(209, 30, 89, 0.5)); }

.nav-links { display: flex; gap: clamp(0.8rem, 2.5vw, 2rem); }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
  font-size: 1rem;
}
.btn-sm { padding: 0.5rem 1.15rem; font-size: 0.88rem; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.02rem; }

.btn-gradient {
  background: var(--grad);
  color: #fff;
  padding: 0.7rem 1.6rem;
  box-shadow: 0 4px 24px rgba(209, 30, 89, 0.35);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 34px rgba(209, 30, 89, 0.55);
}
.btn-gradient:active { transform: translateY(0); }

.btn-ghost {
  background: var(--glass);
  color: #fff;
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: var(--violet-bright);
  box-shadow: 0 0 24px rgba(195, 44, 224, 0.25);
  transform: translateY(-2px);
}

/* ---------- typography helpers ---------- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet-bright);
  border: 1px solid rgba(195, 44, 224, 0.35);
  background: rgba(171, 23, 201, 0.1);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h3 { font-size: 1.25rem; font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7.5rem clamp(1.2rem, 5vw, 3rem) 4rem;
  position: relative;
}

.hero-sub {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 46rem;
}

.type-wrap {
  color: #fff;
  font-weight: 500;
  border-bottom: 2px solid var(--red);
  padding-bottom: 1px;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--violet-bright);
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.6rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-meta strong {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-right: 0.1rem;
}
.meta-divider { width: 1px; height: 2rem; background: var(--line); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: center;
}
.scroll-hint span {
  width: 3px; height: 8px;
  background: var(--violet-bright);
  border-radius: 2px;
  margin-top: 7px;
  animation: scroll-nudge 1.8s ease-in-out infinite;
}
@keyframes scroll-nudge {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0; }
}

/* ---------- sections ---------- */
.section {
  padding: clamp(5rem, 10vw, 8.5rem) clamp(1.2rem, 5vw, 3rem);
  max-width: 76rem;
  margin: 0 auto;
}

.section-head { text-align: center; max-width: 48rem; margin: 0 auto 3.5rem; }
.section-sub { margin-top: 1.2rem; color: var(--text-dim); font-weight: 300; font-size: 1.05rem; }

/* ---------- story cards ---------- */
.story-grid, .chapter-grid {
  display: grid;
  gap: 1.4rem;
}
.story-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.chapter-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.story-card, .chapter-card {
  position: relative;
  background: linear-gradient(rgba(37, 3, 44, 0.75), rgba(58, 24, 65, 0.68));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  backdrop-filter: blur(8px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.story-card::before, .chapter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(209, 30, 89, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.story-card:hover::before, .chapter-card:hover::before { opacity: 1; }
.story-card:hover, .chapter-card:hover {
  border-color: rgba(195, 44, 224, 0.55);
  box-shadow: 0 14px 44px rgba(22, 2, 27, 0.7), 0 0 30px rgba(144, 48, 132, 0.18);
}

.story-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--violet-bright);
  letter-spacing: 0.2em;
  margin-bottom: 0.9rem;
}
.story-card h3 { margin-bottom: 0.6rem; }
.story-card p, .chapter-card p { color: var(--text-dim); font-weight: 300; font-size: 0.96rem; }

/* ---------- chapter cards ---------- */
.chapter-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 18px rgba(209, 30, 89, 0.4);
}
.chapter-icon svg { width: 23px; height: 23px; color: #fff; }

.chapter-card h3 { margin-bottom: 0.5rem; }
.chapter-card ul {
  margin-top: 1rem;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.chapter-card li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
}
.chapter-card li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 0.7rem;
  top: 0.22em;
}

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 3.4rem;
  display: grid;
  gap: 3rem;
}
.timeline-line {
  position: absolute;
  left: 1.05rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.timeline-fill {
  width: 100%;
  height: 0%;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(209, 30, 89, 0.8);
}

.step { position: relative; }
.step-dot {
  position: absolute;
  left: -3.4rem;
  top: 0;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: var(--bg-raise);
  border: 1.5px solid rgba(195, 44, 224, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--violet-bright);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.step.visible .step-dot {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(209, 30, 89, 0.6);
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--text-dim); font-weight: 300; }

/* ---------- demo ---------- */
.demo-shell { max-width: 54rem; margin: 0 auto; }

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.demo-tab {
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--text-dim);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  transition: all 0.25s;
}
.demo-tab:hover { color: #fff; border-color: rgba(195, 44, 224, 0.5); }
.demo-tab.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(209, 30, 89, 0.4);
}

.demo-window {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 1, 19, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(144, 48, 132, 0.12);
}
.demo-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(37, 3, 44, 0.6);
}
.demo-chrome span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.demo-chrome span:nth-child(1) { background: #d11e59; }
.demo-chrome span:nth-child(2) { background: #ab17c9; }
.demo-chrome span:nth-child(3) { background: #903084; }
.demo-chrome em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.demo-body {
  padding: 1.4rem 1.5rem;
  min-height: 21rem;
}
#demoText {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--text-dim);
}
#demoText .hl-crit { color: #ff5c8a; font-weight: 500; }
#demoText .hl-ok { color: #6ee7a0; }
#demoText .hl-head { color: var(--violet-bright); font-weight: 500; }
#demoText .hl-dim { color: var(--muted); }

/* ---------- slack section ---------- */
.slack-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  align-items: center;
  max-width: 70rem;
  margin: 0 auto;
}

.slack-features { display: grid; gap: 1.6rem; }

.slack-feature {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.slack-feature-icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(209, 30, 89, 0.4);
}
.slack-feature-icon svg { width: 22px; height: 22px; color: #fff; }
.slack-feature h3 { margin-bottom: 0.35rem; font-size: 1.1rem; }
.slack-feature p { color: var(--text-dim); font-weight: 300; font-size: 0.94rem; }
.slack-feature code {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--violet-bright);
  background: rgba(171, 23, 201, 0.14);
  border: 1px solid rgba(195, 44, 224, 0.3);
  border-radius: 6px;
  padding: 0.08em 0.4em;
}

.slack-window {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 1, 19, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(144, 48, 132, 0.12);
  display: flex;
  flex-direction: column;
}
.slack-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(37, 3, 44, 0.6);
  font-weight: 600;
  font-size: 0.95rem;
}
.slack-hash { color: var(--violet-bright); font-weight: 700; }
.slack-chrome em {
  margin-left: auto;
  font-style: normal;
  font-weight: 300;
  font-size: 0.72rem;
  color: var(--muted);
}

.slack-messages {
  padding: 1.1rem 1.2rem;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.slack-msg {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.slack-msg.shown { opacity: 1; transform: none; }

.slack-avatar {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.slack-avatar.human { background: #3a1841; border: 1px solid var(--line); }
.slack-avatar.saga { background: var(--grad); box-shadow: 0 0 14px rgba(209, 30, 89, 0.45); }

.slack-msg-body { font-size: 0.86rem; line-height: 1.55; min-width: 0; }
.slack-msg-name { font-weight: 600; font-size: 0.84rem; }
.slack-msg-name .slack-app-tag {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 0.3em;
  margin-left: 0.4em;
  vertical-align: 0.1em;
}
.slack-msg-name time { font-weight: 300; font-size: 0.7rem; color: var(--muted); margin-left: 0.5em; }
.slack-msg-text { color: var(--text-dim); font-weight: 300; }
.slack-msg-text code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--violet-bright);
  background: rgba(171, 23, 201, 0.14);
  border-radius: 5px;
  padding: 0.06em 0.35em;
}
.slack-msg-text .sev-crit { color: #ff5c8a; font-weight: 500; }
.slack-msg-text .sev-ok { color: #6ee7a0; }

.slack-attachment {
  margin-top: 0.5rem;
  border-left: 3px solid;
  border-image: var(--grad) 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 10px 10px 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 300;
}

.slack-typing {
  display: inline-flex;
  gap: 4px;
  padding: 0.3rem 0;
}
.slack-typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.1s ease-in-out infinite;
}
.slack-typing i:nth-child(2) { animation-delay: 0.15s; }
.slack-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.slack-inputbar {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
}
.slack-replay {
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}
.slack-replay:hover { color: #fff; border-color: rgba(195, 44, 224, 0.5); }

@media (max-width: 900px) {
  .slack-layout { grid-template-columns: 1fr; }
  .slack-messages { min-height: 20rem; }
}

/* ---------- CTA ---------- */
.cta-card {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: calc(var(--radius) * 1.6);
  background:
    radial-gradient(90% 140% at 50% 0%, rgba(144, 48, 132, 0.35), transparent 60%),
    linear-gradient(rgba(37, 3, 44, 0.9), rgba(22, 2, 27, 0.92));
  border: 1px solid rgba(195, 44, 224, 0.3);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.cta-card p { margin-top: 1.2rem; color: var(--text-dim); font-weight: 300; max-width: 34rem; margin-inline: auto; }

.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 2.2rem;
}
.cta-form input {
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  min-width: min(20rem, 70vw);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cta-form input::placeholder { color: var(--muted); }
.cta-form input:focus {
  border-color: var(--violet-bright);
  box-shadow: 0 0 0 4px rgba(195, 44, 224, 0.18);
}
.cta-note { font-size: 0.82rem !important; color: var(--muted) !important; margin-top: 1.4rem !important; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem clamp(1.2rem, 5vw, 3rem) 3.5rem;
  background: rgba(15, 1, 19, 0.6);
}
.footer-inner { max-width: 76rem; margin: 0 auto; text-align: center; }
.brand-footer { justify-content: center; font-size: 1.2rem; margin-bottom: 0.8rem; }
.footer p { color: var(--muted); font-size: 0.92rem; font-weight: 300; }
.footer-fine { margin-top: 1.4rem; font-size: 0.8rem !important; opacity: 0.7; }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hide-mobile { display: none; }
  .meta-divider { display: none; }
  .hero-meta { gap: 1.8rem; }
  .timeline { padding-left: 3rem; }
  .demo-body { min-height: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora, .scroll-hint span, .caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
