:root {
  color-scheme: dark;
  --bg: #0d1114;
  --text: #f4f2ed;
  --muted: #aeb8c2;
  --panel: #151b1f;
  --panel-raised: #1b2328;
  --line: #34414a;
  --orange: #ff7652;
  --teal: #91b9b7;
  --max-width: 70rem;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 118, 82, 0.08), transparent 29rem),
    linear-gradient(135deg, transparent 0 74%, rgba(174, 184, 194, 0.025) 74% 74.2%, transparent 74.2%),
    var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(174, 184, 194, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(174, 184, 194, 0.035) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
  content: "";
}

a {
  color: inherit;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.5rem 0 1.25rem;
  display: flex;
  flex-direction: column;
}

.masthead,
.footer,
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead {
  border-bottom: 1px solid rgba(52, 65, 74, 0.75);
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-flex;
  align-items: end;
  gap: 0.18rem;
  height: 1.2rem;
  padding: 0.2rem;
  border: 1px solid var(--orange);
  transform: skew(-14deg);
}

.brand-mark span {
  display: block;
  width: 0.18rem;
  background: var(--orange);
}

.brand-mark span:nth-child(1) { height: 0.42rem; }
.brand-mark span:nth-child(2) { height: 0.7rem; }
.brand-mark span:nth-child(3) { height: 0.95rem; }

.status,
.eyebrow,
.section-kicker,
.mode-type,
.mode-index,
.footer {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 118, 82, 0.1);
}

.intro {
  max-width: 43rem;
  padding: clamp(4.5rem, 13vw, 9rem) 0 clamp(3.25rem, 8vw, 5.75rem);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--orange);
  font-weight: 700;
}

.eyebrow span {
  margin: 0 0.45rem;
  color: var(--line);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

h1 em {
  color: var(--orange);
  font-family: Georgia, serif;
  font-weight: 400;
}

.lede {
  max-width: 29rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

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

.mode-card {
  position: relative;
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 1.35rem;
  background: linear-gradient(145deg, var(--panel-raised), var(--panel));
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.mode-card::after {
  position: absolute;
  right: -2.5rem;
  bottom: -3.5rem;
  width: 11rem;
  height: 11rem;
  border: 1px solid rgba(255, 118, 82, 0.2);
  border-radius: 50%;
  content: "";
}

.mode-card.defense::after {
  right: -4rem;
  border-color: rgba(145, 185, 183, 0.2);
}

.mode-card:hover {
  border-color: var(--orange);
  background: linear-gradient(145deg, #202a2f, var(--panel));
  transform: translateY(-0.25rem);
}

.mode-card.defense:hover {
  border-color: var(--teal);
}

.mode-card:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.mode-card.defense:focus-visible {
  outline-color: var(--teal);
}

.mode-index {
  color: var(--orange);
}

.defense .mode-index {
  color: var(--teal);
}

.mode-type {
  font-size: 0.58rem;
}

.mode-content {
  position: relative;
  z-index: 1;
  max-width: 23rem;
  margin: 3rem 0;
}

.mode-content h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.mode-content p {
  max-width: 20rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.open-brief {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 0.25rem;
  color: var(--text);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.open-brief span {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--orange);
  transition: transform 180ms ease;
}

.mode-card:hover .open-brief span {
  transform: translate(0.2rem, -0.2rem);
}

.defense .open-brief {
  border-color: var(--teal);
}

.defense .open-brief span {
  color: var(--teal);
}

.footer {
  margin-top: auto;
  padding-top: 4rem;
  font-size: 0.58rem;
}

@media (max-width: 38rem) {
  .shell {
    width: min(calc(100% - 2rem), var(--max-width));
    padding-top: 1rem;
  }

  .status {
    font-size: 0.55rem;
  }

  .intro {
    padding-top: 4.75rem;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .section-heading {
    display: block;
  }

  .section-kicker {
    margin-bottom: 0.35rem;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 16rem;
  }

  .mode-content {
    margin: 2rem 0;
  }

  .footer {
    padding-top: 3rem;
  }
}

@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;
  }
}
