/* ==========================================================================
   Island Engines — Official Website Stylesheet
   Bold, Authentic, Playful Sodor Community Aesthetic!
   Heavy borders, 3D pop shadows, Flange / Titan typography, and entrance animations.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Bevan:ital@0;1&family=Fredoka:wght@600;700;800&family=Plus+Jakarta+Sans:wght@500;700;800&family=Titan+One&display=swap');

:root {
  /* Playful Nostalgic Sodor Palette */
  --bg-canvas: #060911;
  --bg-surface: #0d1527;
  --bg-surface-elevated: #15223c;
  --bg-card: #101a2f;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Bold Theme Colors */
  --color-gold-bright: #ffde59;
  --color-brass: #f59e0b;
  --color-coastal-blue: #38bdf8;
  --color-sodor-blue: #0284c7;
  --color-signal-red: #ef4444;
  --color-signal-green: #10b981;
  
  /* Chunky Typography */
  --font-display: 'Titan One', 'Alfa Slab One', 'Bevan', 'Cooper Black', fantasy, cursive;
  --font-heading: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  
  /* Chunky Radii */
  --radius-card: 18px;
  --radius-pill: 9999px;
  --radius-btn: 12px;
  
  /* Full Widescreen PC View */
  --max-width: 1760px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent content shift when scrollbar appears/disappears between pages */
html {
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg-canvas);
  background-image: 
    url('assets/images/mainline-connor-express.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Dark cinematic overlay on top of the background photo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(2, 132, 199, 0.10), transparent 70%),
    radial-gradient(circle at 100% 30%, rgba(245, 158, 11, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(6, 9, 17, 0.86) 0%, rgba(5, 8, 15, 0.94) 60%);
}

/* Ensure all content sits above the overlay */
body > * {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   AI Transparency Bar (Dismissible with LocalStorage Persistence)
   ========================================================================== */
html.hide-ai-notice .ai-notice-bar {
  display: none !important;
}

.ai-notice-bar {
  background: #080d1a;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding: 8px 48px 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease;
}

.ai-notice-bar.is-dismissed {
  display: none !important;
}

.ai-notice-bar span {
  color: var(--color-coastal-blue);
  font-weight: 800;
}

.ai-notice-dismiss {
  position: absolute;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  transition: all 0.2s ease;
}

.ai-notice-dismiss:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: scale(1.08);
}

/* ==========================================================================
   Widescreen Container (PC Widescreen Responsive)
   ========================================================================== */
.container {
  width: 96%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   Unified Top Navbar (Bold, Chunky, Consistent Across All Pages)
   ========================================================================== */
.site-nav-header {
  background: #091022;
  border-bottom: 4px solid var(--color-brass);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 6px 0 #000, 0 12px 28px rgba(0, 0, 0, 0.7);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.studio-brand:hover {
  transform: scale(1.04);
}

.studio-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--color-brass);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 0 #000, 0 6px 14px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.studio-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-title-box h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--color-gold-bright);
  line-height: 1.1;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000;
}

