@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@400;700&display=swap");

:root {
  --bg: #050505;
  --panel: rgba(10, 10, 10, 0.84);
  --panel-strong: rgba(14, 14, 14, 0.96);
  --line: #2a2a2a;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f2eee7;
  --text-dim: #9b948c;
  --text-muted: #6f6963;
  --accent: #ff2a2a;
  --accent-soft: rgba(255, 42, 42, 0.18);
  --accent-glow: rgba(255, 42, 42, 0.32);
  --scroll-track: rgba(8, 8, 8, 0.92);
  --scroll-thumb: linear-gradient(180deg, #7a1d1d 0%, #ff2a2a 100%);
  --scroll-thumb-hover: linear-gradient(180deg, #a72323 0%, #ff4b4b 100%);
  --serif: "Playfair Display", Georgia, serif;
  --mono: "Rethink Sans", "Inter", Arial, sans-serif;
  --sans: Inter, Arial, sans-serif;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #9f2323 var(--scroll-track);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 42, 42, 0.1), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 42, 42, 0.08), transparent 30%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 45%, #020202 100%);
  font-family: var(--sans);
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--scroll-track);
  border-left: 1px solid rgba(255, 42, 42, 0.08);
}

body::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 3px solid var(--scroll-track);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 12px rgba(255, 42, 42, 0.18);
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(255, 42, 42, 0.28);
}

body::-webkit-scrollbar-corner {
  background: var(--scroll-track);
}

.serif {
  font-family: var(--serif);
}

.mono {
  font-family: var(--mono);
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.75;
}

.ambient-top {
  top: -12vh;
  left: 10vw;
  width: 56vw;
  height: 34vh;
  background: rgba(255, 42, 42, 0.12);
  animation: driftA 20s ease-in-out infinite;
}

.ambient-bottom {
  right: -12vw;
  bottom: -14vh;
  width: 42vw;
  height: 38vh;
  background: rgba(255, 42, 42, 0.08);
  animation: driftB 24s ease-in-out infinite reverse;
}

.noise-overlay,
.grid-overlay,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise-overlay {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: soft-light;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: min(9vw, 70px) min(9vw, 70px);
  mask-image: radial-gradient(circle at center, black 36%, transparent 90%);
  opacity: 0.3;
}

.scanline {
  background: linear-gradient(to bottom, transparent, rgba(255, 42, 42, 0.12), transparent);
  height: 22vh;
  animation: scan 7s linear infinite;
}

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  transition: background-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
}

.hud.scrolled {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.hud-block {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hud-left strong,
.hud-right strong {
  color: var(--text);
  font-weight: 600;
}

.hud-center {
  justify-content: center;
  color: var(--accent);
}

.hud-right {
  justify-content: flex-end;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: blink 1.4s ease-in-out infinite;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 7.5rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

.maintenance-card {
  position: relative;
  width: min(100%, 980px);
  padding: clamp(1.4rem, 2vw, 2rem);
  margin: auto 0;
  border: 1px solid rgba(255, 42, 42, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 42, 42, 0.06), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.maintenance-card::before,
.maintenance-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.maintenance-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 42, 42, 0.12), transparent);
  width: 40%;
  transform: skewX(-22deg) translateX(-180%);
  animation: cardSweep 8s linear infinite;
}

.maintenance-card::after {
  border: 1px solid rgba(255, 255, 255, 0.04);
  inset: 10px;
}

.card-corners span {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.7;
}

.card-corners span:nth-child(1) {
  top: 12px;
  left: 12px;
  border-width: 1px 0 0 1px;
}

.card-corners span:nth-child(2) {
  top: 12px;
  right: 12px;
  border-width: 1px 1px 0 0;
}

.card-corners span:nth-child(3) {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 1px 1px;
}

.card-corners span:nth-child(4) {
  right: 12px;
  bottom: 12px;
  border-width: 0 1px 1px 0;
}

.card-head,
.card-footer {
  position: relative;
  z-index: 1;
}

.eyebrow,
.kicker,
.panel-label,
.footer-note,
.contact-link,
.terminal-head,
.terminal-pill,
.hud,
.status-meta,
#terminalFeed {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
}

