/* ============ SphereAlert Website ============ */
:root {
  --navy-900: #021a26;
  --navy-800: #042c41;
  --navy-700: #063b56;
  --navy-600: #0a4d6e;
  --cyan: #2bb7e6;
  --cyan-bright: #3fd0ff;
  --amber: #ffb429;
  --amber-bright: #ffc94d;
  --green: #25c281;
  --red: #ff5d5d;
  --text: #e8f1f6;
  --text-dim: #9fb6c4;
  --text-mute: #6f8a99;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --maxw: 1140px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --grad: linear-gradient(120deg, var(--cyan-bright), var(--amber));
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(43, 183, 230, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(255, 180, 41, 0.08), transparent 55%),
    var(--navy-900);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: 0.95rem;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--lg { padding: 14px 28px; font-size: 1.02rem; }
.btn--primary { background: var(--grad); color: #02212e; box-shadow: 0 8px 26px rgba(43, 183, 230, 0.3); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(255, 180, 41, 0.4); }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(2, 26, 38, 0.72);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; }
.brand__logo { width: 34px; height: 34px; margin-left: 0px; margin-bottom: -7px; border-radius: 8px; }
.brand__accent { color: var(--amber-bright); }
.nav__links { display: flex; gap: 26px; margin-left: 12px; flex: 1; }
.nav__links a { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; gap: 12px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 72px; text-align: center; overflow: hidden; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px 320px at 50% 0%, rgba(255, 180, 41, 0.16), transparent 70%);
}
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  width: 116px; height: 116px; border-radius: 26px; margin-bottom: -26px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero__title_main { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-top: -10px; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.hero__title { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__tagline {
  margin: 22px auto 0; max-width: 640px; font-style: italic;
  color: var(--text-dim); font-size: 1.06rem;
}
.hero__sub { margin: 18px auto 0; max-width: 660px; color: var(--text-dim); font-size: 1.08rem; }
.hero__sub strong { color: var(--text); }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero__badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.badge {
  font-size: 0.82rem; font-weight: 500; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}

/* ---------- Demo banners ---------- */
.demo-banners { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 40px auto 0; }
.abanner {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 18px; border-radius: 12px; font-size: 0.95rem; font-weight: 500;
  border: 1px solid var(--line);
}
.abanner__tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; flex: none; }
.abanner__x { margin-left: auto; opacity: 0.6; font-weight: 700; flex: none; }
.abanner--info { background: rgba(63, 208, 255, 0.1); border-color: rgba(63, 208, 255, 0.3); color: #cdeefb; }
.abanner--info .abanner__tag { background: rgba(63, 208, 255, 0.22); color: #cdeefb; }
.abanner--medium { background: rgba(255, 180, 41, 0.12); border-color: rgba(255, 180, 41, 0.35); color: #ffe2a6; }
.abanner--medium .abanner__tag { background: rgba(255, 180, 41, 0.25); color: #ffe2a6; }
.abanner--critical { background: rgba(255, 93, 93, 0.12); border-color: rgba(255, 93, 93, 0.35); color: #ffd0d0; }
.abanner--critical .abanner__tag { background: rgba(255, 93, 93, 0.25); color: #ffd0d0; }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 16px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__num { display: block; font-size: 2.4rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { color: var(--text-mute); font-size: 0.92rem; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--alt { background: rgba(255, 255, 255, 0.018); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-bright); margin-bottom: 14px; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.section__head p { margin-top: 14px; color: var(--text-dim); font-size: 1.05rem; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); background: var(--card-hover); border-color: rgba(255, 180, 41, 0.3); }
.card__icon { font-size: 1.7rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 13px; background: rgba(255, 180, 41, 0.1); border: 1px solid rgba(255, 180, 41, 0.18); margin-bottom: 16px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.96rem; }
.card--link h3 { color: var(--amber-bright); }
.card--mini { padding: 20px; }
.card--mini code { color: var(--amber-bright); font-size: 0.95rem; }
.card--mini p { margin-top: 6px; }

/* ---------- Steps ---------- */
.steps { list-style: none; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; gap: 20px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.step__num { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #02212e; background: var(--grad); }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--text-dim); font-size: 0.96rem; }

/* ---------- Flow diagram ---------- */
.flow { max-width: 820px; margin: 0 auto; background: #021018; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.flow pre { padding: 28px 24px; overflow-x: auto; }
.flow code { color: #cfe9f5; font-size: 0.9rem; line-height: 1.7; white-space: pre; }

/* ---------- Providers ---------- */
.providers { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 880px; margin: 0 auto; }
.providers li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 11px 20px; font-weight: 500; color: var(--text); transition: .2s; }
.providers li:hover { border-color: rgba(255, 180, 41, 0.4); background: var(--card-hover); }
.providers__more { color: var(--amber-bright) !important; border-style: dashed !important; }
.providers__note { text-align: center; margin-top: 28px; color: var(--text-mute); }
.providers__note a { color: var(--amber-bright); }

/* ---------- Install ---------- */
.install { max-width: 820px; margin: 0 auto; }
.install__tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text-dim); padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: .2s; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--navy-700); color: var(--text); border-color: rgba(255, 180, 41, 0.4); }
.codepanel { position: relative; display: none; background: #021018; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.codepanel.is-active { display: block; }
.codepanel pre { padding: 24px; overflow-x: auto; }
.codepanel code { color: #cfe9f5; font-size: 0.9rem; line-height: 1.7; white-space: pre; }
.copy { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text-dim); padding: 6px 13px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: .2s; }
.copy:hover { background: rgba(255, 180, 41, 0.16); color: var(--text); }
.copy.copied { background: var(--green); color: #02212e; border-color: transparent; }

.callout { max-width: 820px; margin: 22px auto 0; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; background: rgba(37, 194, 129, 0.07); border: 1px solid rgba(37, 194, 129, 0.25); border-radius: var(--radius); padding: 18px 22px; }
.callout code { background: rgba(255, 255, 255, 0.08); padding: 2px 8px; border-radius: 6px; color: var(--amber-bright); }
.callout__warn { color: #ffd479; font-weight: 600; font-size: 0.95rem; }
.volumes { max-width: 820px; margin: 26px auto 0; }

/* ---------- TXT record table ---------- */
.txt-wrap { max-width: 820px; margin: 0 auto; }
.txt-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 22px; }
.txt-table th, .txt-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.txt-table th { color: var(--amber-bright); font-weight: 700; background: rgba(255, 255, 255, 0.02); }
.txt-table tr:last-child td { border-bottom: 0; }
.txt-table code { color: var(--cyan-bright); }
.txt-table td:first-child { font-family: "JetBrains Mono", monospace; color: var(--amber-bright); }

/* ---------- Levels ---------- */
.levels { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 880px; margin: 0 auto; }
.level { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; font-weight: 600; }
.level__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.level--0 .level__dot { background: #5fb0d8; }
.level--1 .level__dot { background: var(--green); }
.level--2 .level__dot { background: var(--amber); }
.level--3 .level__dot { background: #ff8a3d; }
.level--4 .level__dot { background: var(--red); }

/* ---------- License ---------- */
.license { max-width: 760px; text-align: center; }
.license p { color: var(--text-dim); margin-bottom: 16px; font-size: 1.04rem; }
.license strong { color: var(--text); }
.license .btn { margin-top: 8px; }

/* ---------- CTA ---------- */
.cta { padding: 86px 0; text-align: center; background: radial-gradient(700px 300px at 50% 120%, rgba(255, 180, 41, 0.16), transparent 70%); border-top: 1px solid var(--line); }
.cta__inner h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
.cta__inner p { color: var(--text-dim); margin-top: 12px; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0; background: var(--navy-900); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.footer__brand img { width: 30px; height: 30px; border-radius: 7px; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--text-dim); font-weight: 500; transition: color .2s; }
.footer__links a:hover { color: var(--amber-bright); }
.footer__copy { color: var(--text-mute); font-size: 0.88rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0;
    background: rgba(2, 26, 38, 0.98); border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 16px;
  }
  .nav.is-open .nav__actions { display: flex; position: absolute; top: 70px; left: 0; right: 0; margin-top: 168px; padding: 0 24px 20px; background: rgba(2, 26, 38, 0.98); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .grid--3 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 52px; }
}