.studio-title-box p {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-coastal-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-item {
  color: #cbd5e1;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Active tab style with retro 3D pop */
.nav-item.active {
  background: var(--color-gold-bright);
  color: #000 !important;
  border: 2px solid #000;
  box-shadow: 0 4px 0 #000;
  transform: translateY(-2px);
  font-weight: 900;
}

.nav-item.credits-btn {
  margin-left: 6px;
}

/* ==========================================================================
   Page Entrance Keyframes Animations ("die Seite baut sich so auf")
   ========================================================================== */
@keyframes popInBounce {
  0% {
    opacity: 0;
    transform: scale(0.65) translateY(40px);
  }
  65% {
    opacity: 1;
    transform: scale(1.06) translateY(-8px);
  }
  85% {
    transform: scale(0.97) translateY(3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes titleDropIn {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateY(4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardStagger {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes roundelGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 5px #000, 0 0 25px rgba(255, 222, 89, 0.45), 0 10px 30px rgba(0, 0, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 5px #000, 0 0 45px rgba(255, 222, 89, 0.8), 0 14px 40px rgba(0, 0, 0, 0.9);
  }
}

/* ==========================================================================
   Authentic Community Centerpiece Hero (Full First-View Desktop Framing)
   ========================================================================== */
.community-hero {
  position: relative;
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  background-image: 
    radial-gradient(ellipse at center, rgba(13, 21, 39, 0.45) 0%, rgba(6, 9, 17, 0.92) 100%),
    linear-gradient(180deg, rgba(8, 14, 28, 0.4) 0%, rgba(6, 10, 20, 0.96) 100%),
    url('assets/images/hero-spencer-mainline.jpg');
  background-size: cover;
  background-position: center 32%;
  border: 4px solid var(--color-brass);
  border-radius: var(--radius-card);
  padding: 48px 24px 36px 24px;
  margin-top: 16px;
  margin-bottom: 56px;
  text-align: center;
  box-shadow: 0 10px 0 #000, 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: popInBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.community-crest-badge {
  position: relative;
  margin-bottom: 18px;
  animation: titleDropIn 0.6s ease both;
}

.crest-inner-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #000;
  border: 5px solid var(--color-gold-bright);
  box-shadow: 0 0 0 4px #000, 0 0 30px rgba(255, 222, 89, 0.5), 0 8px 20px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: roundelGlowPulse 4s infinite ease-in-out;
}

.crest-loco-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.community-welcome-tag {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000;
  margin-bottom: 6px;
  animation: titleDropIn 0.7s ease both 0.15s;
}

.community-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: 0.02em;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000, 6px 6px 0 #000;
  margin-bottom: 12px;
  line-height: 1.05;
  animation: titleDropIn 0.8s ease both 0.25s;
}

.community-hero-title span {
  color: var(--color-coastal-blue);
  text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000, 6px 6px 0 #000;
}

.community-hero-sub {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 2px 2px 0 #000, 0 4px 12px rgba(0, 0, 0, 0.8);
  max-width: 720px;
  margin-bottom: 32px;
  animation: titleDropIn 0.9s ease both 0.35s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: slideInUp 0.8s ease both 0.45s;
}

.hero-scroll-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-top: 40px;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.hero-scroll-btn:hover {
  color: var(--color-gold-bright);
  opacity: 1;
  transform: translateY(3px);
}

.hero-scroll-btn svg {
  animation: scrollBounce 2s infinite ease-in-out;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(6px); }
  60% { transform: translateY(3px); }
}

/* 3D Chunky Pop Buttons */
.btn-hero-primary {
  background: var(--color-gold-bright);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  border: 3px solid #000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 0 #000, 0 10px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.btn-hero-primary:hover {
  background: #fde047;
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #000, 0 14px 24px rgba(255, 222, 89, 0.3);
}

.btn-hero-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #000;
}

.btn-hero-secondary {
  background: var(--color-sodor-blue);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 13px 26px;
  border-radius: var(--radius-btn);
  border: 3px solid #000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 0 #000, 0 10px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.btn-hero-secondary:hover {
  background: #0284c7;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #000, 0 14px 24px rgba(56, 189, 248, 0.3);
}

.btn-hero-secondary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #000;
}

/* ==========================================================================
   Section Headings (Chunky Titan Typography)
   ========================================================================== */
.content-section {
  margin-bottom: 56px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.15rem;
  letter-spacing: 0.02em;
  color: var(--color-gold-bright);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 4px 4px 0 #000;
  margin-bottom: 6px;
}

.section-subtitle {
  font-family: var(--font-heading);
  color: #cbd5e1;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ==========================================================================
   Episode Showcase Card
   ========================================================================== */
.episode-card {
  background: var(--bg-surface);
  border: 4px solid #1e293b;
  border-radius: var(--radius-card);
  padding: 36px;
  box-shadow: 0 8px 0 #000, 0 16px 36px rgba(0, 0, 0, 0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: slideInUp 0.6s ease both 0.2s;
}

.episode-card:hover {
  border-color: var(--color-brass);
  box-shadow: 0 10px 0 #000, 0 20px 40px rgba(0, 0, 0, 0.6);
}

.ep-banner-preview {
  position: relative;
  width: 100%;
  max-height: 480px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  border: 3px solid #000;
  box-shadow: 0 8px 0 #000, 0 14px 30px rgba(0, 0, 0, 0.5);
  background: #000;
  cursor: pointer;
}

.ep-banner-img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.ep-banner-preview:hover .ep-banner-img {
  transform: scale(1.03);
}

.ep-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 10, 20, 0.95) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ep-banner-badge {
  background: var(--color-gold-bright);
  color: #000;
  border: 2px solid #000;
  box-shadow: 0 3px 0 #000;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}

.ep-banner-hint {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-coastal-blue);
  text-shadow: 1px 1px 0 #000;
}

.ep-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ep-num-tag {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-coastal-blue);
  letter-spacing: 0.08em;
}

