/* Subspace Foundry - premium dark-space studio theme */
:root {
  --bg-deep: #04070f;
  --bg-surface: #0a1020;
  --bg-elevated: #121a2e;
  --bg-card: #0e1628;
  --border: #243552;
  --border-subtle: #182438;
  --border-hud: rgba(64, 220, 255, 0.35);
  --text: #eef3fb;
  --text-muted: #9db0c9;
  --text-dim: #6b7f99;
  --accent: #3fdcff;
  --accent-soft: #2aa8d4;
  --accent-glow: rgba(63, 220, 255, 0.14);
  --accent-warm: #7ee0c3;
  --bronze: #d4a574;
  --bronze-bright: #efc48a;
  --bronze-glow: rgba(212, 165, 116, 0.22);
  --focus: #ffd166;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(63, 220, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 48px rgba(63, 220, 255, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --max: 1120px;
  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(42, 168, 212, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(212, 165, 116, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 30% at 5% 40%, rgba(126, 224, 195, 0.04), transparent 45%),
    var(--bg-deep);
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bronze-bright); }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--focus);
  color: #111;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 7, 15, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 0 rgba(63, 220, 255, 0.06);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 220, 255, 0.35), rgba(212, 165, 116, 0.25), transparent);
  pointer-events: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.logo:hover { color: var(--bronze-bright); }
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.35), 0 0 18px rgba(63, 220, 255, 0.2);
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.15;
}
.logo-text strong {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  text-shadow: 0 0 18px var(--bronze-glow);
}
.logo-text small {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 44px;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.nav-list a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.nav-list a:hover {
  color: var(--text);
  background: var(--accent-glow);
  border-color: rgba(63, 220, 255, 0.15);
}
.nav-list a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(63, 220, 255, 0.28);
  box-shadow: inset 0 0 12px rgba(63, 220, 255, 0.08);
}

/* Main */
main {
  flex: 1;
  padding: 0 0 4rem;
}

/* -- Homepage hero with banner -- */
.hero-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(320px, 52vw, 520px);
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-banner-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-banner-media img,
.hero-banner-media picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 7, 15, 0.35) 0%, rgba(4, 7, 15, 0.55) 45%, rgba(4, 7, 15, 0.92) 100%),
    linear-gradient(90deg, rgba(4, 7, 15, 0.55) 0%, transparent 30%, transparent 70%, rgba(4, 7, 15, 0.45) 100%);
  pointer-events: none;
}
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  box-shadow: inset 0 0 80px rgba(63, 220, 255, 0.08);
  pointer-events: none;
}
.hero-banner .hero-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 3rem 0 2.75rem;
  text-align: left;
}
.hero-banner .hero-eyebrow {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(63, 220, 255, 0.45);
}
.hero-banner h1 {
  color: var(--bronze-bright);
  text-shadow: 0 0 28px var(--bronze-glow), 0 2px 12px rgba(0, 0, 0, 0.6);
  max-width: 18ch;
}
.hero-banner .hero-lead {
  margin-left: 0;
  margin-right: 0;
  max-width: 38rem;
  color: var(--text-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.hero-banner .hero-actions {
  justify-content: flex-start;
}

/* Generic hero (non-banner pages use page-hero) */
.hero {
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero-lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Page hero band (subtle banner glow on inner pages) */
.page-hero-band {
  position: relative;
  padding: 2.25rem 0 1.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 15, 0.55), rgba(4, 7, 15, 0.92)),
    url("../brand/banner-hero-1600.jpg") center 35% / cover no-repeat;
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}
.page-hero-band .page-header {
  margin-bottom: 0;
}
.page-hero-band h1 {
  color: var(--bronze-bright);
  text-shadow: 0 0 24px var(--bronze-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #041018;
  box-shadow: 0 0 24px rgba(63, 220, 255, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--bronze-bright), var(--bronze));
  color: #1a1008;
  box-shadow: 0 0 28px var(--bronze-glow);
}
.btn-secondary {
  background: rgba(14, 22, 40, 0.65);
  border-color: var(--border-hud);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(63, 220, 255, 0.12);
}

/* Sections */
.section {
  margin-top: 3rem;
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--bronze-bright);
  text-shadow: 0 0 16px var(--bronze-glow);
}
.section-intro {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

/* Cards - HUD borders + glow */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  background: linear-gradient(160deg, rgba(18, 26, 46, 0.95), rgba(10, 16, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 14px;
  height: 14px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  opacity: 0.55;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-bottom: 1.5px solid var(--bronze);
  border-right: 1.5px solid var(--bronze);
  opacity: 0.45;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(63, 220, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(63, 220, 255, 0.2), 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(63, 220, 255, 0.1);
  transform: translateY(-2px);
}
.card h3 {
  margin: 0;
  font-size: 1.2rem;
}
.card h3 a {
  color: var(--text);
  text-decoration: none;
}
.card h3 a:hover { color: var(--accent); }
.card p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
}
.card-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(63, 220, 255, 0.35);
  width: fit-content;
}

.placeholder-media {
  background:
    linear-gradient(145deg, rgba(18, 26, 46, 0.9), rgba(10, 16, 32, 0.95)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(63, 220, 255, 0.03) 8px,
      rgba(63, 220, 255, 0.03) 16px
    );
  border: 1px dashed var(--border-hud);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* Prose / page header */
.page-header {
  margin-bottom: 2rem;
}
.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.02em;
}
.page-header .lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 40rem;
}

.prose { max-width: 42rem; }
.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  color: var(--bronze-bright);
}
.prose p, .prose ul { color: var(--text-muted); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); }

/* Product layout */
.product-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 800px) {
  .product-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}
.product-panel {
  background: linear-gradient(160deg, rgba(18, 26, 46, 0.95), rgba(10, 16, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-glow);
  position: relative;
}
.product-panel::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 12px;
  height: 12px;
  border-top: 1.5px solid var(--accent);
  border-left: 1.5px solid var(--accent);
  opacity: 0.5;
  pointer-events: none;
}
.product-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--bronze-bright);
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "◈";
  color: var(--accent);
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(63, 220, 255, 0.5);
}
.tbd-note {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  box-shadow: inset 0 0 20px rgba(63, 220, 255, 0.04);
}

/* Support cards */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.support-card {
  position: relative;
  background: linear-gradient(160deg, rgba(18, 26, 46, 0.95), rgba(10, 16, 32, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-glow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.support-card:hover {
  border-color: rgba(63, 220, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(63, 220, 255, 0.15), 0 12px 36px rgba(0, 0, 0, 0.45);
}
.support-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--bronze-bright);
}
.support-card p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

/* Contact form */
.contact-form {
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
}
.form-field input,
.form-field textarea,
.form-field select {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}
.form-status {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-glow);
  border: 1px solid rgba(63, 220, 255, 0.35);
  color: var(--text);
}
.form-status.is-visible { display: block; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 220, 255, 0.3), rgba(212, 165, 116, 0.2), transparent);
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}
.footer-brand {
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.footer-brand a {
  color: var(--bronze-bright);
  text-decoration: none;
  text-shadow: 0 0 12px var(--bronze-glow);
}
.footer-brand a:hover { color: var(--accent); }
.footer-tag {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}
.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer-social {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-social a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-social a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 16, 32, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    gap: 0.15rem;
    backdrop-filter: blur(12px);
  }
  .nav-list.is-open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
  .hero-banner .hero-inner { text-align: left; padding-top: 2.5rem; }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main-pad {
  padding-top: 0.5rem;
}
