@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("./assets/nunito-sans.woff2") format("woff2");
  font-weight: 200 1000;
  font-stretch: 75% 125%;
  font-display: swap;
}

@font-face {
  font-family: Cinzel;
  src: url("./assets/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --abyss: #081f24;
  --sand: #fbefd1;
  --shell-white: #f6f4e8;
  --foam: #bfdfd7;
  --brass: #d1b47a;
  --rule: #c3ab7270;
  --header-height: 4.75rem;
  background: var(--abyss);
  color: var(--shell-white);
  font-family: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p, dl, dd { margin: 0; }

.shell {
  width: min(100% - 2 * clamp(1.25rem, 5.5vw, 6rem), 87rem);
  margin-inline: auto;
}

.masthead {
  position: relative;
  z-index: 1;
  background: #f0e5c6;
  border-bottom: 2px solid #b69461;
  box-shadow: 0 3px 0 #173d47;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.5rem, 2vw, 1rem);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  gap: clamp(0.3rem, 1.1vw, 0.85rem);
}

.brand-mark {
  display: block;
  flex: none;
  width: auto;
  height: clamp(2.55rem, 4.8vw, 3.65rem);
}

.brand-wordmark {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 26rem;
  height: auto;
  mask-image: linear-gradient(transparent, #000 10%, #000 91%, transparent),
    linear-gradient(to right, transparent, #000 0.4%, #000 98%, transparent);
  mask-composite: intersect;
}

:is(a, button):focus-visible { outline: 2px solid var(--sand); outline-offset: 5px; }
.masthead :focus-visible { outline-color: #0c323e; }

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: max(39rem, calc(100svh - var(--header-height) - 2px));
  border-bottom: 1px solid var(--rule);
}

.scene {
  --scene-position: 63% center;
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #084e5b;
}

.scene::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse 49% 68% at 50% 46%, #081f24ee 18%, #081f24bc 49%, #081f244d 77%, transparent),
    linear-gradient(0deg, #081f24db, #081f2400 26%);
}

.empire {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scene-position);
  mask-image: linear-gradient(transparent 6%, #000 17%);
}

.water-surface {
  position: absolute;
  inset: 0 -3% auto;
  height: clamp(4.75rem, 9vw, 9.5rem);
  background: url("./assets/atlantis-superficie.webp") center top / cover no-repeat;
  mask-image: linear-gradient(#000 30%, #000b 55%, transparent);
  transform-origin: center top;
  animation: current 4s ease-in-out infinite alternate;
}

.water-light {
  position: absolute;
  inset: -10% -6% 0;
  background: conic-gradient(from 176deg at 72% 0%,
    transparent 0deg 9deg, #beffe91e 14deg, transparent 19deg 24deg,
    #94ffda2d 29deg, transparent 33deg 37deg, #a3ffe51f 42deg, transparent 48deg);
  mask-image: linear-gradient(transparent 5%, #000 23%, transparent 77%);
  transform-origin: 72% top;
  mix-blend-mode: screen;
  animation: light-through-water 6s ease-in-out infinite alternate;
}

[data-motion-paused] .scene *,
[data-motion-paused] .scene *::after { animation-play-state: paused; }

@keyframes current {
  from { transform: translateX(-1.8%) skewX(-3.5deg) scaleY(0.9); }
  to { transform: translateX(1.8%) skewX(4deg) scaleY(1.2); }
}

@keyframes light-through-water {
  from { transform: translateX(-3%) rotate(-5deg); opacity: 0.48; }
  to { transform: translateX(5%) rotate(6deg); opacity: 1; }
}

.currents,
.schools,
.bubbles { position: absolute; inset: 0; }

.currents i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: clamp(7.5rem, 29vw, 25rem);
  height: clamp(0.6rem, 2.2vh, 1.1rem);
  border-top: 2px solid #b4f9ee93;
  border-radius: 50%;
  animation: current-streak 5.4s ease-in-out infinite;
}

.currents i:nth-child(1) { --x: 59%; --y: 21%; animation-delay: -2.1s; }
.currents i:nth-child(2) { --x: 71%; --y: 33%; animation-delay: -3.2s; }
.currents i:nth-child(3) { --x: 52%; --y: 70%; animation-delay: -4s; }

@keyframes current-streak {
  0% { transform: translateX(-32%) scaleX(0.65) rotate(-4deg); opacity: 0; }
  45% { opacity: 0.65; }
  100% { transform: translateX(35%) scaleX(1.15) rotate(2deg); opacity: 0; }
}

.schools { mask-image: linear-gradient(90deg, transparent 35%, #000 56%); }

.school {
  position: absolute;
  top: 49%;
  left: 0;
  width: 8rem;
  height: 3.25rem;
  --fish-color: #f6cc84;
  filter: drop-shadow(0 1px 0 #164a57a6);
  animation: swim-across 14s linear -3.6s infinite;
}

.school-far {
  top: 66%;
  --fish-color: #84ded1;
  opacity: 0.86;
  animation-duration: 18s;
  animation-delay: -10.7s;
  animation-direction: reverse;
}

.fish {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: var(--length);
  height: calc(var(--length) * 0.36);
  animation: fish-bob 1.4s ease-in-out var(--lag) infinite alternate;
}

.fish:nth-child(1) { --left: 0; --top: 35%; --length: 2.15rem; --lag: -0.25s; }
.fish:nth-child(2) { --left: 28%; --top: 4%; --length: 1.55rem; --lag: -0.8s; }
.fish:nth-child(3) { --left: 36%; --top: 60%; --length: 1.4rem; --lag: -0.4s; }
.fish:nth-child(4) { --left: 60%; --top: 29%; --length: 1.7rem; --lag: -0.7s; }
.fish:nth-child(5) { --left: 77%; --top: 70%; --length: 1.28rem; --lag: -0.5s; }

.school-far .fish { scale: -0.76 0.76; }

.fish::before,
.fish::after {
  position: absolute;
  content: "";
  background-color: var(--fish-color);
}

.fish::before {
  inset: 6% 24% 6% 0;
  border-radius: 59% 45% 47% 54%;
  background-image: radial-gradient(circle at 22% 44%, #163944 0 1px, transparent 1.4px);
}

.fish::after {
  inset: 0 0 0 69%;
  clip-path: polygon(0 50%, 100% 0, 86% 50%, 100% 100%);
  transform-origin: left center;
  animation: fish-tail 0.34s ease-in-out infinite alternate;
}

@keyframes swim-across {
  from { transform: translate3d(calc(100vw + 2rem), 0, 0); }
  to { transform: translate3d(-9rem, -2.75rem, 0); }
}

@keyframes fish-bob {
  from { transform: translateY(-3px) rotate(-7deg); }
  to { transform: translateY(4px) rotate(5deg); }
}

@keyframes fish-tail {
  from { transform: scaleX(0.55); }
  to { transform: scaleX(1.12); }
}

.bubbles i {
  position: absolute;
  left: var(--x);
  bottom: 4%;
  width: var(--size);
  aspect-ratio: 1;
  border: 1.5px solid #bef8eead;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, #e6fffaeb 0 9%, transparent 16%), #70dcd72b;
  animation: bubble-rise var(--speed) linear var(--delay) infinite;
}

@keyframes bubble-rise {
  0% { transform: translate3d(0, 0, 0) scale(0.55); opacity: 0; }
  15% { opacity: 0.9; }
  48% { transform: translate3d(var(--drift), -28svh, 0) scale(0.84); }
  80% { opacity: 0.8; }
  100% { transform: translate3d(0, -65svh, 0) scale(1.15); opacity: 0; }
}

.hero-copy {
  padding-block: clamp(1.25rem, 3.5vh, 3rem) clamp(0.75rem, 1.9vh, 1.5rem);
  text-align: center;
}

.eyebrow {
  color: var(--foam);
  font-size: clamp(0.7rem, 1.2vw, 0.82rem);
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px #061a20;
}

h1 {
  width: fit-content;
  margin: 0.1em auto 0;
  color: var(--sand);
  font-family: "Nunito Sans", "DM Sans", system-ui, sans-serif;
  font-size: clamp(2.65rem, 5.5vw, 6.3rem);
  font-weight: 950;
  font-stretch: 108%;
  line-height: 1.04;
  letter-spacing: -0.06em;
  text-shadow: 0 2px #725f3d, 0 4px #071d22, 0 0.1em 0.35em #05161a80;
}

h1 span { color: #e2c182; }

.edition-theme {
  margin: 0.15em 0 0.5em;
  color: #f0d4a1;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.35rem, 2.75vw, 2.55rem);
  font-weight: 730;
  letter-spacing: 0.055em;
  line-height: 1.15;
  text-shadow: 0 2px #09232b;
}

.tagline {
  margin-bottom: 0.5em;
  color: var(--sand);
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  font-weight: 720;
  text-wrap: balance;
  text-shadow: 0 1px 5px #061a20;
}

.event-date {
  font-size: clamp(1.4rem, 2.45vw, 1.9rem);
  font-weight: 730;
  letter-spacing: -0.025em;
}

.venue {
  margin-top: 0.25rem;
  color: var(--foam);
  font-size: clamp(0.9rem, 1.4vw, 1.06rem);
  line-height: 1.5;
}

.event-countdown {
  max-width: 29.5rem;
  margin: clamp(1.05rem, 2.5vh, 1.75rem) auto 0;
  padding: 1.05rem clamp(0.8rem, 2vw, 1.5rem) 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: linear-gradient(105deg, #071e22f5, #0a2b31df);
}

.event-countdown h2 {
  color: var(--sand);
  font-size: 0.875rem;
  font-weight: 680;
}

.clock {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) repeat(3, minmax(0, 1fr));
  gap: clamp(0.28rem, 0.85vw, 0.7rem);
  margin-block: 0.86rem 0.85rem;
}

.clock-unit {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
  min-width: 0;
  text-align: center;
}

.clock-unit dt {
  color: var(--foam);
  font-size: clamp(0.61rem, 1vw, 0.71rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.clock-unit dd {
  color: var(--shell-white);
  font-size: clamp(2rem, 4.1vw, 3.5rem);
  font-weight: 690;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
}

.clock-unit:first-child dd { color: var(--sand); }

.clock-digits {
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: 0.18em 0 0.2em;
  border: 1px solid var(--rule);
  border-radius: 0.65rem;
  background: linear-gradient(#1b4149 0 49%, #c3ab724d 50%, #102b34 51%);
  box-shadow: 0 2px 0 #050f13;
  perspective: 3em;
}

.clock-digits > span { grid-area: 1 / 1; }
.clock-outgoing { visibility: hidden; }

.start-time,
.event-status {
  color: var(--foam);
  font-size: 0.78rem;
  line-height: 1.5;
}

.event-countdown > .start-time { margin-top: 0.5rem; }

.sponsor-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  margin-top: 0.95rem;
  padding: 0.65rem 1.12rem;
  border: 1px solid #e9c88c;
  border-radius: 0.24rem;
  background: linear-gradient(#f5dfaa, #d9b66f);
  box-shadow: 0 2px 0 #856437;
  color: #163038;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.sponsor-cta:hover { background: #f6e4b9; }

.hero-actions {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding-bottom: clamp(0.75rem, 1.9vh, 1.25rem);
}

.tec {
  display: grid;
  justify-items: center;
  color: var(--foam);
  text-decoration: none;
}

.tec img {
  display: block;
  width: clamp(7.25rem, 14vw, 10.5rem);
  height: auto;
}

.tec span {
  margin-top: 0.15rem;
  font-size: clamp(0.64rem, 1.1vw, 0.75rem);
  font-weight: 650;
}

.tec:hover span { text-decoration: underline; }

.contact,
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--shell-white);
  font-size: 0.82rem;
  font-weight: 680;
}

.contact {
  flex: none;
  color: #143941;
  text-underline-offset: 0.35em;
  text-decoration-color: #8c6937;
}

.motion-toggle {
  padding-inline: 0.85rem;
  border: 1px solid var(--rule);
  background: #081f24f0;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.motion-toggle:hover { border-color: var(--sand); }
.motion-toggle::before {
  content: "";
  width: 0.5rem;
  height: 0.68rem;
  border-inline: 2px solid var(--brass);
}

[data-motion-paused] .motion-toggle::before {
  height: 0;
  width: 0;
  border: 0.32rem solid transparent;
  border-right: 0;
  border-left: 0.53rem solid var(--brass);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 48rem) {
  :root { --header-height: 4.25rem; }
  .hero { min-height: calc(100svh - var(--header-height) - 2px); align-items: start; }
  .scene {
    --scene-position: 83% center;
    background: linear-gradient(#124753, #081f24 37%);
  }
  .empire {
    position: absolute;
    bottom: 0;
    height: clamp(18rem, max(87vw, 49svh), 31rem);
    mask-image: linear-gradient(transparent 10%, #000 30%, #000 83%, transparent);
  }
  .water-surface {
    inset: 0 -5% auto;
    height: 6.25rem;
    background-position: 66% top;
  }
  .scene::after {
    background: linear-gradient(0deg, #081f24e6, #081f2400 23%);
  }
  .hero-copy {
    padding-block: 2.8rem clamp(12rem, 58vw, 21rem);
  }
  h1 { font-size: clamp(1.72rem, 8vw, 4.3rem); }
  .schools { mask-image: none; }
  .school { top: 72%; }
  .school-far { top: 83%; }
  .currents i:nth-child(1) { --y: 16%; }
  .currents i:nth-child(2) { --y: 61%; }
  .currents i:nth-child(3) { --y: 78%; }
  .event-countdown { margin-top: 1.45rem; }
  .clock-unit dd { font-size: clamp(1.9rem, 8vw, 3.1rem); }
}

@media (max-width: 24rem) {
  .shell { width: calc(100% - 2rem); }
  .brand { gap: 0.44rem; }
  .clock-unit dt { letter-spacing: 0.025em; }
}