.ep-status-pill {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-brass);
  border: 2px solid var(--color-brass);
  box-shadow: 0 2px 0 #000;
}

.ep-main-title {
  font-family: var(--font-display);
  font-size: 2.3rem;
  color: var(--color-gold-bright);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 4px 4px 0 #000;
  margin-bottom: 6px;
}

.ep-route-trail {
  font-family: var(--font-heading);
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-route-trail span {
  color: #e2e8f0;
}

.ep-story-text {
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.7;
  margin-bottom: 24px;
}

.ep-cast-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.cast-badge {
  background: #15223c;
  border: 2px solid #273859;
  box-shadow: 0 2px 0 #000;
  color: #f1f5f9;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Production Stills Gallery
   ========================================================================== */
.gallery-section-wrap {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 3px solid rgba(255, 255, 255, 0.1);
}

.gallery-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--color-gold-bright);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 3px 3px 0 #000;
}

.gallery-subtitle {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-surface-elevated);
  border: 3px solid #233454;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 5px 0 #000, 0 10px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--color-gold-bright);
  box-shadow: 0 10px 0 #000, 0 16px 30px rgba(255, 222, 89, 0.2);
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 2px solid #000;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.08);
}

.gallery-zoom-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-gold-bright);
  border: 2px solid #000;
  box-shadow: 0 2px 0 #000;
  color: #000;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-card:hover .gallery-zoom-badge {
  opacity: 1;
  transform: translateY(0);
}

.gallery-info {
  padding: 14px 16px;
}

.gallery-scene-tag {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-coastal-blue);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.gallery-label {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.3;
}

/* ==========================================================================
   Quick Navigation Hub Grid (Widescreen 4-Across PC Layout)
   ========================================================================== */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.hub-card {
  background: var(--bg-surface);
  border: 4px solid #1e293b;
  border-radius: var(--radius-card);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 0 #000, 0 12px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--color-gold-bright);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 0 #000, 0 20px 36px rgba(255, 222, 89, 0.25);
}

.hub-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hub-icon {
  font-size: 2.2rem;
}

.hub-arrow {
  color: var(--color-gold-bright);
  font-size: 1.6rem;
  font-weight: 900;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-card:hover .hub-arrow {
  transform: translateX(6px) scale(1.2);
}

.hub-card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--color-gold-bright);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 2px 2px 0 #000;
  margin-bottom: 8px;
}

.hub-card-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* ==========================================================================
   Community Directory Grid (Workshops)
   ========================================================================== */
.directory-search-bar {
  margin-bottom: 30px;
}

.directory-input {
  width: 100%;
  background: var(--bg-surface);
  border: 3px solid #273859;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: 0 4px 0 #000, 0 8px 18px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.directory-input:focus {
  outline: none;
  border-color: var(--color-gold-bright);
  box-shadow: 0 6px 0 #000, 0 0 20px rgba(255, 222, 89, 0.3);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.directory-card {
  background: var(--bg-surface);
  border: 3px solid #1e293b;
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 0 #000, 0 10px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.directory-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--color-coastal-blue);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 0 #000, 0 18px 30px rgba(56, 189, 248, 0.25);
}

