:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg-lift: #121822;
  --signal: #e85d2a;
  --signal-soft: rgba(232, 93, 42, 0.35);
  --cool: #3d8fd1;
  --cool-soft: rgba(61, 143, 209, 0.22);
  --text: #ebe6dc;
  --muted: #8b93a0;
  --line: #243041;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Syne", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, #1a2740 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(232, 93, 42, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-lift) 0%, var(--bg) 45%, #080a10 100%);
  line-height: 1.5;
}

a { color: var(--cool); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #6eb0e8; }

.wrap {
  width: min(1080px, calc(100% - 2.4rem));
  margin: 0 auto;
}

/* —— Hero —— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 18% 20% auto;
  height: 42%;
  background: radial-gradient(ellipse at center, var(--cool-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 44rem;
}

/* Big HTML wordmark + Signal Dock mark */
.brand-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 720px) {
  .brand-lock {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.35rem;
    width: auto;
  }
}

.mark {
  width: min(7.25rem, 32vw);
  height: auto;
  display: block;
  flex-shrink: 0;
  /* Outer plate keyed transparent; mouth/nose stay opaque black so orange bloom can't fill holes */
  animation: signal-bloom 4.5s ease-in-out infinite;
}

@media (min-width: 720px) {
  .mark { width: min(9.25rem, 40vw); }
}

@keyframes signal-bloom {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(61, 143, 209, 0.2))
            drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(61, 143, 209, 0.28))
            drop-shadow(0 0 18px var(--signal-soft));
  }
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  /* Fit full MARSIANDEV on narrow phones (was clipping) */
  font-size: clamp(1.45rem, 5.4vw, 3.4rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--text);
  white-space: nowrap;
}

.tagline {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--cool);
  letter-spacing: 0.01em;
}

.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;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.4rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.45rem;
  border-radius: 0.35rem;
  border: 1px solid var(--signal);
  background: transparent;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cta:hover {
  color: var(--text);
  border-color: #ff7a45;
  background: rgba(232, 93, 42, 0.12);
  cursor: pointer;
}

button.cta {
  font: inherit;
  cursor: pointer;
}

.cta-alt {
  border-color: var(--cool);
  background: transparent;
}

.cta-alt:hover {
  border-color: #6eb0e8;
  background: rgba(61, 143, 209, 0.1);
}

.cta-quiet {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.cta-quiet:hover { color: var(--cool); }

/* Gate: landing only. Enter reveals products + camp + footer. */
body.is-gate .site-body { display: none; }
body.is-entered .hero {
  min-height: auto;
  padding: 2.75rem 0 1.5rem;
}
body.is-entered .mark { width: min(6.5rem, 28vw); }
body.is-entered .wordmark { font-size: clamp(1.7rem, 4vw, 2.35rem); }
body.is-entered #cta-enter { display: none; }

/* —— Sections —— */
.section {
  padding: 4.5rem 0 1rem;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease forwards;
}

.section:nth-of-type(1) { animation-delay: 0.05s; }
.section:nth-of-type(2) { animation-delay: 0.12s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mark { animation: none; filter: drop-shadow(0 0 10px rgba(61, 143, 209, 0.22)); }
  .section { opacity: 1; transform: none; animation: none; }
}

.section h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: 0.03em;
}

.section .lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

/* —— Product grid —— */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: rgba(18, 24, 34, 0.55);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tile:hover {
  border-color: var(--cool);
  background: rgba(24, 34, 48, 0.75);
  color: inherit;
}

.tile-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.tile h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
}

.badge.beta { color: var(--cool); }

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tile .go {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--cool);
}

.tile:hover .go { color: #6eb0e8; }

/* —— Camp —— */
.camp {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.camp p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.camp a { font-weight: 600; }

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--cool); }

@media (max-width: 520px) {
  .cta {
    width: min(100%, 18rem);
  }
}
