/* ==========================================================================
   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: #14161C;
  --panel-raised: #1B1E26;
  --steel: #8A94A6;
  --ivory: #F2F0EB;
  --signal: #FF6A3D;
  --amber: #FFB238;

  --font-display: "Rajdhani", "Hiragino Sans", sans-serif;
  --font-body: "Inter", "Hiragino Sans", sans-serif;
  --font-mono: "Roboto Mono", monospace;

  --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;
  background: var(--asphalt);
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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-display);
  font-weight: 700;
  font-size: clamp(48px, 11vw, 128px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.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 { margin-bottom: 56px; }

.servers__eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.servers__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --- one server row -------------------------------------------------- */

.server-row {
  display: grid;
  grid-template-columns: 180px 100px 1.3fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
}

/* 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;
}

/* server label */
.server-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ivory);
  text-align: center;
  text-transform: uppercase;
}
.server-label span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.06em;
}

/* 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);
  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;
}

/* ============================== 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: 150px 1fr;
    grid-template-areas:
      "car   label"
      "course course"
      "desc   desc";
    row-gap: 14px;
  }
  .car-preview {
    grid-area: car;
    max-width: none;
    width: 100%;
  }
  .server-label { grid-area: label; text-align: left; }
  .course-panel { grid-area: course; aspect-ratio: 16/9; }
  .server-description { grid-area: desc; }
}

@media (max-width: 480px) {
  .hero__scroll span { display: none; }
}