/* GuardRail marketing site v2 */
:root {
  --bg: #060912;
  --bg2: #0a1120;
  --card: #111a2c;
  --card2: #152038;
  --line: rgba(120, 170, 255, 0.14);
  --line2: rgba(120, 170, 255, 0.28);
  --text: #eef3ff;
  --muted: #97a4bd;
  --blue: #5b9dff;
  --blue-d: #3b78e0;
  --teal: #3ddc97;
  --purple: #9b8cff;
  --danger: #ff6b7a;
  --warn: #ffc857;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --max: 1140px;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: #9cc4ff; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); }
.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

/* Progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  z-index: 100; box-shadow: 0 0 12px rgba(91,157,255,.6);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(6, 9, 18, 0.72);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand img.wordmark { height: 44px; width: auto; }
.brand img.icon { width: 38px; height: 38px; border-radius: 11px; }
.nav-links {
  display: flex; align-items: center; gap: 1.15rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--muted); font-size: .93rem; font-weight: 600;
  position: relative; padding: .25rem 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.nav-cta { display: flex; gap: .55rem; align-items: center; }
.menu-btn {
  display: none; background: transparent; border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: .45rem .7rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: 12px; padding: .82rem 1.2rem; font-weight: 700; font-size: .94rem;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease;
  text-decoration: none !important; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-d));
  color: #fff !important;
  box-shadow: 0 12px 32px rgba(91,157,255,.32);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,.03);
  border-color: var(--line); color: var(--text) !important;
}
.btn-ghost:hover { border-color: var(--line2); background: rgba(91,157,255,.08); }
.btn-teal {
  background: linear-gradient(135deg, #2fbf86, var(--teal));
  color: #042016 !important; font-weight: 800;
}
.btn-lg { padding: 1rem 1.4rem; font-size: 1rem; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Hero */
.hero { position: relative; padding: 4.2rem 0 3.2rem; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 15%, rgba(91,157,255,.22), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 85%, rgba(61,220,151,.12), transparent 50%),
    linear-gradient(180deg, rgba(6,9,18,.4), rgba(6,9,18,.93)),
    url("../assets/web/hero-bg.jpg") center/cover no-repeat;
  animation: heroPulse 12s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  from { filter: saturate(1) brightness(1); }
  to { filter: saturate(1.15) brightness(1.05); }
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 2.4rem; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(17,26,44,.78);
  color: #b7d4ff; font-size: .8rem; font-weight: 700; margin-bottom: 1rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 12px var(--teal); animation: blink 1.8s infinite;
}
@keyframes blink { 50% { opacity: .45; } }
h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  line-height: 1.1; margin: 0 0 1rem; letter-spacing: -.035em;
}
h1 .grad {
  background: linear-gradient(100deg, #9cc4ff 10%, var(--teal) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 36rem; margin: 0 0 1.45rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.4rem; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: .7rem; max-width: 38rem;
}
.stat {
  background: rgba(17,26,44,.82); border: 1px solid var(--line);
  border-radius: 14px; padding: .9rem .7rem; text-align: center;
  transition: .2s ease;
}
.stat:hover { border-color: var(--line2); transform: translateY(-2px); }
.stat b { display: block; font-size: 1.25rem; }
.stat span { color: var(--muted); font-size: .76rem; }

.hero-visual { position: relative; }
.hero-visual .glow {
  position: absolute; inset: 8% 5%;
  background: radial-gradient(circle, rgba(91,157,255,.25), transparent 65%);
  filter: blur(20px); z-index: 0;
}
.product-shot {
  position: relative; z-index: 1;
  border-radius: 18px; border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  overflow: hidden; background: #0a1220;
}
.product-shot img { width: 100%; height: auto; }
.float-card {
  position: absolute; z-index: 2;
  background: rgba(14, 22, 38, .92);
  border: 1px solid var(--line2);
  border-radius: 14px; padding: .7rem .85rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  font-size: .8rem; font-weight: 700;
}
.float-card.a { left: -8px; bottom: 18%; color: #ffb4bc; }
.float-card.b { right: -6px; top: 14%; color: #9cf0c8; }
.float-card span { display: block; color: var(--muted); font-weight: 600; font-size: .72rem; margin-top: .15rem; }

/* Trust strip */
.trust {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(10,17,32,.85); padding: 1.1rem 0;
}
.trust-inner {
  display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; align-items: center;
}
.pill {
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--muted); border-radius: 999px; padding: .42rem .85rem;
  font-size: .82rem; font-weight: 700;
}

/* Sections */
section { padding: 4.6rem 0; }
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 2.6rem; }
.section-head h2 {
  margin: 0 0 .7rem; font-size: clamp(1.75rem, 3.1vw, 2.4rem); letter-spacing: -.025em;
}
.section-head p { margin: 0; color: var(--muted); }
.section-alt {
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(91,157,255,.08), transparent 60%),
    var(--bg2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.reveal { opacity: 0; transform: translateY(18px); transition: .6s ease; }
.reveal.show { opacity: 1; transform: none; }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .22s ease;
}
.feature:hover {
  transform: translateY(-4px); border-color: var(--line2);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
}
.feature img { width: 100%; height: 210px; object-fit: cover; background: #0a1020; }
.feature-body { padding: 1.25rem 1.35rem 1.5rem; }
.feature-body h3 { margin: 0 0 .45rem; font-size: 1.15rem; }
.feature-body p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Engines */
.engine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.engine {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem;
  transition: .2s ease;
}
.engine:hover { border-color: var(--line2); transform: translateY(-2px); }
.engine .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(91,157,255,.12); color: var(--blue); font-weight: 800;
  margin-bottom: .85rem; font-size: .82rem;
}
.engine h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.engine p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Tools chips */
.tools {
  display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-top: 1.8rem;
}
.tool-chip {
  font-family: var(--mono); font-size: .75rem; font-weight: 650;
  color: #c8d8ff; background: rgba(91,157,255,.08);
  border: 1px solid var(--line); border-radius: 10px; padding: .4rem .65rem;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.45rem 1.3rem;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #041018; font-weight: 800; margin-bottom: .85rem;
}
.step h3 { margin: 0 0 .4rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Comparison */
.table-wrap {
  overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td {
  text-align: left; padding: .95rem 1rem; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.compare th { color: var(--muted); font-weight: 700; background: rgba(0,0,0,.18); }
.compare td:first-child { color: var(--muted); }
.compare .yes { color: var(--teal); font-weight: 800; }
.compare .no { color: #6b7388; }
.compare tr:last-child td { border-bottom: 0; }

/* Demo */
.demo-wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.2rem; align-items: start; }
.demo-card, .score-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.demo-card .bar, .install-bar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem;
  background: rgba(0,0,0,.15);
}
.demo-card pre, .install pre {
  margin: 0; padding: 1.1rem 1.15rem 1.25rem; font-family: var(--mono);
  font-size: .8rem; line-height: 1.55; color: #c8d4f0; overflow: auto; max-height: 380px;
  white-space: pre-wrap;
}
.score-card { padding: 1.4rem; }
.score-ring {
  width: 148px; height: 148px; margin: .6rem auto 1rem; border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--card) 58%, transparent 59%),
    conic-gradient(var(--teal) 0 var(--p, 10%), rgba(255,255,255,.08) 0);
  display: grid; place-items: center; transition: background .4s ease;
}
.score-ring strong { font-size: 2.1rem; }
.score-meta { display: grid; gap: .55rem; }
.score-meta div {
  display: flex; justify-content: space-between; padding: .55rem .7rem;
  border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
  font-size: .9rem;
}
.v-ok { color: var(--teal); font-weight: 800; }
.v-bad { color: var(--danger); font-weight: 800; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.price {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.4rem 1.2rem; display: flex; flex-direction: column; position: relative;
  transition: .2s ease;
}
.price:hover { transform: translateY(-3px); border-color: var(--line2); }
.price.featured {
  border-color: rgba(91,157,255,.55);
  box-shadow: 0 0 0 1px rgba(91,157,255,.18), 0 22px 55px rgba(91,157,255,.14);
  background: linear-gradient(180deg, rgba(34,52,90,.95), var(--card));
}
.price .ribbon {
  position: absolute; top: 12px; right: 12px; font-size: .7rem; font-weight: 800;
  color: #041018; background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 999px; padding: .22rem .55rem;
}
.price .plan { color: var(--muted); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; }
.price .amount { font-size: 2.25rem; font-weight: 850; margin: .45rem 0 .1rem; letter-spacing: -.03em; }
.price .amount span { font-size: .95rem; color: var(--muted); font-weight: 650; }
.price .desc { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; min-height: 2.5rem; }
.price ul { list-style: none; margin: 0 0 1.2rem; padding: 0; flex: 1; }
.price li { position: relative; padding: .34rem 0 .34rem 1.25rem; font-size: .9rem; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 900; }
.price .btn { width: 100%; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1.5rem; align-items: start; }
.faq-visual {
  border-radius: 18px; border: 1px solid var(--line); overflow: hidden; background: var(--card);
  position: sticky; top: 96px;
}
.faq-visual img { width: 100%; height: auto; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 0; margin-bottom: .7rem; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 1.15rem; font-weight: 750;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.2rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] { border-color: var(--line2); }
.faq .ans { padding: 0 1.15rem 1.1rem; color: var(--muted); font-size: .94rem; }

/* Install */
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.install {
  margin-top: .8rem; background: #090e18; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.copy-btn {
  background: rgba(91,157,255,.12); border: 1px solid rgba(91,157,255,.3);
  color: var(--blue); border-radius: 8px; padding: .28rem .6rem; cursor: pointer;
  font-size: .75rem; font-weight: 800;
}

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.quote {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem;
}
.quote p { margin: 0 0 .9rem; color: var(--text); font-size: .95rem; }
.quote .who { color: var(--muted); font-size: .82rem; font-weight: 700; }

/* CTA */
.cta { padding: 4rem 0 5rem; }
.cta-box {
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 15% 25%, rgba(91,157,255,.22), transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 75%, rgba(61,220,151,.12), transparent 50%),
    linear-gradient(135deg, #10182a, #0b1220);
  padding: 2.7rem 2rem; text-align: center; box-shadow: var(--shadow);
}
.cta-box h2 { margin: 0 0 .7rem; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.cta-box p { margin: 0 auto 1.4rem; color: var(--muted); max-width: 34rem; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; background: #05080f; }
.footer-grid {
  display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem;
}
footer h4 { margin: 0 0 .75rem; font-size: .9rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: .35rem 0; }
footer a { color: var(--muted); font-size: .9rem; }
footer a:hover { color: var(--blue); }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 18rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 1.1rem; color: var(--muted); font-size: .85rem;
}

/* Toast */
.toast {
  position: fixed; bottom: 1.2rem; right: 1.2rem; background: #12301f;
  border: 1px solid rgba(61,220,151,.4); color: #b8f5d7; padding: .7rem 1rem;
  border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s ease;
  z-index: 100; font-weight: 700; font-size: .9rem;
}
.toast.show { opacity: 1; }

/* Responsive */
@media (max-width: 1020px) {
  .hero-grid, .demo-wrap, .features, .faq-grid, .install-grid { grid-template-columns: 1fr; }
  .engine-grid, .steps, .quotes { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .float-card { display: none; }
  .faq-visual { position: static; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .nav-links.open, .nav-cta.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; left: 1rem; right: 1rem; top: 74px;
    background: #0d1424; border: 1px solid var(--line); border-radius: 14px; padding: 1rem;
  }
  .nav-cta.open { top: 280px; }
  .menu-btn { display: inline-flex; }
  .engine-grid, .steps, .pricing, .footer-grid, .quotes { grid-template-columns: 1fr; }
  .brand img.wordmark { height: 34px; }
}

/* Playground */
.playground {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.15rem;
  align-items: stretch;
}
.play-left, .play-right { min-width: 0; }
.play-toolbar {
  display: flex; flex-wrap: wrap; gap: .65rem;
  justify-content: space-between; align-items: center;
  margin-bottom: .7rem;
}
.sample-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.sample-btn {
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--muted); border-radius: 999px; padding: .35rem .7rem;
  font-size: .78rem; font-weight: 700; cursor: pointer;
}
.sample-btn:hover { color: var(--text); border-color: var(--line2); }
.sample-btn.active {
  color: #041018; background: linear-gradient(135deg, var(--blue), var(--teal));
  border-color: transparent;
}
.demo-input {
  width: 100%; min-height: 340px; resize: vertical;
  border-radius: 16px; border: 1px solid var(--line);
  background: #090e18; color: #d7e2ff;
  font-family: var(--mono); font-size: .8rem; line-height: 1.5;
  padding: 1rem; outline: none;
}
.demo-input:focus { border-color: rgba(91,157,255,.55); box-shadow: 0 0 0 3px rgba(91,157,255,.12); }
.play-hint { color: var(--muted); font-size: .82rem; margin: .55rem 0 0; }
.play-right { display: grid; gap: .9rem; }
.score-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.findings-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.findings-list { max-height: 320px; overflow: auto; padding: .55rem; }
.finding {
  border: 1px solid var(--line); border-radius: 12px; padding: .75rem .8rem; margin-bottom: .5rem;
  background: rgba(0,0,0,.14);
}
.finding.empty { color: var(--muted); text-align: center; padding: 1.4rem .8rem; }
.finding .fh { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.finding .title { font-weight: 750; font-size: .9rem; }
.finding .meta { color: var(--muted); font-size: .78rem; font-family: var(--mono); }
.finding .ex {
  font-family: var(--mono); font-size: .75rem; color: #c8d4f0;
  background: #0a1020; border-radius: 8px; padding: .45rem .55rem; margin: .4rem 0;
  overflow: auto;
}
.finding .rem { color: var(--muted); font-size: .82rem; }
.sev {
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  border-radius: 999px; padding: .18rem .45rem; border: 1px solid;
}
.sev.CRITICAL { color: #ffb4bc; border-color: rgba(255,107,122,.45); background: rgba(255,107,122,.12); }
.sev.HIGH { color: #ffd59a; border-color: rgba(255,200,87,.4); background: rgba(255,200,87,.1); }
.sev.MEDIUM { color: #b7d4ff; border-color: rgba(91,157,255,.35); background: rgba(91,157,255,.1); }
.sev.LOW { color: #9cf0c8; border-color: rgba(61,220,151,.35); background: rgba(61,220,151,.1); }
.demo-footnote { text-align: center; color: var(--muted); font-size: .88rem; margin: 1.4rem 0 0; }
.star-box {
  display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem 1.4rem;
  background: linear-gradient(135deg, rgba(91,157,255,.08), rgba(61,220,151,.05));
}
.star-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
@media (max-width: 1020px) {
  .playground { grid-template-columns: 1fr; }
  .score-top { flex-direction: column; align-items: flex-start; }
}
