:root {
  --bg-main: #020409;
  --bg-tile: #050914;
  --bg-tile-alt: #070c19;
  --bg-panel: #050a12;
  --accent: #45ff9a;
  --accent-soft: #1b4431;
  --accent-hot: #00c8ff;
  --text-main: #f3fff9;
  --text-muted: #8aa4a0;
  --border-soft: #1a2633;
  --border-strong: #27384e;
  --danger: #ff3366;
  --shadow-main: 0 0 40px rgba(0, 255, 150, 0.35);
  --radius-xl: 20px;
  --radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* BODY / GLOBAL */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #071321 0, #020409 40%, #010208 80%),
    radial-gradient(circle at bottom, #071019 0, #020409 40%, #000000 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--accent-hot);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}

/* CITY BACKGROUND */

.bg-city {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("assets/csprings-bw-city.png") center center / cover no-repeat;
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
  filter: grayscale(1) contrast(1.2) brightness(0.6);
}

.bg-city::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.25) 70%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* make real content sit above backdrop */
body > * {
  position: relative;
  z-index: 2;
}

/* HEADER & NAV */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 4, 9, 0.96),
    rgba(2, 4, 9, 0.9),
    rgba(2, 4, 9, 0.75)
  );
  border-bottom: 1px solid rgba(30, 45, 60, 0.7);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* brand */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(0, 255, 150, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-main);
}

.brand-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* nav links */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.85rem;
}

.nav-links a {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  transition: color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.active {
  color: var(--accent-hot);
}

/* ghost buttons in nav */

.nav-links .btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(69, 255, 154, 0.5);
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
}

.nav-flasher {
  border-color: rgba(0, 200, 255, 0.7);
  color: var(--accent-hot);
  font-size: 0.7rem;
}

.nav-flasher:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* nav toggle kept but hidden (you can wire it up later if you want a burger) */
.nav-toggle {
  display: none;
}

/* GENERIC LAYOUT */

main {
  flex: 1;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 3.2rem;
}

.tile-section {
  border-top: 1px solid rgba(21, 30, 41, 0.9);
}

/* HERO */