.dir-top-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.dir-icon-avatar {
  width: 52px;
  height: 52px;
  background: #15223c;
  border: 2px solid #273859;
  border-radius: 12px;
  box-shadow: 0 3px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
}

.dir-icon-avatar.has-logo {
  background: #080d19;
  border-color: var(--color-brass);
  padding: 4px;
}

.dir-site-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dir-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.dir-tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-brass);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.dir-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

.dir-footer-action {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--color-coastal-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* ==========================================================================
   Tools & Downloads Grid
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
}

.tool-box {
  background: var(--bg-surface);
  border: 4px solid #1e293b;
  border-radius: var(--radius-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 0 #000, 0 12px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-box:hover {
  border-color: var(--color-brass);
  transform: translateY(-6px);
  box-shadow: 0 12px 0 #000, 0 18px 30px rgba(245, 158, 11, 0.2);
}

.tool-feature-check {
  list-style: none;
  margin: 20px 0 26px 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.tool-feature-check li {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ==========================================================================
   Socials Section
   ========================================================================== */
.socials-section {
  background: var(--bg-surface);
  border: 4px solid #1e293b;
  border-radius: var(--radius-card);
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 48px;
  box-shadow: 0 6px 0 #000, 0 12px 24px rgba(0, 0, 0, 0.4);
}

.socials-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-gold-bright);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000;
  margin-bottom: 8px;
}

.socials-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.05rem;
  border: 3px solid #000;
  box-shadow: 0 5px 0 #000, 0 8px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-youtube {
  background: #ff0000;
  color: #fff;
}

.social-youtube:hover {
  background: #e60000;
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #000, 0 12px 20px rgba(255, 0, 0, 0.4);
}

.social-youtube:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #000;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.94);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox-backdrop.open {
  display: flex;
  opacity: 1;
}

