body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #120f0d !important;
  color: #f3ece0;
  font-family: var(--font-body);
  min-height: 280vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 14, 12, 0.18) 0%, rgba(18, 14, 12, 0.54) 100%),
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(243, 236, 224, 0.025) 88px 89px);
  pointer-events: none;
  z-index: 0;
}

#hero-bg-image {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 120vh;
  background-image:
    linear-gradient(180deg, rgba(14, 12, 10, 0.18) 0%, rgba(14, 12, 10, 0.48) 40%, rgba(14, 12, 10, 0.82) 100%),
    linear-gradient(90deg, rgba(14, 12, 10, 0.82) 0%, rgba(14, 12, 10, 0.36) 55%, rgba(14, 12, 10, 0.6) 100%),
    url('../images/MareNostrum1.jpg');
  background-size: cover;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  filter: brightness(0.56) saturate(0.9) contrast(1.05);
  z-index: 1;
  opacity: 1;
  transition: filter 0.8s ease, opacity 0.8s ease, background-position 0.8s ease;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  filter: blur(1px) brightness(0.72) contrast(1.05) saturate(0.9);
  opacity: 0.2;
  z-index: 5;
  background-color: transparent !important;
  transition: filter 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}

#canvas-container canvas {
  pointer-events: auto !important;
  background: transparent;
}

#hero-section {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 2rem 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-grid {
  width: min(1320px, calc(100vw - 4rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.78fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.hero-content {
  max-width: 800px;
  pointer-events: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(239, 219, 187, 0.34);
  background: rgba(24, 18, 15, 0.46);
  border-radius: 9999px;
  color: #c8b59d;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  margin-bottom: 2.25rem;
  text-transform: uppercase;
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: rgba(243, 236, 224, 0.56);
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  margin: 0 0 1.5rem;
  color: #fbf7f0;
  letter-spacing: -0.06em;
  max-width: 25ch;
  text-wrap: balance;
}

.hero-title-accent {
  background: linear-gradient(135deg, #f0e2c8, #c8824d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.14;
  color: rgba(243, 236, 224, 0.72);
  margin: 0 0 3rem;
  max-width: 40ch;
}

.hero-statement {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  color: rgba(243, 236, 224, 0.72);
  line-height: 1.82;
  max-width: 60ch;
  margin: 0 0 2rem;
}

.hero-statement strong {
  color: #fbf7f0;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.92rem 1.25rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.hero-action:hover {
  transform: translateY(-2px);
}

.hero-action.primary {
  border: 1px solid rgba(244, 218, 189, 0.28);
  background: linear-gradient(135deg, rgba(200, 130, 77, 0.84), rgba(168, 100, 61, 0.92));
  color: #16110d;
  box-shadow: 0 14px 28px rgba(93, 52, 24, 0.24);
}

.hero-action.secondary {
  border: 1px solid rgba(239, 219, 187, 0.34);
  background: rgba(24, 18, 15, 0.48);
  color: #fbf7f0;
}

.core-question-box {
  margin-bottom: 3.5rem;
  padding: 1.5rem 1.6rem 1.55rem;
  border: 1px solid rgba(239, 219, 187, 0.16);
  border-top: 1px solid rgba(200, 130, 77, 0.5);
  background: linear-gradient(180deg, rgba(26, 19, 16, 0.74) 0%, rgba(14, 10, 8, 0.86) 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  border-radius: 1rem;
  position: relative;
  text-align: center;
}

.core-question-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 236, 224, 0.4), transparent);
  border-radius: 1rem 1rem 0 0;
}

.core-question-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #c8824d;
  letter-spacing: 0.22em;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.core-question-text {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 500;
  color: #fbf7f0;
  line-height: 1.4;
  max-width: 55ch;
  margin: 0 auto;
  text-wrap: balance;
}

.hero-instructors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0;
}

.instructor-avatars {
  display: flex;
}

.instructor-avatar {
  width: 42px;
  height: 42px;
  margin-left: -0.45rem;
  border: 1px solid rgba(243, 236, 224, 0.34);
  background: linear-gradient(135deg, #f0e2c8, #c8824d);
  color: #201913;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.instructor-avatar:first-child {
  margin-left: 0;
}

.instructor-info {
  text-align: left;
}

.instructor-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(243, 236, 224, 0.54);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.instructor-names {
  font-family: 'Playfair Display', serif;
  color: #fbf7f0;
}

.hero-register {
  margin-top: clamp(3rem, 9vh, 6rem);
  padding: 1.35rem 1.35rem 1.5rem;
  border: 1px solid rgba(239, 219, 187, 0.16);
  background: linear-gradient(180deg, rgba(26, 19, 16, 0.78) 0%, rgba(16, 12, 10, 0.92) 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  position: relative;
  overflow: hidden;
}

.hero-register::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 130, 77, 0.5), transparent 80%);
}

.register-eyebrow,
.map-legend-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 236, 224, 0.5);
}

.register-title,
.map-legend-title {
  font-family: 'Playfair Display', serif;
  color: #fbf7f0;
}

.register-title {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.04;
  margin: 0 0 0.75rem;
}

.map-legend-title {
  font-size: 1.35rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.register-copy,
.network-note,
.map-legend-item p {
  color: rgba(243, 236, 224, 0.72);
}

.register-copy {
  font-size: 0.96rem;
  line-height: 1.7;
  margin: 0 0 1.15rem;
}

.network-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(239, 219, 187, 0.16);
  font-size: 0.9rem;
  line-height: 1.65;
}

