/* Toothless John fleet — cinematic coverflow hub */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Instrument+Sans:ital,wght@0,400;0,600;0,700;1,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --tj-night: #05070b;
  --tj-ink: #f3eee6;
  --tj-mist: #b8c4ce;
  --tj-amber: #f0b45a;
  --tj-amber-deep: #c47a28;
  --tj-volt: #9fd7ff;
  --tj-storm: #1a2330;
}

html, body.page-fleet {
  margin: 0;
  min-height: 100%;
  background: var(--tj-night);
  color: var(--tj-ink);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  overflow-x: hidden;
}

body.page-fleet {
  min-height: 100dvh;
}

.fleet-stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

.fleet-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(159, 215, 255, 0.16), transparent 55%),
    radial-gradient(80% 50% at 80% 90%, rgba(240, 180, 90, 0.12), transparent 50%),
    url('../../gamepicker/gamePickbackground.png') center / cover no-repeat,
    #05070b;
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.05);
  animation: fleetBgDrift 28s ease-in-out infinite alternate;
}

.fleet-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 11, 0.55) 0%, rgba(5, 7, 11, 0.2) 38%, rgba(5, 7, 11, 0.78) 100%),
    radial-gradient(ellipse at 50% 20%, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.fleet-lightning {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(60% 40% at 70% 18%, rgba(220, 240, 255, 0.55), transparent 60%);
  mix-blend-mode: screen;
  animation: fleetFlash 9.5s ease-in-out infinite;
}

@keyframes fleetBgDrift {
  from { transform: scale(1.04) translate3d(-1%, 0, 0); }
  to { transform: scale(1.08) translate3d(1.5%, -1%, 0); }
}

@keyframes fleetFlash {
  0%, 86%, 100% { opacity: 0; }
  88% { opacity: 0.55; }
  89% { opacity: 0.08; }
  91% { opacity: 0.7; }
  93% { opacity: 0; }
}

.fleet-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 0;
}

.fleet-brand-block {
  max-width: min(920px, 100%);
}

.fleet-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tj-volt);
  text-shadow: 0 0 18px rgba(159, 215, 255, 0.45);
  animation: fleetIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fleet-brand {
  margin: 0;
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tj-ink);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(240, 180, 90, 0.12);
  animation: fleetIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.fleet-tagline {
  margin: 12px 0 0;
  max-width: 34ch;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-style: italic;
  color: var(--tj-mist);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
  animation: fleetIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.fleet-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  animation: fleetIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.fleet-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.fleet-chip {
  appearance: none;
  border: 1px solid rgba(243, 238, 230, 0.22);
  background: rgba(8, 12, 18, 0.55);
  color: var(--tj-ink);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 0.78rem/1 Instrument Sans, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.fleet-chip:hover,
.fleet-chip:focus-visible {
  border-color: rgba(240, 180, 90, 0.65);
  color: var(--tj-amber);
  outline: none;
}

.fleet-premium {
  text-align: right;
  font-size: 0.78rem;
  color: var(--tj-amber);
  letter-spacing: 0.04em;
}

.fleet-unlock-btn {
  appearance: none;
  border: 1px solid rgba(240, 180, 90, 0.7);
  background: linear-gradient(180deg, #d9993d, #8a5318);
  color: #1a1006;
  font: 700 0.86rem/1 Instrument Sans, sans-serif;
  letter-spacing: 0.04em;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.fleet-unlock-btn:hover {
  filter: brightness(1.06);
}

.fleet-main {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 8px 0 18px;
  min-height: 0;
}

.fleet-carousel {
  position: relative;
  width: 100%;
  perspective: 1600px;
  outline: none;
}

.fleet-viewport {
  position: relative;
  height: clamp(320px, 54vh, 560px);
  overflow: visible;
  touch-action: pan-y;
}

.fleet-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.fleet-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 78vw);
  aspect-ratio: 16 / 10;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease,
    filter 0.55s ease;
  will-change: transform, opacity, filter;
}

.fleet-card-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  background: #0c1218;
}

.fleet-card.is-center .fleet-card-face {
  border-color: rgba(240, 180, 90, 0.55);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(240, 180, 90, 0.25),
    0 0 40px rgba(240, 180, 90, 0.12);
}

.fleet-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 0.8s ease;
}

.fleet-card.is-center .fleet-card-art {
  transform: scale(1);
}

.fleet-card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(4, 8, 12, 0.92) 100%),
    radial-gradient(80% 60% at 50% 0%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.fleet-card-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  text-align: left;
  z-index: 2;
}

.fleet-card-title {
  display: block;
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.fleet-card-copy {
  display: block;
  margin-top: 6px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.92rem, 1.6vw, 1.1rem);
  color: rgba(220, 230, 238, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.fleet-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(240, 180, 90, 0.92);
  color: #1a1006;
  font: 700 0.68rem/1 Instrument Sans, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fleet-badge.external {
  background: rgba(159, 215, 255, 0.92);
  color: #071018;
}

.fleet-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 12, 18, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.fleet-nav:hover {
  border-color: var(--tj-amber);
  color: var(--tj-amber);
}

.fleet-prev { left: max(8px, calc(50% - min(520px, 78vw) / 2 - 64px)); }
.fleet-next { right: max(8px, calc(50% - min(520px, 78vw) / 2 - 64px)); }

.fleet-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.fleet-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 0;
}

.fleet-dot.is-active {
  background: var(--tj-amber);
  box-shadow: 0 0 12px rgba(240, 180, 90, 0.55);
}

.fleet-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  padding: 0 16px;
}

.fleet-play {
  appearance: none;
  min-width: min(280px, 86vw);
  border: 0;
  border-radius: 16px;
  padding: 16px 28px;
  font-family: 'Archivo Black', Impact, sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #140d05;
  background: linear-gradient(180deg, #ffd089, #d18a2e 55%, #9a5a16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(240, 180, 90, 0.2);
  cursor: pointer;
  animation: fleetPulse 2.8s ease-in-out infinite;
}

.fleet-play:hover {
  filter: brightness(1.05);
}

.fleet-hint {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(184, 196, 206, 0.85);
}

.fleet-foot {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  padding: 0 16px max(18px, env(safe-area-inset-bottom));
  color: rgba(184, 196, 206, 0.8);
  font-size: 0.8rem;
}

.fleet-foot a {
  color: var(--tj-amber);
  text-decoration: none;
}

.fleet-foot a:hover {
  text-decoration: underline;
}

@keyframes fleetIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fleetPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(240, 180, 90, 0.18); }
  50% { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(0, 0, 0, 0.45), 0 0 40px rgba(240, 180, 90, 0.28); }
}

@media (max-width: 720px) {
  .fleet-top {
    flex-direction: column;
    align-items: stretch;
  }
  .fleet-top-actions {
    align-items: stretch;
  }
  .fleet-chip-row {
    justify-content: flex-start;
  }
  .fleet-premium,
  .fleet-unlock-btn {
    text-align: left;
    width: 100%;
  }
  .fleet-nav {
    width: 40px;
    height: 40px;
  }
  .fleet-prev { left: 6px; }
  .fleet-next { right: 6px; }
  .fleet-viewport {
    height: clamp(280px, 48vh, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fleet-bg,
  .fleet-lightning,
  .fleet-play,
  .fleet-card,
  .fleet-card-art {
    animation: none !important;
    transition: none !important;
  }
}