.lightbox-dialog {
  position: relative;
  max-width: 1400px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 4px solid var(--color-gold-bright);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 10px 0 #000, 0 24px 60px rgba(0, 0, 0, 0.8);
  animation: popInBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ef4444;
  border: 3px solid #000;
  box-shadow: 0 3px 0 #000;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-close:hover {
  background: #dc2626;
  transform: rotate(90deg) scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 3px solid var(--color-gold-bright);
  box-shadow: 0 4px 0 #000, 0 6px 16px rgba(0, 0, 0, 0.6);
  color: var(--color-gold-bright);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  line-height: 1;
  padding-bottom: 5px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-nav-btn:hover {
  background: var(--color-gold-bright);
  color: #000;
  border-color: #000;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 6px 0 #000, 0 10px 24px rgba(255, 222, 89, 0.35);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
  box-shadow: 0 2px 0 #000;
}

@media (max-width: 768px) {
  .lightbox-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
    padding-bottom: 3px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

.lightbox-media-box {
  width: 100%;
  max-height: calc(94vh - 80px);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-media-box img {
  width: 100%;
  height: auto;
  max-height: calc(94vh - 80px);
  object-fit: contain;
  display: block;
}

.lightbox-caption-text {
  padding: 16px 24px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  background: var(--bg-surface);
  border-top: 3px solid #000;
  line-height: 1.5;
}

.lightbox-caption-text:empty {
  display: none;
  padding: 0;
  border-top: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.studio-footer {
  background: #04070e;
  border-top: 4px solid var(--color-brass);
  padding: 40px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: auto;
}

.studio-footer p {
  margin-bottom: 8px;
}

.studio-footer a {
  color: var(--color-coastal-blue);
  text-decoration: underline;
  font-weight: 700;
}

/* Wide container variant for spacious full-width showcases */
.container-wide {
  width: 98.5%;
  max-width: 1880px;
  margin: 0 auto;
  padding: 0 8px;
}

/* ==========================================================================
   Workshop Map Hero — Playful Showcase Layout (Other Sites Page)
   ========================================================================== */
.workshop-map-hero {
  position: relative;
  min-height: calc(100vh - 138px);
  min-height: calc(100dvh - 138px);
  background:
    radial-gradient(ellipse 85% 75% at 50% 50%, rgba(13, 21, 39, 0.60) 0%, rgba(6, 9, 17, 0.96) 100%),
    url('assets/images/connor-trackside-view.jpg');
  background-size: cover;
  background-position: center;
  border: 4px solid var(--color-brass);
  border-radius: var(--radius-card);
  margin-top: 18px;
  margin-bottom: 22px;
  padding: 28px 24px 32px 24px;
  overflow: hidden;
  box-shadow: 0 8px 0 #000, 0 20px 48px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.map-hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 8px;
}

.map-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--color-gold-bright);
  text-transform: uppercase;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 4px 4px 0 #000;
  text-align: center;
  margin-bottom: 4px;
  animation: titleDropIn 0.8s ease both 0.1s;
}

.map-hero-subtitle {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  color: #cbd5e1;
  text-shadow: 1px 1px 0 #000, 0 3px 8px rgba(0, 0, 0, 0.8);
  text-align: center;
  max-width: 620px;
  margin-bottom: 0;
  animation: titleDropIn 0.9s ease both 0.25s;
}

/* Staggered organic scatter layout — 5 on Row 1, 6 on Row 2, 5 on Row 3 */
.map-logo-scatter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-content: space-around;
  flex: 1;
  width: 100%;
  max-width: 1800px;
  padding: 8px 12px;
  animation: slideInUp 0.8s ease both 0.35s;
}

.map-logo-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 4px 6px;
  transition: all 0.28s ease;
  animation: popInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Row 1: 5 workshops spaced wide */
.map-logo-item:nth-child(1),
.map-logo-item:nth-child(2),
.map-logo-item:nth-child(3),
.map-logo-item:nth-child(4),
.map-logo-item:nth-child(5) {
  width: calc(20% - 24px);
}

/* Row 2: 6 workshops nested between Row 1 positions */
.map-logo-item:nth-child(6),
.map-logo-item:nth-child(7),
.map-logo-item:nth-child(8),
.map-logo-item:nth-child(9),
.map-logo-item:nth-child(10),
.map-logo-item:nth-child(11) {
  width: calc(16.666% - 20px);
}

/* Row 3: 5 workshops spaced wide */
.map-logo-item:nth-child(12),
.map-logo-item:nth-child(13),
.map-logo-item:nth-child(14),
.map-logo-item:nth-child(15),
.map-logo-item:nth-child(16) {
  width: calc(20% - 24px);
}

/* Organic vertical offsets: playful scatter without collisions */
.map-logo-item:nth-child(1)  { margin-top: 14px; animation-delay: 0.12s; }
.map-logo-item:nth-child(2)  { margin-top: -12px; animation-delay: 0.18s; }
.map-logo-item:nth-child(3)  { margin-top: 18px; animation-delay: 0.24s; }
.map-logo-item:nth-child(4)  { margin-top: -10px; animation-delay: 0.30s; }
.map-logo-item:nth-child(5)  { margin-top: 12px; animation-delay: 0.36s; }

.map-logo-item:nth-child(6)  { margin-top: -14px; animation-delay: 0.42s; }
.map-logo-item:nth-child(7)  { margin-top: 16px; animation-delay: 0.48s; }
.map-logo-item:nth-child(8)  { margin-top: -12px; animation-delay: 0.54s; }
.map-logo-item:nth-child(9)  { margin-top: 14px; animation-delay: 0.60s; }
.map-logo-item:nth-child(10) { margin-top: -16px; animation-delay: 0.65s; }
.map-logo-item:nth-child(11) { margin-top: 10px; animation-delay: 0.70s; }

.map-logo-item:nth-child(12) { margin-top: -10px; animation-delay: 0.75s; }
.map-logo-item:nth-child(13) { margin-top: 16px; animation-delay: 0.80s; }
.map-logo-item:nth-child(14) { margin-top: -12px; animation-delay: 0.85s; }
.map-logo-item:nth-child(15) { margin-top: 14px; animation-delay: 0.90s; }
.map-logo-item:nth-child(16) { margin-top: -8px; animation-delay: 0.95s; }

.map-logo-item:hover {
  transform: scale(1.2) translateY(-6px) !important;
  z-index: 20;
}

/* Free-floating transparent badges without harsh yellow circles */
.map-logo-badge {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: all 0.28s ease;
}

/* Featured logos slightly larger */
.map-logo-item.featured .map-logo-badge {
  height: 106px;
}

.map-logo-badge img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.85));
  transition: filter 0.28s ease;
}

