/* ==========================================================================
   hub.sswx.space — page-specific styles
   Extends the shared tokens loaded from assets.sswx.space/style.css
   ========================================================================== */

/* --- Nav extras --- */
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.92rem; color: var(--text-muted); }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.current { color: var(--radar-teal); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }
.account-chip { display:none; align-items:center; gap:8px; font-size:0.85rem; color: var(--text-muted); }
.account-chip.visible { display:flex; }

@media (max-width: 860px) {
  .nav-links { position: fixed; top: 68px; right: 0; bottom: 0; left: 0; z-index: 55; background: var(--bg); flex-direction: column; padding: 32px 24px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* --- SSWX Products dropdown --- */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--text-muted);
  font-family: var(--font-body); font-size: 0.92rem; cursor: pointer; padding: 0;
}
.nav-dropdown-trigger:hover { color: var(--text-primary); }
.nav-dropdown-trigger .caret { font-size: 0.7rem; transition: transform 0.15s ease; }
.nav-dropdown.open .nav-dropdown-trigger .caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: -14px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; min-width: 210px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}
.nav-dropdown.open .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-dropdown-menu a {
  padding: 10px 12px; border-radius: 8px; font-size: 0.9rem; color: var(--text-primary);
}
.nav-dropdown-menu a:hover { background: var(--bg-elevated-2); color: var(--radar-teal); }
@media (max-width: 860px) {
  .nav-dropdown-menu {
    position: static; opacity: 1; pointer-events: auto; transform: none;
    display: none; box-shadow: none; border: none; background: var(--bg-elevated-2);
    margin-top: 4px;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-trigger { padding: 0; }
}

/* --- Hero --- */
.hero {
  padding: 64px 0 var(--space-section);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } }

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin: 18px 0 20px;
}
.hero p.lead {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Signature radar sweep visual */
.radar-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(31,216,196,0.06) 0%, transparent 70%);
}
.radar-visual .ring {
  position: absolute; inset: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.radar-visual .ring.r2 { inset: 16%; }
.radar-visual .ring.r3 { inset: 32%; }
.radar-visual .ring.r4 { inset: 48%; }
.radar-sweep {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(31,216,196,0.55), transparent 26%);
  animation: sweep 4.5s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-center {
  position: absolute; top: 50%; left: 50%;
  width: 10px; height: 10px; margin: -5px;
  background: var(--alert-gold);
  border-radius: 50%;
  box-shadow: 0 0 16px 2px rgba(245,180,0,0.6);
}
.radar-blip {
  position: absolute;
  width: 8px; height: 8px;
  background: var(--text-primary);
  border-radius: 50%;
  opacity: 0;
  animation: blip 4.5s linear infinite;
}
@keyframes blip { 0%, 20% { opacity: 0; } 24% { opacity: 1; } 40% { opacity: 0.15; } 100% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) {
  .radar-sweep { animation: none; background: conic-gradient(from 0deg, rgba(31,216,196,0.25), transparent 40%); }
  .radar-blip { animation: none; opacity: 0.6; }
}

/* --- Numbered steps --- */
.steps {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
@media (max-width: 780px) { .steps-grid { grid-template-columns: 1fr; } }
.step-num {
  font-family: var(--font-mono);
  color: var(--radar-teal);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* --- Product grid --- */
.products { padding: var(--space-section) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }

.product-card { display: flex; flex-direction: column; gap: 16px; }
.product-card .tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}
.product-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.product-card p { font-size: 0.92rem; margin-bottom: 0; }
.widget {
  height: 92px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product-card-foot button { background: none; border: none; color: var(--storm-blue-bright); font-weight: 600; font-size: 0.88rem; cursor: pointer; padding: 0; }

/* mini widget: store ticker */
.w-store .ticker { position: absolute; inset: 0; display:flex; align-items:center; gap:14px; padding: 0 14px; animation: ticker 8s linear infinite; }
.w-store .ticker span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-40%); } }

