@font-face {
  font-family: "Orbitron";
  src: url("/assets/orbitron.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400 900;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/ibm-plex-sans.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400 700;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/ibm-plex-sans-italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/ibm-plex-mono.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400 600;
}

:root {
  color-scheme: dark;
  --ember: #c33a26;
  --ember-bright: #e14b31;
  --page: #160505;
  --surface: #211010;
  --surface-hover: #2a1413;
  --text: #f1edeb;
  --text-secondary: #b8aaa5;
  --text-muted: #7d6b67;
  --border: #452521;
  --display: "Orbitron", ui-sans-serif, system-ui, sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ember);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  transform: translateY(-200%);
}

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

.js body:not(.site-entered) .skip-link {
  display: none;
}

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

.no-js .splash {
  display: none;
}

.splash {
  --cursor-x: 0;
  --cursor-y: 0;
  --proximity: 0;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  padding: 0;
  border: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  background:
    radial-gradient(circle at 50% 42%, rgba(77, 18, 16, 0.66) 0, rgba(22, 5, 5, 0) 48%),
    var(--page);
  color: var(--text);
  opacity: 1;
  transition: opacity 700ms var(--ease-out), visibility 700ms;
}

.splash.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__glow,
.hero__glow {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(36rem, 86vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(195, 58, 38, 0.48) 0, rgba(195, 58, 38, 0) 67%);
  pointer-events: none;
  animation: glow 3.5s ease-in-out infinite;
}

.splash__glow {
  transform: translate(-50%, -50%)
    translate(calc(var(--cursor-x) * 0.9rem), calc(var(--cursor-y) * 0.9rem))
    scale(calc(1 + var(--proximity) * 0.16));
}

.splash__mark {
  position: relative;
  display: block;
  width: clamp(12rem, 24vw, 18.75rem);
  aspect-ratio: 1;
  perspective: 37.5rem;
  transform:
    translate(calc(var(--cursor-x) * 0.32rem), calc(var(--cursor-y) * 0.32rem))
    scale(calc(1 + var(--proximity) * 0.05));
  transition: transform 350ms var(--ease-out);
}

.splash__mark img,
.hero__mark img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: breathe 3.5s ease-in-out infinite;
}

.splash:hover .splash__mark,
.splash:focus-visible .splash__mark {
  transform:
    translate(calc(var(--cursor-x) * 0.32rem), calc(var(--cursor-y) * 0.32rem))
    scale(calc(1.06 + var(--proximity) * 0.05));
}

.splash:active .splash__mark {
  transform:
    translate(calc(var(--cursor-x) * 0.32rem), calc(var(--cursor-y) * 0.32rem))
    scale(calc(0.96 + var(--proximity) * 0.03));
}

.splash:focus-visible {
  outline: 2px solid var(--ember-bright);
  outline-offset: -10px;
}

.splash__prompt {
  position: absolute;
  bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: creed-in 2s var(--ease-out) 900ms both;
}

.site.is-hidden,
.js .footer.is-hidden {
  display: none;
}

.site.is-entering {
  animation: fade-up 900ms var(--ease-out) both;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(6rem, 12vw, 10rem) 1.5rem clamp(4rem, 8vw, 7rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(86, 21, 18, 0.62) 0, rgba(22, 5, 5, 0) 54%),
    var(--page);
}

.hero__mark {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1.5rem;
}

.hero__glow {
  top: 50%;
  width: 13.75rem;
  transform: translate(-50%, -50%);
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5.25rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.hero__creed {
  margin: 0.9rem 0 0;
  color: var(--ember-bright);
  font-family: var(--display);
  font-size: clamp(0.68rem, 1.6vw, 0.82rem);
  font-weight: 500;
  letter-spacing: clamp(0.18em, 0.8vw, 0.32em);
  text-transform: uppercase;
}

.manifesto {
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  background: var(--page);
}

.manifesto__inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.section-rule {
  display: block;
  width: 2.5rem;
  margin: 0 auto 1.5rem;
  border-top: 2px solid var(--ember);
  box-shadow: 0 0 12px rgba(195, 58, 38, 0.65);
}

.manifesto p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 500;
  line-height: 1.7;
}

.manifesto em {
  color: var(--ember-bright);
  font-style: italic;
}

.capabilities {
  padding: clamp(4rem, 8vw, 6rem) 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.section-shell {
  max-width: 72rem;
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 2.5rem;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(195, 58, 38, 0.56);
  border-radius: 2px;
  background: rgba(195, 58, 38, 0.09);
  color: var(--ember-bright);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.capability-card {
  min-height: 14rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(22, 5, 5, 0.72);
  transition: border-color 250ms var(--ease-standard), background 250ms var(--ease-standard), transform 250ms var(--ease-standard), box-shadow 250ms var(--ease-standard);
}

.capability-card:hover {
  border-color: rgba(195, 58, 38, 0.62);
  background: var(--surface-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24), 0 0 20px rgba(195, 58, 38, 0.1);
  transform: translateY(-4px);
}

.capability-card__icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--ember-bright);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capability-card h3 {
  margin: 1rem 0 0.65rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.capability-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer {
  padding: 2rem 1rem;
  border-top: 2px solid var(--ember);
  background: var(--page);
  box-shadow: 0 -1px 20px rgba(195, 58, 38, 0.28);
  color: var(--text-secondary);
  text-align: center;
}

.footer p {
  margin: 0.15rem 0;
  font-size: 0.88rem;
}

.footer a {
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--ember-bright);
  text-decoration-color: currentColor;
}

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}

.reveal.is-visible,
.no-js .reveal {
  opacity: 1;
  transform: translateY(0);
}

@keyframes breathe {
  0%, 100% {
    opacity: 0.56;
    filter: drop-shadow(0 0 10px rgba(195, 58, 38, 0.42));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 30px rgba(225, 75, 49, 0.78));
  }
}

@keyframes glow {
  0%, 100% {
    opacity: 0.34;
  }
  50% {
    opacity: 0.76;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes creed-in {
  from {
    opacity: 0;
    letter-spacing: 0.08em;
  }
  to {
    opacity: 0.88;
    letter-spacing: 0.18em;
  }
}

@media (max-width: 50rem) {
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-card {
    min-height: 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  .splash__glow {
    width: min(34rem, 120vw);
  }

  .splash__mark {
    width: clamp(14rem, 68vw, 18.75rem);
  }

  .splash__mark img {
    animation:
      breathe 3.5s ease-in-out infinite,
      touch-drift 7s ease-in-out infinite;
  }
}

@keyframes touch-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  33% {
    transform: translate3d(4px, -3px, 0) rotate(0.6deg);
  }
  66% {
    transform: translate3d(-4px, 3px, 0) rotate(-0.6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