.map-logo-item:hover .map-logo-badge img {
  filter: drop-shadow(0 0 16px rgba(255, 222, 89, 0.9)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.95));
}

.map-logo-name {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 1px 1px 0 #000, 0 3px 8px rgba(0, 0, 0, 0.9);
  text-align: center;
  margin-top: 6px;
  max-width: 130px;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.map-logo-item:hover .map-logo-name {
  color: var(--color-gold-bright);
}

/* ==========================================================================
   F11 Fullscreen & Tall Display Dynamic Scaling (height >= 920px)
   ========================================================================== */
@media (min-height: 920px) {
  /* Global: nav and spacing breathe more on tall displays */
  .nav-inner {
    height: 92px;
  }
  .studio-title-box h1 {
    font-size: 1.75rem;
  }
  .studio-logo-badge {
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
  }
  .container {
    padding: 0 24px;
  }
  .section-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
  }
  .section-subtitle {
    font-size: 1.1rem;
  }

  .workshop-map-hero {
    min-height: calc(100vh - 145px);
    margin-top: 22px;
    margin-bottom: 24px;
    padding: 44px 36px 52px 36px;
  }
  .map-hero-title {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    margin-bottom: 6px;
  }
  .map-hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 32px;
  }
  .map-logo-scatter {
    gap: 36px 18px;
  }
  .map-logo-badge {
    height: 118px;
  }
  .map-logo-item.featured .map-logo-badge {
    height: 138px;
  }
  .map-logo-name {
    font-size: 0.84rem;
    margin-top: 8px;
    max-width: 140px;
  }
}

@media (max-width: 1200px) {
  .map-logo-scatter {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 16px;
  }
}

@media (max-width: 640px) {
  .map-logo-scatter {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }
}

/* Divider between map hero and directory */
.map-to-grid-divider {
  text-align: center;
  margin: 0 0 32px 0;
  padding: 16px 0;
}

.map-to-grid-divider span {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 20px;
  position: relative;
}

.map-to-grid-divider span::before,
.map-to-grid-divider span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 60px;
  height: 3px;
  background: var(--color-brass);
  border-radius: 2px;
}

.map-to-grid-divider span::before { right: 100%; }
.map-to-grid-divider span::after { left: 100%; }

/* ==========================================================================
   Responsive Rules
   ========================================================================== */
@media (max-width: 992px) {
  .nav-inner {
    height: auto;
    padding: 16px 0;
    flex-direction: column;
    gap: 16px;
  }
  .community-hero {
    padding: 40px 20px;
  }
  .community-hero-title {
    font-size: 2.8rem;
  }
  .workshop-map-hero {
    min-height: auto;
    padding: 36px 20px;
  }
  .map-logo-badge {
    width: 90px;
    height: 90px;
  }
  .map-logo-item.featured .map-logo-badge {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 768px) {
  .nav-links-row {
    justify-content: center;
  }
  .nav-item {
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .lightbox-backdrop {
    padding: 10px;
  }
  .map-logo-scatter {
    gap: 14px;
  }
  .map-logo-badge {
    width: 72px;
    height: 72px;
    padding: 5px;
  }
  .map-logo-item.featured .map-logo-badge {
    width: 90px;
    height: 90px;
  }
  .map-logo-name {
    font-size: 0.68rem;
    max-width: 80px;
  }
  /* Remove tilts on mobile — keep clean */
  .map-logo-item:nth-child(odd),
  .map-logo-item:nth-child(even),
  .map-logo-item:nth-child(3n),
  .map-logo-item:nth-child(4n+1) {
    transform: none;
  }
}

