/* ==========================================================================
   Swig server — design tokens
   Palette   : asphalt #0B0C10 / panel #14161C / steel #8A94A6
               ivory #F2F0EB / signal-orange #FF6A3D / amber #FFB238
   Type      : Rajdhani (display / labels) · Inter (body) · Roboto Mono (data)
   ========================================================================== */

:root {
  --asphalt: #0B0C10;
  --panel: rgba(150, 150, 150, 0.16);
  --panel-raised: rgba(170, 170, 170, 0.22);
  --panel-border: rgba(255, 255, 255, 0.14);
  --steel: #8A94A6;
  --ivory: #F2F0EB;
  --signal: #FF6A3D;
  --amber: #FFB238;

  --font-display: "Rajdhani", "Hiragino Sans", sans-serif;
  --font-metal: "Metal Mania", "Rajdhani", cursive;
  --font-body: "Inter", "Hiragino Sans", sans-serif;
  --font-mono: "Roboto Mono", monospace;

  --blood: #8A0303;
  --blood-bright: #C4110F;

  --radius-lg: 28px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(11,12,16,0.55) 0%, rgba(11,12,16,0.7) 35%, rgba(11,12,16,0.9) 100%),
    url("site-bg.png") center / cover no-repeat fixed;
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
  body { background-attachment: scroll; }
}

img, video { max-width: 100%; display: block; }

/* ============================== HERO ================================== */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--asphalt);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,12,16,0.35) 0%, rgba(11,12,16,0.55) 55%, rgba(11,12,16,0.95) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: 0.08em;
  color: var(--amber);
  text-transform: none;
}

.hero__title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(52px, 12vw, 140px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow:
    -2px -2px 0 var(--blood),
     2px -2px 0 var(--blood),
    -2px  2px 0 var(--blood),
     2px  2px 0 var(--blood),
     0 6px 0 var(--blood-bright);
}

.hero__scroll {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 8px;
  transition: color 0.25s var(--ease);
}
.hero__scroll:hover,
.hero__scroll:focus-visible { color: var(--amber); }
.hero__scroll-icon {
  width: 16px;
  height: 22px;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ============================ SERVER LIST ============================== */

.servers {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px 40px;
}

.servers__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.servers__title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow:
    -1px -1px 0 var(--blood),
     1px -1px 0 var(--blood),
    -1px  1px 0 var(--blood),
     1px  1px 0 var(--blood),
     0 4px 0 var(--blood-bright);
}

.servers__logo {
  height: clamp(76px, 12vw, 150px);
  width: auto;
  max-width: 52%;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: auto;
  transform: translateX(12px);
  filter: drop-shadow(2px 2px 0 var(--blood));
}

@media (max-width: 640px) {
  .servers__header { flex-direction: column; align-items: flex-start; }
  .servers__logo { max-width: 70%; margin-left: 0; transform: none; }
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --- one server row -------------------------------------------------- */

.server-row {
  display: grid;
  grid-template-columns: 180px 1.3fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px rgba(138, 3, 3, 0.25), 0 14px 30px rgba(0,0,0,0.35);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.server-row:hover {
  border-color: rgba(255, 106, 61, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 106, 61, 0.35), 0 14px 30px rgba(0,0,0,0.4);
}

/* car preview card — larger, more readable, and more rectangular */
.car-preview {
  position: relative;
  width: 100%;
  max-width: 170px;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ivory);
  cursor: pointer;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.car-preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.car-preview__img.is-active {
  opacity: 1;
  transform: translateX(0);
}

.car-preview__hint {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(11,12,16,0.55);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--font-mono);
  pointer-events: none;
}

/* course video panel — poster image, video plays on hover, click to join */
.course-panel {
  position: relative;
  aspect-ratio: 16 / 8;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel-raised);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  cursor: pointer;
}

.course-panel__media,
.course-panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-panel__media { transition: opacity 0.4s var(--ease); }
.course-panel__video { opacity: 0; transition: opacity 0.4s var(--ease); }
.course-panel.is-playing .course-panel__media { opacity: 0; }
.course-panel.is-playing .course-panel__video { opacity: 1; }

