:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: rgba(17, 22, 26, 0.78);
  --panel-strong: rgba(17, 22, 26, 0.92);
  --text: #f5f1e8;
  --muted: #c9c0af;
  --line: rgba(245, 241, 232, 0.18);
  --gold: #d7b56d;
  --green: #6e845b;
  --brick: #a45d4a;
  --ink: #11161a;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
  --hero-image: url("/assets/hero-night-wide.jpg?v=planet-20260503f");
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="day"] {
  color-scheme: light;
  --bg: #f3efe4;
  --panel: rgba(255, 252, 244, 0.8);
  --panel-strong: rgba(255, 252, 244, 0.94);
  --text: #1b1d1c;
  --muted: #5c594f;
  --line: rgba(27, 29, 28, 0.16);
  --gold: #a77731;
  --green: #536d45;
  --brick: #985845;
  --ink: #171b1d;
  --shadow: 0 22px 80px rgba(52, 37, 22, 0.22);
  --hero-image: url("/assets/hero-day-wide.jpg?v=planet-20260503f");
}

@media (min-resolution: 1.5dppx) {
  :root {
    --hero-image: url("/assets/hero-night-retina.jpg?v=planet-20260503f");
  }

  :root[data-theme="day"] {
    --hero-image: url("/assets/hero-day-retina.jpg?v=planet-20260503f");
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(16, 17, 19, 0.72), rgba(16, 17, 19, 0.98)),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  transition:
    background 180ms ease,
    border-color 180ms ease,
    backdrop-filter 180ms ease;
}

.site-header[data-elevated="true"] {
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header:not([data-elevated="true"]) .brand {
  color: #fffaf0;
}

.site-header[data-elevated="true"] .site-nav {
  color: var(--muted);
}

.site-header[data-elevated="true"] .site-nav a:hover,
.site-header[data-elevated="true"] .site-nav a:focus-visible {
  color: var(--text);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 760;
  letter-spacing: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(215, 181, 109, 0.34);
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  justify-self: end;
  justify-content: center;
  gap: clamp(14px, 3vw, 32px);
  color: rgba(245, 241, 232, 0.82);
  font-size: 0.94rem;
}

:root[data-theme="day"] .site-header:not([data-elevated="true"]) .site-nav {
  color: rgba(255, 252, 244, 0.9);
}

.site-nav a,
.button,
.portal-card {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: clamp(24px, 7vw, 110px);
  padding: clamp(122px, 18vh, 180px) clamp(18px, 5vw, 72px)
    clamp(56px, 10vh, 108px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.88), rgba(8, 9, 10, 0.38) 48%, rgba(8, 9, 10, 0.74)),
    linear-gradient(0deg, rgba(16, 17, 19, 0.96), rgba(16, 17, 19, 0.12) 38%, rgba(16, 17, 19, 0.34));
}

:root[data-theme="day"] .hero::after {
  background:
    linear-gradient(90deg, rgba(18, 21, 17, 0.76), rgba(18, 21, 17, 0.2) 48%, rgba(18, 21, 17, 0.55)),
    linear-gradient(0deg, rgba(19, 23, 19, 0.9), rgba(19, 23, 19, 0.08) 42%, rgba(19, 23, 19, 0.18));
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.77rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  color: #fffaf0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 13vw, 9.8rem);
  font-weight: 500;
  line-height: 0.86;
  text-wrap: balance;
  text-shadow: 0 12px 46px rgba(0, 0, 0, 0.46);
}

.hero-lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: rgba(255, 250, 240, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 730;
}

.button:hover,
.button:focus-visible,
.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--gold);
  color: #15120c;
}

.button.secondary {
  border-color: rgba(245, 241, 232, 0.32);
  background: rgba(245, 241, 232, 0.08);
  color: #fffaf0;
}

.hero-status {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  max-width: 380px;
  justify-self: end;
  padding: 18px;
  border: 1px solid rgba(245, 241, 232, 0.2);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-status img {
  grid-row: span 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.hero-status span,
.card-kicker,
dt,
.site-footer {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-status strong {
  display: block;
  margin-top: 4px;
  color: #fffaf0;
  font-size: 1rem;
}

.apps-section,
.events-section,
.planet-section {
  padding: clamp(58px, 9vw, 110px) clamp(18px, 5vw, 72px);
}

.apps-section {
  background: var(--bg);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

h2 {
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  text-wrap: balance;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--green) 22%, transparent), transparent 52%),
    var(--panel);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
}

.portal-card:nth-child(2) {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--gold) 24%, transparent), transparent 52%),
    var(--panel);
}

.portal-card:nth-child(3) {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brick) 24%, transparent), transparent 52%),
    var(--panel);
}

.portal-card:nth-child(4) {
  background:
    linear-gradient(160deg, rgba(245, 241, 232, 0.1), transparent 52%),
    var(--panel);
}

.portal-card strong {
  color: var(--text);
  font-size: 1.34rem;
  line-height: 1.08;
}

.portal-card span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.events-section {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 16%, transparent), transparent),
    color-mix(in srgb, var(--bg) 84%, #ffffff);
}

.events-section .planet-copy {
  max-width: 960px;
}

.planet-copy p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.metrics div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

dt,
dd {
  margin: 0;
}

dd {
  margin-top: 10px;
  color: var(--text);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.planet-section {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(215, 181, 109, 0.14), transparent 44%),
    var(--ink);
  color: #fffaf0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #0c0d0e;
}

.error-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(112px, 18vh, 168px) clamp(18px, 5vw, 72px)
    clamp(42px, 9vh, 84px);
  overflow: hidden;
  isolation: isolate;
}

.error-shell::before,
.error-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.error-shell::before {
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
}

.error-shell::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.9), rgba(8, 9, 10, 0.42) 58%, rgba(8, 9, 10, 0.78)),
    linear-gradient(0deg, rgba(16, 17, 19, 0.96), rgba(16, 17, 19, 0.22) 46%);
}

:root[data-theme="day"] .error-shell::after {
  background:
    linear-gradient(90deg, rgba(18, 21, 17, 0.82), rgba(18, 21, 17, 0.26) 58%, rgba(18, 21, 17, 0.68)),
    linear-gradient(0deg, rgba(19, 23, 19, 0.92), rgba(19, 23, 19, 0.16) 46%);
}

.error-panel {
  max-width: 760px;
}

.error-panel h1 {
  max-width: 10ch;
  color: #fffaf0;
}

.error-panel p:not(.eyebrow) {
  max-width: 620px;
  margin: 28px 0 0;
  color: rgba(255, 250, 240, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.error-panel strong {
  color: #fffaf0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: 86svh;
  }

  .hero-status {
    justify-self: start;
  }

  .portal-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 14px;
    gap: 12px;
  }

  .brand span {
    max-width: 128px;
  }

  .hero {
    min-height: 84svh;
    padding: 112px 16px 38px;
  }

  h1 {
    font-size: clamp(3.25rem, 21vw, 5.6rem);
  }

  .hero-lede {
    margin-top: 20px;
  }

  .hero-actions,
  .contact-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .hero-status {
    width: 100%;
    grid-template-columns: 58px 1fr;
    gap: 12px;
  }

  .hero-status img {
    width: 58px;
    height: 58px;
  }

  .portal-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .portal-card {
    min-height: 180px;
  }

  .planet-section,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
