@font-face {
  font-family: Pinyon;
  src: url("assets/fonts/pinyon.woff2") format("woff2");
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  background: #000;
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}
body {
  margin: 0;
  background: #000;
  color: #e8e3db;
  font-family: Arial, sans-serif;
  overflow-x: clip;
}
h1,
h2,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
#globe:focus-visible {
  outline: 1px solid #d7ba91;
  outline-offset: 7px;
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(#000e, #0009, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #ffffff0c;
}
.site-header nav {
  display: flex;
  gap: 32px;
}
.site-header a {
  font-size: 12px;
  letter-spacing: 0.13em;
  padding: 16px 0;
  transition: color 0.3s;
}
.site-header a:hover,
.site-header a[aria-current] {
  color: #cfb285;
}
.clock {
  text-align: right;
  display: flex;
  gap: 15px;
  align-items: center;
  font:
    12px ui-monospace,
    monospace;
  letter-spacing: 0.06em;
}
#clock-zone {
  color: #8d8c8b;
  font-size: 10px;
  max-width: 190px;
}
#local-clock {
  font-size: 16px;
  color: #e8e0d5;
  white-space: nowrap;
}
.hero {
  height: 100vh;
  height: 100svh;
  min-height: 650px;
  position: relative;
  overflow: hidden;
  background: #000;
}
.hero-image {
  position: absolute;
  width: 78%;
  height: 100%;
  right: 0;
  object-fit: contain;
  object-position: center;
  will-change: transform;
}
.hero-title {
  position: absolute;
  left: 5%;
  top: 32%;
  z-index: 2;
  will-change: transform, opacity;
}
h1 {
  font:
    400 clamp(130px, 24vw, 410px)/1.1 Pinyon,
    cursive;
  letter-spacing: -0.025em;
  color: #e8ddc9;
  text-shadow: 0 4px 35px #0008;
}
.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 6%;
  width: 44px;
  height: 44px;
  border: 1px solid #bba17d66;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 23px;
  color: #c9b599;
}
.vision-section {
  position: relative;
  min-height: 900px;
  height: 110svh;
  max-height: 1100px;
  display: grid;
  grid-template-columns: 44% 56%;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 80px 5%;
}
.galaxy-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  z-index: -3;
  filter: saturate(0.55);
}
.vision-section:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, #000c, transparent 70%),
    linear-gradient(#000, transparent 15%, transparent 80%, #000);
}
.galaxy-glow {
  position: absolute;
  left: 36%;
  top: 28%;
  width: 35%;
  height: 30%;
  background: radial-gradient(ellipse, #c3e8ff38, transparent 68%);
  z-index: -2;
  animation: galaxy-breathe 8s ease-in-out infinite;
  pointer-events: none;
}
.vision-copy {
  position: relative;
  max-width: 410px;
  z-index: 2;
}
.vision-copy p {
  font:
    16px/1.85 Arial,
    sans-serif;
  color: #c0c4c8;
  margin-bottom: 24px;
}
.vision-copy .lead {
  font:
    400 clamp(29px, 3vw, 46px)/1.25 Georgia,
    serif;
  color: #eee8de;
  letter-spacing: -0.035em;
  margin-bottom: 36px;
}
.figure-stage {
  position: relative;
  width: 100%;
  height: 700px;
  max-height: 85svh;
  touch-action: pan-y;
}
.figure-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.figure-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.9;
}
.figure-stage.ready .figure-fallback {
  display: none;
}
.equations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: #c7d7df88;
  font:
    italic 18px Georgia,
    serif;
}
.equations span {
  position: absolute;
  transition: transform 0.5s ease-out;
  text-shadow: 0 0 20px #aad9fa44;
}
.equations span:nth-child(1) {
  left: 12%;
  top: 12%;
}
.equations span:nth-child(2) {
  left: 61%;
  top: 17%;
}
.equations span:nth-child(3) {
  right: 7%;
  top: 72%;
}
.equations span:nth-child(4) {
  left: 38%;
  top: 79%;
}
.equations span:nth-child(5) {
  right: 6%;
  top: 42%;
}
.equations span:nth-child(6) {
  left: 7%;
  top: 91%;
}
.project-finale {
  position: relative;
  padding: 105px 0 40px;
  background: #000;
  min-height: 100svh;
}
#project-title {
  text-align: center;
  font:
    400 clamp(56px, 11vw, 165px)/1.3 Pinyon,
    cursive;
  min-height: 1.3em;
  padding: 0 4%;
  color: #eee8de;
}
.world-stage {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1400px;
  height: 720px;
  max-height: 90svh;
  min-height: 400px;
  will-change: transform, opacity;
}
#globe {
  position: absolute;
  inset: 0;
}
#globe canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#globe canvas:active {
  cursor: grabbing;
}
.country-label {
  position: absolute;
  transform: translate(-50%, -100%);
  font:
    11px ui-monospace,
    monospace;
  color: #f2d7ac;
  pointer-events: none;
  white-space: nowrap;
}
.country-label[hidden] {
  display: none;
}
.beacon {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #efcf9f;
  box-shadow: 0 0 12px #efcf9f;
  border-radius: 50%;
  margin-right: 7px;
  animation: pulse 1.8s infinite;
}
.typing:after {
  content: "";
  display: inline-block;
  height: 0.6em;
  border-right: 1px solid #c7b897;
  margin-left: 7px;
  animation: pulse 0.8s steps(1) infinite;
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1.2s,
    transform 1.2s;
}
.revealed {
  opacity: 1;
  transform: none;
}
.noscript {
  padding: 25px;
}
::selection {
  background: #9a8365;
  color: #fff;
}
@keyframes pulse {
  50% {
    opacity: 0.2;
  }
}
@keyframes galaxy-breathe {
  50% {
    opacity: 0.45;
    transform: scale(1.2);
  }
}
@media (max-width: 760px) {
  .site-header {
    height: 76px;
    padding: 0 5%;
    align-items: center;
  }
  .site-header nav {
    gap: 18px;
  }
  .site-header a {
    font-size: 11px;
  }
  .clock {
    display: block;
    max-width: 135px;
  }
  #clock-zone {
    display: block;
    font-size: 8px;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
  }
  #local-clock {
    font-size: 13px;
  }
  .hero {
    min-height: 630px;
  }
  .hero-image {
    width: 125%;
    right: -15%;
    height: 72%;
    bottom: 2%;
  }
  .hero-title {
    top: 22%;
    left: 5%;
  }
  h1 {
    font-size: 36vw;
  }
  .vision-section {
    height: auto;
    max-height: none;
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 105px 7% 20px;
  }
  .vision-copy {
    max-width: 500px;
  }
  .vision-copy .lead {
    font-size: 35px;
  }
  .vision-copy p {
    font-size: 15px;
  }
  .figure-stage {
    height: 540px;
    max-height: none;
    margin-top: -30px;
  }
  .galaxy-background {
    object-position: 55% center;
  }
  .equations {
    font-size: 13px;
    opacity: 0.7;
  }
  .project-finale {
    padding-top: 85px;
  }
  #project-title {
    font-size: 14vw;
  }
  .world-stage {
    height: 510px;
    min-height: 360px;
  }
  .galaxy-glow {
    left: 15%;
    top: 45%;
    width: 75%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* Doisyn: fluid typography and complete scenes on every screen. */
.hero { min-height: 540px; isolation: isolate; }
.hero:after { content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#0008,transparent 65%),linear-gradient(0deg,#000,transparent 25%);z-index:1; }
.hero-image { filter:contrast(1.13) saturate(.7);mix-blend-mode:lighten; }
.hero-title { left:7%;right:6%;top:29%;padding: .12em .08em .25em; }
h1 { font-size:clamp(110px,21vw,340px);line-height:1.4;letter-spacing:0;font-kerning:normal;font-variant-ligatures:common-ligatures;white-space:nowrap;text-shadow:0 4px 35px #0009; }
.scroll-cue { z-index:3;transition:background .3s,transform .3s; }
.scroll-cue:hover { background:#bba17d22;transform:translateY(4px); }
.vision-section { perspective:1100px; }
.vision-copy p { font-size:clamp(16px,1.4vw,20px);line-height:1.9;color:#d4d5d5;margin-bottom:30px; }
.galaxy-background { opacity:.33;transform:scale(1.04); }
.equations { perspective:800px;transform-style:preserve-3d; }
.equations span { animation:formula-drift 12s ease-in-out infinite;translate:0 0;transition:translate .6s ease-out; }
.equations span:nth-child(2n) { animation-duration:16s;animation-delay:-6s;font-size:1.2em; }
.equations span:nth-child(3n) { animation-delay:-3s;opacity:.65;filter:blur(.3px); }
@keyframes formula-drift { 0%,100% {transform:translate3d(0,0,-30px) rotateY(-9deg) rotateZ(-3deg);opacity:.5;} 50% {transform:translate3d(12px,-28px,45px) rotateY(12deg) rotateZ(3deg);opacity:.9;} }
.project-finale { height:calc(100svh - 82px);min-height:500px;padding:0;overflow:hidden;display:flex; }
.world-stage { width:100%;max-width:1600px;height:auto;min-height:0;max-height:none;flex:1;margin:0 auto;overflow:hidden; }
#globe { position:absolute;inset:0 0 90px;width:100%;height:auto; }
.world-toolbar { position:absolute;bottom:18px;left:5%;right:5%;display:flex;align-items:center;justify-content:space-between;gap:16px; }
.world-hint { color:#a7b6c4;font:11px/1.6 Arial,sans-serif;letter-spacing:.1em; }
.world-actions { display:flex;gap:8px;flex-wrap:wrap; }
.world-actions button { border:1px solid #bed9f72b;background:#0b152180;border-radius:24px;color:#d5e2ee;padding:11px 16px;font:11px Arial,sans-serif;cursor:pointer;transition:background .2s,border-color .2s; }
.world-actions button:hover { background:#233446;border-color:#bed9f788; }
.world-actions button:focus-visible { outline:2px solid #cfb285;outline-offset:4px; }
.world-actions button[hidden] { display:none; }
#music-control { border:0;background:none;color:#cfb285;font:12px Arial,sans-serif;letter-spacing:.06em;padding:16px 0;cursor:pointer; }
#music-control[hidden] { display:none; }
#music-control:focus-visible { outline:1px solid #cfb285;outline-offset:5px; }
@media(max-width:760px) {
  .site-header { padding:0 5%; }
  .site-header nav { gap:12px;align-items:center; }
  .site-header a { font-size:10px;letter-spacing:.05em; }
  #music-control {font-size:10px;letter-spacing:0;}
  .clock { max-width:100px; }
  #clock-zone {font-size:7px;}
  .hero {min-height:540px;}
  .hero-title {top:23%;left:6%;right:4%;padding-top:10px;}
  h1 {font-size:29vw;line-height:1.5;}
  .hero-image {width:112%;right:-12%;height:75%;bottom:0;}
  .vision-copy p {font-size:16px;}
  .figure-stage {height:540px;margin-top:0;}
  .equations span:nth-child(1) {left:8%;top:7%;}
  .equations span:nth-child(2) {left:56%;top:43%;}
  .equations span:nth-child(5) {right:4%;top:62%;}
  .project-finale {height:calc(100svh - 76px);min-height:460px;padding:0;}
  .world-stage {height:auto;min-height:0;margin:0;}
  #globe {inset:0 0 110px;height:auto;}
  .world-toolbar {bottom:18px;flex-direction:column;text-align:center;gap:12px;}
  .world-hint {font-size:10px;letter-spacing:.04em;}
  .world-actions {justify-content:center;gap:7px;}
  .world-actions button {padding:10px 13px;}
}
@media(max-width:380px) {
 .site-header {padding:0 3%;}.site-header nav {gap:9px;}.clock {max-width:80px;}#local-clock{font-size:11px;}
}
@media(prefers-reduced-motion:reduce) {
 .equations span {animation:none;translate:none!important;}
 .scroll-cue {transition:none;}
}

/* El planeta queda libre de paneles y controles visibles. */
#globe {inset:0;width:100%;height:100%;}

.galaxy-background {animation:galactic-drift 38s ease-in-out infinite;}
@keyframes galactic-drift {0%,100%{transform:scale(1.09) translate3d(-1%,0,0) rotate(-1deg);}50%{transform:scale(1.12) translate3d(1%,1%,0) rotate(1deg);}}

/* Compact mobile composition: the globe does not sit in a full-height void. */
@media(max-width:760px) {
 .project-finale {height:clamp(320px,100vw,550px);min-height:0;}
 .world-stage {height:100%;flex:1 1 auto;}
}

@media(max-width:760px) {
 .figure-stage {height:clamp(360px,105vw,460px);}
 .vision-section {padding-bottom:0;}
}

@font-face {font-family:Allura;src:url("assets/fonts/allura.ttf") format("truetype");font-display:swap;}
#brand-title {font-family:Allura,cursive;font-weight:400;font-size:clamp(110px,23vw,360px);letter-spacing:0;line-height:1.35;}
@media(max-width:760px){#brand-title{font-size:32vw;}}

@font-face {font-family:"Doisyn Bodoni";src:url("assets/fonts/bodoni-italic.ttf") format("truetype");font-style:italic;font-weight:400 900;font-display:swap;}
#brand-title {font-family:"Doisyn Bodoni",Georgia,serif;font-style:italic;font-weight:400;font-optical-sizing:auto;font-size:clamp(100px,18vw,290px);letter-spacing:-.035em;line-height:1.35;}
@media(max-width:760px){#brand-title{font-size:24vw;}}

@font-face {font-family:"Doisyn Bodoni Roman";src:url("assets/fonts/bodoni.woff2") format("woff2");font-style:normal;font-weight:400;font-display:swap;}
#brand-title {font-family:"Doisyn Bodoni Roman",Georgia,serif;font-style:normal;font-weight:400;text-transform:uppercase;font-size:clamp(95px,19vw,300px);letter-spacing:.015em;line-height:1.35;}
@media(max-width:760px){#brand-title{font-size:19vw;}}

.animal-motion {position:absolute;pointer-events:none;filter:contrast(1.13) saturate(.7);mix-blend-mode:lighten;}
.animal-motion canvas {display:block;width:100%;height:100%;}

/* Shared light and particles connect the three scenes without scroll locking. */
.hero-image {opacity:var(--animal-opacity,1);}
.animal-motion {opacity:var(--animal-opacity,1);}
.figure-stage canvas {opacity:var(--figure-opacity,1);}
.figure-fallback {opacity:var(--figure-opacity,.9);}
.world-stage {opacity:var(--world-opacity,1);}
.hero:before {content:"";position:absolute;inset:8% 0 0;z-index:0;pointer-events:none;background:radial-gradient(ellipse at 65% 48%,#c7a57b12,transparent 56%);translate:var(--scene-x,0px) var(--scene-y,0px);}
.galaxy-glow {translate:var(--scene-x,0px) var(--scene-y,0px);transition:translate .7s ease-out;}


.site-intro {position:fixed;inset:0;z-index:30;pointer-events:none;display:grid;place-content:center;justify-items:center;gap:22px;background:radial-gradient(ellipse at center,#16140f,#030303 65%);opacity:1;transition:opacity .42s ease;}
.site-intro[hidden]{display:none;}
.intro-word{font:400 clamp(38px,7vw,72px)/1.2 "Doisyn Bodoni Roman",Georgia,serif;text-transform:uppercase;letter-spacing:.04em;color:#e8ddc9;animation:intro-word-in .7s ease-out both;}
.intro-line{width:48px;height:1px;background:linear-gradient(90deg,transparent,#c4ad86,transparent);animation:intro-line-in .8s ease-out both;}
.intro-leaving{opacity:0;}
@keyframes intro-word-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
@keyframes intro-line-in{from{opacity:0;scale:.2 1;}to{opacity:.7;scale:1;}}
@media(prefers-reduced-motion:reduce){.site-intro{display:none!important;}}

@media(max-width:760px){
 html{scroll-padding-top:76px;}
 .project-finale{height:min(clamp(320px,100vw,550px),calc(100svh - 76px));}
}
