:root {
  --bg: #0b0d12;
  --bg-glow-1: #1a1147;
  --bg-glow-2: #06202b;
  --panel: #151822;
  --panel-2: #1c202c;
  --border: #2a2f3d;
  --text: #eef0f4;
  --muted: #9aa3af;
  --accent: #6d8bff;
  --accent-2: #b06dff;
  --accent-3: #34e0c1;
  --pass: #3ecf8e;
  --warn: #f2b84b;
  --fail: #f2545b;
  --radius: 14px;
  --gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(109, 139, 255, 0.16), transparent 60%),
    radial-gradient(800px 460px at 100% 0%, rgba(176, 109, 255, 0.14), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(52, 224, 193, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 24px;
  background: rgba(21, 24, 34, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topnav .brand {
  font-weight: 800;
  font-size: 1.15rem;
  margin-right: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: color 0.15s, background 0.15s;
}

.topnav a:hover { color: var(--text); background: var(--panel-2); }
.topnav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--border); }

/* --------------------------------------------------------- nav dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-btn .caret { font-size: 0.7em; opacity: 0.7; transition: transform 0.18s ease; }
.nav-dropdown-btn:hover,
.nav-dropdown-btn.active,
.nav-dropdown.open .nav-dropdown-btn,
.nav-dropdown:hover .nav-dropdown-btn { color: var(--text); background: var(--panel-2); }
.nav-dropdown.open .caret,
.nav-dropdown:hover .caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  max-width: 90vw;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--panel-2); color: var(--text); }

/* On narrow screens, cap the menu width so it has room to fit on screen -
   its horizontal position is then clamped in JS (see base.html) since the
   button can sit anywhere in the wrapped nav row. */
@media (max-width: 480px) {
  .nav-dropdown-menu { width: min(88vw, 260px); min-width: 0; }
}

.pill-soon {
  background: rgba(52, 224, 193, 0.12);
  border-color: rgba(52, 224, 193, 0.4);
  color: var(--accent-3);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  animation: pulse-soft 2.4s ease-in-out infinite;
}
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 224, 193, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(52, 224, 193, 0); }
}

/* -------------------------------------------------------------- toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------- animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.tool-card-soon { cursor: pointer; }
.tool-card-soon .pill-soon { position: absolute; top: 16px; right: 16px; z-index: 1; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  flex: 1;
  width: 100%;
}

h1 { font-size: 1.9rem; margin-bottom: 6px; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin-top: 28px; }
.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 24px; font-size: 1.02rem; }

.gradient-text {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding: 56px 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 260px at 15% 0%, rgba(109, 139, 255, 0.22), transparent 60%),
    radial-gradient(500px 260px at 100% 20%, rgba(176, 109, 255, 0.2), transparent 60%),
    var(--panel);
  background-size: 160% 160%;
  animation: heroGlow 16s ease-in-out infinite;
  overflow: hidden;
  margin-bottom: 32px;
}
@keyframes heroGlow {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 30% 15%; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.4;
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(109, 139, 255, 0.12);
  border: 1px solid rgba(109, 139, 255, 0.35);
  color: #c3d0ff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: 14px;
  max-width: 640px;
  position: relative;
}
.hero p.subtitle {
  font-size: 1.08rem;
  max-width: 560px;
  position: relative;
}
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; position: relative; }
.hero .stat-row { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; position: relative; }
.hero .stat { min-width: 120px; }
.hero .stat .num { font-size: 1.6rem; font-weight: 800; }
.hero .stat .label { color: var(--muted); font-size: 0.82rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 12px 30px -18px rgba(0,0,0,0.6);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tool-card {
  display: block;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 0;
  mix-blend-mode: overlay;
}
.tool-card:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -18px rgba(109, 139, 255, 0.55);
}
.tool-card:hover::after { opacity: 0.16; }
.tool-card .emoji { font-size: 1.8rem; position: relative; z-index: 1; }
.tool-card h3 { margin: 12px 0 6px; font-size: 1.08rem; position: relative; z-index: 1; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.88rem; position: relative; z-index: 1; }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; margin-top: 14px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 11px 13px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.18);
}

button, .btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 20px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 8px 22px -12px rgba(109, 139, 255, 0.7);
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(109, 139, 255, 0.8); opacity: 1; }
button:active, .btn:active { transform: translateY(0); }
.btn-secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn-secondary:hover { box-shadow: none; border-color: var(--accent); }
.btn-danger { background: transparent; border: 1px solid var(--fail); color: var(--fail); box-shadow: none; }
.btn-small { padding: 6px 12px; font-size: 0.82rem; margin-top: 0; }

/* Shown while a tool form is submitting, so a slow crawl/lookup never looks
   frozen - see the submit listener in base.html. */