.course-panel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11,12,16,0.75) 0%, rgba(11,12,16,0) 45%);
  pointer-events: none;
}

.course-panel__tag {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ivory);
}
.course-panel__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}
.course-panel.is-playing .course-panel__tag::before {
  background: var(--amber);
  box-shadow: 0 0 6px 1px var(--amber);
}

.course-panel__cta {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  letter-spacing: 0.02em;
}
.course-panel:hover .course-panel__cta,
.course-panel:focus-visible .course-panel__cta { color: var(--amber); }

/* description panel */
.server-description {
  background: var(--ivory);
  color: var(--asphalt);
  border-radius: 18px;
  padding: 18px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.server-description h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--asphalt);
}
.server-description p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #3A3D45;
}

/* ============================ 3D GARAGE ================================= */

.showcase {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.showcase__header { margin-bottom: 28px; }

.showcase__title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow:
    -1px -1px 0 var(--blood),
     1px -1px 0 var(--blood),
    -1px  1px 0 var(--blood),
     1px  1px 0 var(--blood),
     0 4px 0 var(--blood-bright);
}

.viewer {
  position: relative;
  width: 100%;
  height: min(70vh, 720px);
  min-height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(170,170,170,0.18) 0%, rgba(11,12,16,0.75) 75%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
}

.viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer__prompt {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}

.viewer__load-btn {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  background: var(--panel-raised);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--blood);
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: none;
  transition: box-shadow 0.2s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.viewer__load-btn:hover,
.viewer__load-btn:focus-visible {
  color: var(--amber);
  border-color: var(--signal);
  box-shadow: 3px 3px 0 0 var(--blood-bright);
}
.viewer__load-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.viewer__prompt-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.viewer__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--steel);
}

.viewer__hint {
  margin: 12px 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--steel);
  text-align: right;
}

.viewer__credit {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--amber);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255, 178, 56, 0.7);
  transition: text-shadow 0.25s var(--ease), color 0.25s var(--ease);
}

.viewer__credit:hover,
.viewer__credit:focus-visible {
  color: var(--signal);
  text-shadow: 0 0 16px rgba(255, 106, 61, 0.9);
}

/* ============================ PILOT PROFILE ============================= */

.profile {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.profile__header { margin-bottom: 28px; }

.profile__title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 var(--blood), 0 6px 16px rgba(138, 3, 3, 0.45);
}

.profile-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 0 0 1px rgba(138, 3, 3, 0.25), 0 14px 30px rgba(0,0,0,0.35);
}

.profile-card__avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-raised);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 2px var(--blood), 0 10px 28px rgba(138, 3, 3, 0.4);
}
.profile-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-card__name {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0.02em;
  color: var(--ivory);
  text-shadow: 0 2px 0 var(--blood);
}

.profile-card__handle {
  margin: -10px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.profile-card__bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--steel);
  max-width: 62ch;
}

.profile-card__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.profile-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--panel-raised);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border);
  color: var(--steel);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.profile-social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.profile-social:hover,
.profile-social:focus-visible {
  color: var(--social-color, var(--signal));
  border-color: var(--social-color, var(--signal));
  box-shadow: 0 0 18px 1px color-mix(in srgb, var(--social-color, var(--signal)) 55%, transparent);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .profile-card {
    grid-template-columns: 1fr;
  }
  .profile-card__avatar {
    max-width: 220px;
  }
}

/* ============================== FOOTER ================================= */

.site-footer {
  padding: 40px 24px 56px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--steel);
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.7;
}

.site-footer__label {
  display: block;
}

.site-footer__handle {
  display: inline-block;
  color: #ff8ad6;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255, 138, 214, 0.65);
}

.site-footer__handle:hover,
.site-footer__handle:focus-visible {
  color: #ffb0e6;
}

/* ============================ RESPONSIVE ================================ */

@media (max-width: 860px) {
  .server-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "car"
      "course"
      "desc";
    row-gap: 14px;
  }
  .car-preview {
    grid-area: car;
    max-width: none;
    width: 100%;
  }
  .course-panel { grid-area: course; aspect-ratio: 16/9; }
  .server-description { grid-area: desc; }
}

@media (max-width: 480px) {
  .hero__scroll span { display: none; }
}