/* M PLUS 1 (Coji Morishita y otros), licencia SIL Open Font 1.1. Descargada de Google Fonts
   y alojada aqui: la pagina no llama a ningun servidor externo. Archivo variable, pesos 100 a 900. */
@font-face {
  font-family: "M PLUS 1";
  src: url("/mplus1-latin.4ca8d8adab.woff2") format("woff2");
  font-weight: 100 900;
  /* block y no swap: con la letra de reserva, mas ancha, el titular ocupaba tres lineas y al
     llegar esta saltaba a dos. El titular no aparece hasta el segundo 1, asi que no se nota. */
  font-display: block;
}
:root {
  color-scheme: dark;
  background: #13170f;
  color: #f5f5f7;
  font-family: "M PLUS 1", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body, h1, p { margin: 0; }
body { min-width: 280px; }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; }
button { cursor: pointer; touch-action: manipulation; background: transparent; border: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid #ffedc9; outline-offset: 4px; }
[hidden] { display: none !important; }

.garden {
  --inset: clamp(24px, 4.5vw, 85px);
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
  isolation: isolate;
  touch-action: none; /* el dedo mueve el agua, no la pagina */
  background: #13170f;
}
.shot, .light, .shot > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot { z-index: -3; overflow: hidden; }
.poster, .film { object-fit: cover; object-position: 50% 55%; }
.film { pointer-events: none; }
.water { opacity: 0; transition: opacity .9s ease; touch-action: none; }
.water.live { opacity: 1; }
.pearl { position: absolute; z-index: 2; padding: 0; border-radius: 50%; cursor: pointer; }
.light {
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, #100d09a3, transparent 19%),
    radial-gradient(ellipse 58% 66% at 0% 100%, #060a07eb 0%, #060a07b8 42%, transparent 100%),
    linear-gradient(0deg, #080b09a8, transparent 29%);
}
.mast, footer {
  position: absolute;
  left: max(var(--inset), env(safe-area-inset-left));
  right: max(var(--inset), env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}
.mast { top: max(clamp(20px, 3.5vh, 48px), env(safe-area-inset-top)); }
.brand img { display: block; width: clamp(139px, 12vw, 184px); height: auto; }
nav { display: flex; align-items: center; }
nav a { min-width: 38px; min-height: 44px; display: grid; place-items: center; position: relative; font-size: 12px; font-weight: 500; letter-spacing: .12em; }
nav a:last-child { margin-right: -10px; }
nav a[aria-current]::after { content: ""; position: absolute; bottom: 5px; width: 13px; height: 2px; background: #de3930; }
.message {
  position: absolute;
  left: var(--inset);
  bottom: clamp(80px, 12svh, 150px);
  max-width: 42%;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 1px 14px #10110a80;
}
/* Titular: palo ultrafino en mayusculas muy abiertas. El lujo esta en el aire, no en el tamano. */
h1 { font-size: clamp(24px, 2.7vw, 46px); font-weight: 500; line-height: 1.4; letter-spacing: .28em; text-transform: uppercase; color: #f3ead9; white-space: nowrap; }
.message p { margin-top: 16px; max-width: none; white-space: pre-line; font-size: clamp(15px, 1.2vw, 20px); font-weight: 400; line-height: 1.7; letter-spacing: .02em; color: #f3ead9; }
/* Aviso legal abajo a la derecha, en diagonal con el logo. */
footer { bottom: max(12px, env(safe-area-inset-bottom)); gap: 24px; flex-direction: row-reverse; }
footer a, .transport { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #e9e2d2; font-size: 12px; font-weight: 400; letter-spacing: .06em; }
.transport { padding: 0; }
.transport-icon { width: 11px; height: 13px; position: relative; }
.transport-icon::before {
  content: ""; position: absolute; inset: 1px 0; margin: auto; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor;
}
[data-state="playing"] .transport-icon::before { inset: 1px; width: 8px; height: 10px; border: 0; border-inline: 2px solid currentColor; }
@media (max-aspect-ratio: 4/5) {
  .garden { min-height: 34rem; }
  .shot {
    /* Keep both the opened wings and their reflection in the portrait frame. */
    height: min(89%, 170vw);
    -webkit-mask-image: linear-gradient(#000 0 86%, transparent 100%);
    mask-image: linear-gradient(#000 0 86%, transparent 100%);
  }
  .garden {
    background: linear-gradient(0deg,#10150f 0%,#171b11 44%,#14170e 80%);
  }
  .light { background: linear-gradient(180deg, #090c09a8, transparent 18%, transparent 59%, #10150f3b 82%, #10150f55); }
  .message { bottom: max(76px, 8.5svh); max-width: none; right: var(--inset); }
  h1 { font-size: clamp(22px, 6.4vw, 34px); }
  .message p { margin-top: 12px; }
}
@media (max-height: 530px) and (min-aspect-ratio: 1/1) {
  .garden { min-height: 18rem; }
  .mast { top: max(8px, env(safe-area-inset-top)); }
  .message { bottom: 54px; }
  h1 { font-size: clamp(18px, 2.6vw, 30px); }
  .message p { font-size: 15px; margin-top: 5px; line-height: 1.35; }
  footer { bottom: max(2px, env(safe-area-inset-bottom)); }
}
/* Entrada en orden de importancia, una cosa cada vez: logo, titular, primera linea, segunda
   linea y pie. Solo cuando ha terminado arranca la escultura (ENTRADA_MS en estanque.js). */
/* El orden de cada trozo: lo pone el script en la carpeta de trabajo y esta regla en la web publicada. */
h1 span:nth-child(2), .message p span:nth-child(2) { --i: 1; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } }
.mast { animation: aparecer 1s ease .15s both; }
h1 span { display: block; width: max-content; animation: subir .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(1s + var(--i, 0) * .12s); }
.message p span { display: block; text-wrap: balance; animation: subir .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(2s + var(--i, 0) * .8s); }
footer { animation: aparecer .8s ease 3.2s both; }
@media (prefers-reduced-motion: reduce) {
  .film { display: none; }
  *, *::after, *::before { transition-duration: 0s !important; animation-duration: 0s !important; }
}