.divider {
  width: 100%;
  height: 1px;
  margin-top: 0.95rem;
  background: linear-gradient(90deg, rgba(255, 42, 42, 0.6), rgba(255, 255, 255, 0.06));
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.85rem;
  padding: clamp(2rem, 4vw, 4rem) 0 2rem;
}

.kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.title {
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 6.8rem);
  line-height: 0.9;
  font-weight: 600;
  letter-spacing: -0.04em;
  max-width: 8ch;
}

.title span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 238, 231, 0.92);
  text-shadow: 0 0 24px rgba(255, 42, 42, 0.12);
}

.subtitle {
  margin: 0;
  max-width: 42rem;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.8;
}

.status-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 1rem;
  margin-top: 1rem;
}

.status-copy,
.status-meta,
.terminal {
  border: 1px solid var(--line-soft);
  background: rgba(4, 4, 4, 0.58);
}

.status-copy {
  padding: 1.2rem 1.25rem;
}

.status-copy p:last-child {
  margin: 0.5rem 0 0;
  color: var(--text-dim);
  line-height: 1.75;
}

.panel-label {
  margin: 0;
  font-size: 0.7rem;
  color: var(--accent);
}

.status-meta {
  display: grid;
  gap: 0;
}

.status-meta div {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}

.status-meta div:last-child {
  border-bottom: 0;
}

.status-meta span {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.status-meta strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.terminal {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  overflow: hidden;
}

.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 42, 42, 0.04), transparent);
  pointer-events: none;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 0.72rem;
}

.terminal-pill {
  color: var(--accent);
}

.terminal-body {
  min-height: 172px;
  padding: 1rem 1.1rem 1.2rem;
  color: #cfc8be;
  font-size: 0.8rem;
  line-height: 1.9;
}

.terminal-body p {
  margin: 0;
}

.terminal-body p + p {
  margin-top: 0.35rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.contact-link,
.ceo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(255, 42, 42, 0.36);
  color: var(--text);
  font-size: 0.72rem;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible,
.ceo-link:hover,
.ceo-link:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 42, 42, 0.18);
  transform: translateY(-1px);
  outline: none;
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes scan {
  0% {
    transform: translateY(-140%);
  }
  100% {
    transform: translateY(520%);
  }
}

@keyframes driftA {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(28px, -20px) scale(1.04);
  }
  66% {
    transform: translate(-16px, 18px) scale(0.96);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-20px, -18px) scale(1.03);
  }
  66% {
    transform: translate(22px, 14px) scale(0.97);
  }
}

@keyframes cardSweep {
  0% {
    transform: skewX(-22deg) translateX(-180%);
  }
  100% {
    transform: skewX(-22deg) translateX(420%);
  }
}

@media (max-width: 840px) {
  .hud {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.45rem;
    padding-bottom: 0.75rem;
  }

  .hud-center,
  .hud-right {
    justify-content: flex-start;
  }

  .page-shell {
    align-items: start;
    padding-top: 9.25rem;
  }

  .status-panel {
    grid-template-columns: 1fr;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-actions {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
  }

  .contact-link,
  .ceo-link {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .maintenance-card {
    padding: 1rem;
  }

  .maintenance-card::after {
    inset: 7px;
  }

  .title {
    font-size: clamp(2rem, 12vw, 3.3rem);
    max-width: 100%;
  }

  .title span {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px rgba(242, 238, 231, 0.92);
    text-shadow: 0 0 24px rgba(255, 42, 42, 0.12);
    white-space: nowrap;
  }

  .subtitle {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .status-meta div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--line-soft);
    align-items: center;
  }

  .status-meta span {
    font-size: 0.6rem;
  }

  .status-meta strong {
    font-size: 0.7rem;
    text-align: right;
    white-space: nowrap;
  }

  .terminal-body {
    min-height: 190px;
    font-size: 0.75rem;
  }
}

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