button.btn-loading {
  cursor: progress;
  opacity: 0.85;
  padding-left: 38px;
  position: relative;
}
button.btn-loading::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.radio-row { display: flex; gap: 18px; margin-top: 10px; }
.radio-row label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.radio-row input { width: auto; }

.error-box {
  background: rgba(242, 84, 91, 0.1);
  border: 1px solid var(--fail);
  color: #ffb4b7;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  border: 3px solid var(--accent);
  background: var(--panel-2);
}

.check-list { list-style: none; padding: 0; margin: 10px 0; }
.check-list li {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--panel-2);
  border-left: 4px solid var(--border);
  font-size: 0.92rem;
}
.check-list li.pass { border-left-color: var(--pass); }
.check-list li.warn { border-left-color: var(--warn); }
.check-list li.fail { border-left-color: var(--fail); }
.check-list .status-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-right: 8px;
}
.status-tag.pass { color: var(--pass); }
.status-tag.warn { color: var(--warn); }
.status-tag.fail { color: var(--fail); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  margin: 2px 4px 2px 0;
}
.pill-critical { border-color: var(--fail); color: #ffb4b7; background: rgba(242, 84, 91, 0.1); }
.pill-warning { border-color: var(--warn); color: #ffdca6; background: rgba(242, 184, 75, 0.12); }
.pill-notice { border-color: var(--border); color: var(--muted); }

.severity-summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 0.88rem; }
.severity-summary strong { font-size: 1.05rem; }
.severity-summary .sev-critical strong { color: var(--fail); }
.severity-summary .sev-warning strong { color: var(--warn); }
.severity-summary .sev-notice strong { color: var(--muted); }

table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.88rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }
tr:hover td { background: var(--panel-2); }
a { color: var(--accent); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.mt-0 { margin-top: 0; }
.note {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 14px;
}

/* ------------------------------------------------------------- quote box */
.quote-box {
  border: 1px solid rgba(52, 224, 193, 0.4);
  background: linear-gradient(160deg, rgba(52, 224, 193, 0.08), rgba(109, 139, 255, 0.06));
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}
.quote-box h2 { margin-top: 0; }
.quote-price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.quote-price { font-size: 2.2rem; font-weight: 800; }
.quote-market {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 1.05rem;
}
.quote-savings {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(52, 224, 193, 0.15);
  border: 1px solid rgba(52, 224, 193, 0.4);
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h2 { margin-top: 0; }
.contact-info p { margin: 0 0 16px; }
.contact-info a { color: var(--text); text-decoration: none; }
.contact-info a:hover { color: var(--accent); }

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #06210f !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px -10px rgba(37, 211, 102, 0.6);
}
.whatsapp-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(37, 211, 102, 0.8); color: #06210f; }
.whatsapp-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ----------------------------------------------------------------footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(21, 24, 34, 0.6);
  padding: 36px 24px 28px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-inner .brand {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  display: inline-block;
}
.footer-inner p { color: var(--muted); font-size: 0.88rem; margin: 4px 0; }
.footer-inner h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 12px; }
.footer-inner a { color: var(--muted); text-decoration: none; display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer-inner a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1100px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