.register-rows,
.map-legend-grid {
  display: grid;
  gap: 0.8rem;
}

.register-row,
.map-legend-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(239, 219, 187, 0.16);
}

.legend-dot {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 999px;
  margin-top: 0.45rem;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 0 24px currentColor;
}

.legend-dot.core {
  color: #6d92d1;
  background: #6d92d1;
}

.legend-dot.tension {
  color: #d06d3d;
  background: #d06d3d;
}

.legend-dot.research {
  color: #7fa26d;
  background: #7fa26d;
}

.register-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(243, 236, 224, 0.48);
}

.register-row strong,
.map-legend-item strong {
  display: block;
  color: #fbf7f0;
}

.register-row strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.12rem;
  line-height: 1.15;
}

.map-legend-item strong {
  font-size: 0.9rem;
  margin-bottom: 0.18rem;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.9rem;
  color: rgba(243, 236, 224, 0.52);
}

.scroll-indicator-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(200, 130, 77, 0), rgba(200, 130, 77, 0.85), rgba(243, 236, 224, 0.28));
}

.scroll-indicator-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: inherit;
}

#ui-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(8, 6, 5, 0.34) 100%);
}

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: min(1320px, calc(100vw - 4rem));
  margin: 0 auto;
  padding-top: 1.45rem;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.course-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  line-height: 1;
  color: #fbf7f0;
  letter-spacing: -0.03em;
}

.course-subtitle {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(243, 236, 224, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.escape-hatch {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(239, 219, 187, 0.34);
  background: rgba(24, 18, 15, 0.64);
  color: #fbf7f0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 9999px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.escape-hatch:hover {
  border-color: rgba(243, 236, 224, 0.42);
  background: rgba(37, 28, 23, 0.74);
  transform: translateY(-2px);
}

.map-legend {
  position: absolute;
  left: max(2rem, calc((100vw - min(1320px, calc(100vw - 4rem))) / 2));
  bottom: 2rem;
  width: min(420px, calc(100vw - 4rem));
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(239, 219, 187, 0.16);
  background: linear-gradient(180deg, rgba(26, 19, 16, 0.8) 0%, rgba(14, 10, 8, 0.92) 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.map-legend::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(109, 146, 209, 0.5), rgba(127, 162, 109, 0.35), transparent 92%);
}

#briefing-card {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: min(360px, calc(100vw - 2rem));
  padding: 1.15rem 1.15rem 1rem;
  background: rgba(248, 241, 231, 0.94);
  border: 1px solid rgba(59, 41, 28, 0.14);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.32);
  border-radius: 24px;
  color: #211a15;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 10000 !important;
}

.card-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.card-type,
.card-status {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.card-type {
  color: #655548;
}

.card-status {
  color: #95623d;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  line-height: 1.02;
  color: #1e1712;
  margin-bottom: 0.55rem;
}

.card-bluf {
  margin-bottom: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #514236;
}

#mobile-enter-btn {
  display: none;
}

#loading-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(200, 130, 77, 0.16), transparent 32%), #120f0d;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #f3ece0;
}

.loader-bar {
  width: 200px;
  height: 1px;
  background: rgba(243, 236, 224, 0.14);
  position: relative;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: #6d92d1;
  animation: load 1.5s infinite ease-in-out;
}

@keyframes load {
  0% {
    left: -50%;
  }

  100% {
    left: 100%;
  }
}

.loader-text {
  color: rgba(243, 236, 224, 0.58) !important;
  letter-spacing: 0.22em !important;
}

#fallback-ui {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 9, 8, 0.92);
  color: #f3ece0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fallback-msg {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.fallback-copy {
  max-width: 38ch;
  color: rgba(243, 236, 224, 0.72);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-register {
    margin-top: 0;
    max-width: 720px;
  }
}

@media (max-width: 768px) {
  body {
    min-height: 250vh;
  }

  body::before {
    background:
      linear-gradient(180deg, rgba(18, 14, 12, 0.2) 0%, rgba(18, 14, 12, 0.62) 100%),
      repeating-linear-gradient(90deg, transparent 0 40px, rgba(243, 236, 224, 0.02) 40px 41px);
  }

  #hero-section {
    padding: 1.5rem 0 6rem;
  }

  .hero-grid {
    width: calc(100vw - 2rem);
  }

  .hero-content {
    padding-top: 4rem;
  }

  .hero-title {
    max-width: none;
    font-size: clamp(2.9rem, 14vw, 4.4rem);
  }

  .hero-subtitle {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-action {
    width: 100%;
  }

  .hero-register {
    padding: 1.15rem;
  }

  .scroll-indicator {
    left: 1rem;
    bottom: 1.1rem;
  }

  .top-bar {
    width: calc(100vw - 2rem);
    padding-top: 1rem;
  }

  .course-subtitle {
    display: none;
  }

  .escape-hatch {
    padding: 0.72rem 0.95rem;
  }

  .map-legend {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    padding: 0.95rem 1rem;
  }

  .map-legend-item p {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  #briefing-card {
    width: calc(100vw - 1rem) !important;
    max-width: none !important;
    border-radius: 26px !important;
    padding: 1rem !important;
    pointer-events: auto !important;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-bluf {
    font-size: 0.84rem !important;
    line-height: 1.5 !important;
  }

  #mobile-enter-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 0.9rem;
    padding: 0.76rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(43, 30, 20, 0.14);
    background: rgba(33, 25, 19, 0.92);
    color: #fbf7f0;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
}