.hero-tile {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(0, 200, 255, 0.16), transparent 55%),
              radial-gradient(circle at bottom right, rgba(69, 255, 154, 0.12), transparent 50%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-shell {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.8rem;
  align-items: center;
}

.hero-text {
  max-width: 640px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent-hot);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: clamp(2.1rem, 3.3vw + 1.4rem, 3.3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  text-shadow: 0 0 25px rgba(0, 255, 150, 0.45);
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* HERO VISUAL / PHONE MOCKUP */

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-frame {
  position: relative;
  width: 260px;
  max-width: 100%;
  aspect-ratio: 9 / 19;
  border-radius: 26px;
  padding: 10px;
  background: radial-gradient(circle at top, #0c1724 0, #03060e 55%, #000000 100%);
  box-shadow:
    0 0 40px rgba(0, 255, 150, 0.32),
    0 0 30px rgba(0, 200, 255, 0.2);
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 35%;
  height: 8px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(to right, #0d1724, #020409, #0d1724);
  opacity: 0.8;
}

.hero-map-image {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.phone-glow {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  box-shadow: 0 0 50px rgba(0, 255, 150, 0.5) inset;
  opacity: 0.25;
  pointer-events: none;
}

.phone-caption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* BUTTONS */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #00c86f, #00c8ff);
  color: #010308;
  box-shadow: var(--shadow-main);
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(69, 255, 154, 0.5);
  color: var(--text-main);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
}

/* MAP SECTION */

.tile-section-map {
  background: linear-gradient(
    to bottom,
    rgba(5, 9, 20, 0.94),
    rgba(5, 9, 20, 0.98)
  );
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-title {
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 0.4rem;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.tile-header-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(0, 200, 255, 0.45);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff8a;
  margin-right: 0.4rem;
  box-shadow: 0 0 10px rgba(0, 255, 150, 0.7);
}

.map-tile {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
  gap: 1.7rem;
  align-items: stretch;
}

.map-info {
  background: radial-gradient(circle at top left, #081426, #030812);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 1.3rem 1.4rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.map-info h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1rem;
}

.map-info ul {
  margin: 0.7rem 0 0.7rem 1.3rem;
  padding: 0;
}

.map-info li {
  margin-bottom: 0.25rem;
}

.map-coming-soon {
  font-size: 0.85rem;
  color: var(--accent-hot);
}

.mapbox-panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #020409;
  border: 1px solid var(--border-soft);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

.map-iframe {
  width: 100%;
  height: min(420px, 60vh);
  border: none;
  display: block;
}

/* COMMUNITY GRID */

.tile-section-grid {
  background: radial-gradient(circle at top, #050914, #020409 60%, #000000 100%);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.tile {
  min-height: 0;
}

.card-inner {  
  height: 100%;
  background: radial-gradient(circle at top left, #071022, #050914);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 1.3rem 1.5rem 1.4rem;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-primary .card-inner {
  border-color: rgba(0, 255, 150, 0.5);
}

.card-accent .card-inner {
  border-color: rgba(0, 200, 255, 0.55);
}

.card-title {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.card-body {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-footer {
  font-size: 0.82rem;
  color: #9bdad0;
  margin-top: auto;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid rgba(21, 30, 41, 0.9);
  background: #020409;
  padding: 1rem 1.5rem 1.3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* HARDWARE PAGE (DEVICE GRID) */

.hardware-hero {
  background: radial-gradient(circle at top, #050914, #020409 60%);
  border-bottom: 1px solid rgba(21, 30, 41, 0.9);
}

.hardware-hero .section-title {
  margin-bottom: 0.6rem;
}

.hardware-hero .section-subtitle {
  max-width: 32rem;
}

.device-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 1.5rem;
}

.device-filter {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(37, 184, 255, 0.4);
  color: var(--text-muted);
  padding: 0.35rem 0.9rem;
  cursor: pointer;
}

.device-filter.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 255, 150, 0.4);
}

#deviceGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.device-card-inner {
  background: radial-gradient(circle at top left, #071022, #050914);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.65);
}

.device-image-wrap {
  position: relative;
  border-radius: 12px;
  background: #020409;
  border: 1px dashed rgba(90, 110, 135, 0.8);
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.device-image {
  max-width: 100%;
  height: 90px;
  object-fit: contain;
  display: block;
}

.device-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 150, 0.7);
  background: rgba(0, 0, 0, 0.7);
}

.badge-repeater {
  left: auto;
  right: 8px;
  border-color: rgba(0, 200, 255, 0.85);
}

.device-name {
  margin: 0;
  font-size: 0.98rem;
}

.device-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.72rem;
}

.device-pill {
  border-radius: 999px;
  border: 1px solid rgba(80, 110, 135, 0.9);
  padding: 0.05rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.device-description {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.device-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.device-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(37, 184, 255, 0.08);
  border: 1px solid rgba(37, 184, 255, 0.3);
  color: #9bd3ff;
}

.device-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* SOFTWARE / PACKET BASE SECTION */

.software-section {
  background: radial-gradient(circle at top, #050914, #020409 60%);
}

.software-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.7rem;
  align-items: flex-start;
}

.software-card {
  background: radial-gradient(circle at top left, #071022, #050914);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
}

.software-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.software-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}

.software-meta span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 200, 255, 0.5);
}

.software-screenshot-frame {
  background: #020409;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 0.7rem;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.8);
}

.software-screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(37, 184, 255, 0.35);
}

.software-screenshot-caption {
  font-size: 0.85rem;
  color: #6aa3b4;
  margin-top: 8px;
  text-align: center;
}

/* RESPONSIVE BREAKPOINTS */

@media (max-width: 1024px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  .hero-visual {
    order: -1;
  }
  .map-tile {
    grid-template-columns: minmax(0, 1fr);
  }
  .software-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
  }

  .brand-text small {
    display: none; /* hide subtitle to save width */
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
    font-size: 0.72rem;
  }

  .nav-links a {
    letter-spacing: 0.12em;
  }
}

@media (max-width: 720px) {
  .shell {
    padding-inline: 1.1rem;
  }
  .tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .hero-tile {
    padding-top: 2.2rem;
  }
  .phone-frame {
    width: 220px;
  }
  .map-iframe {
    height: 320px;
  }
}