/* mini widget: radar overlay gradient */
.w-overlay .bar { position:absolute; left:14px; right:14px; top:50%; height:10px; margin-top:-5px; border-radius: 6px; background: linear-gradient(90deg,#1a3a8f,#2e6de0,#1fd8c4,#7be26a,#f5e400,#f5b400,#e0521f,#b31217); }
.w-overlay .cursor { position:absolute; top: 28%; width:2px; height:44%; background:#EDF1F7; animation: cursor-move 5s ease-in-out infinite; }
@keyframes cursor-move { 0%,100% { left:14px; } 50% { left: calc(100% - 16px); } }

/* mini widget: disaster map pins */
.w-disaster .pin { position:absolute; width:10px; height:10px; border-radius:50%; background: var(--radar-teal); }
.w-disaster .pin::after { content:''; position:absolute; inset:-8px; border-radius:50%; border:1px solid var(--radar-teal); animation: pulse 2.4s ease-out infinite; }
.w-disaster .pin.p1 { top: 30%; left: 24%; }
.w-disaster .pin.p2 { top: 55%; left: 62%; animation-delay: 1s; }
.w-disaster .pin.p2::after { animation-delay: 1.1s; }
@keyframes pulse { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(2.4); opacity: 0; } }

/* mini widget: builder steps */
.w-services .dots { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; }
.w-services .dot { width:9px; height:9px; border-radius:50%; background: var(--border); }
.w-services .dot.active { background: var(--storm-blue-bright); box-shadow: 0 0 10px 1px rgba(109,147,240,0.6); }

/* mini widget: application tiles */
.w-application .tiles { position:absolute; inset:14px; display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.w-application .tile { background: var(--bg-elevated); border:1px solid var(--border); border-radius:6px; }
.w-application .tile.glow { animation: glow 3s ease-in-out infinite; }
@keyframes glow { 0%,100% { border-color: var(--border); } 50% { border-color: var(--radar-teal); } }

/* mini widget: relief progress */
.w-relief .track { position:absolute; left:14px; right:14px; top:50%; height:8px; margin-top:-4px; border-radius:5px; background: var(--bg-elevated); overflow:hidden; }
.w-relief .fill { position:absolute; inset:0; width:0%; background: linear-gradient(90deg, var(--storm-blue), var(--radar-teal)); animation: fillbar 6s ease-in-out infinite; }
@keyframes fillbar { 0% { width:0%; } 60% { width:78%; } 100% { width:78%; } }

/* --- Explore band (links out to /tools/ and /news/) --- */
.explore { padding: var(--space-section) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .explore { grid-template-columns: 1fr; } }
.explore-card { display: block; transition: transform 0.15s ease, border-color 0.15s ease; }
.explore-card:hover { transform: translateY(-3px); border-color: var(--storm-blue-bright); }
.explore-card h3 { font-size: 1.15rem; margin: 10px 0 8px; }
.explore-card p { margin-bottom: 0; font-size: 0.92rem; }

/* --- Comparison table --- */
.compare { padding: var(--space-section) 0; border-top: 1px solid var(--border); }
table.compare-table { width: 100%; border-collapse: collapse; margin-top: 36px; }
table.compare-table th, table.compare-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
table.compare-table th { font-family: var(--font-display); font-weight: 600; color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
table.compare-table td.yes { color: var(--radar-teal); font-weight: 600; }

/* --- Stats --- */
.stats { padding: 60px 0; border-top: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; text-align:center; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-num { font-family: var(--font-mono); font-size: 2.4rem; color: var(--text-primary); }
.stat-label { color: var(--text-faint); font-size: 0.85rem; }

/* --- News --- */
.news { padding: var(--space-section) 0; border-top: 1px solid var(--border); }
.news-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:20px; margin-top: 36px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card .date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); }
.news-card h3 { font-size: 1.05rem; margin: 10px 0 8px; }

/* --- CTA band --- */
.cta-band { padding: var(--space-section) 0; text-align:center; border-top: 1px solid var(--border); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 26ch; margin: 0 auto 28px; }

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,7,12,0.72);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md);
  width: 100%; max-width: 380px; padding: 28px;
}
.modal-tabs { display:flex; gap:6px; background: var(--bg-elevated-2); padding:4px; border-radius: 10px; margin-bottom: 20px; }
.modal-tabs button { flex:1; background:none; border:none; color: var(--text-muted); padding: 8px; border-radius:8px; cursor:pointer; font-weight:600; font-size:0.88rem; }
.modal-tabs button.active { background: var(--bg-elevated); color: var(--text-primary); }
.field { margin-bottom: 14px; }
.field label { display:block; font-size:0.82rem; color: var(--text-muted); margin-bottom:6px; }
.field input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem;
}
.field input:focus-visible { outline: 2px solid var(--radar-teal); outline-offset: 1px; }
.modal .btn { width: 100%; margin-top: 4px; }
.modal-divider { display:flex; align-items:center; gap:10px; margin: 18px 0; color: var(--text-faint); font-size:0.8rem; }
.modal-divider::before, .modal-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.modal-close { position:absolute; top:16px; right:16px; background:none; border:none; color: var(--text-faint); font-size:1.2rem; cursor:pointer; }
.modal-wrap { position: relative; }
.modal-msg { font-size: 0.85rem; margin-top: 12px; text-align:center; }
.modal-msg.error { color: #F26D6D; }
.modal-msg.success { color: var(--radar-teal); }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; font-size: 0.88rem; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; z-index: 200; max-width: 90vw; text-align:center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Reveal on scroll --- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
