/* Belus · coming soon
   Paleta: guía de color de Belus. Tipografía y retícula: catálogo Cassiopeia. */

:root {
  --green: #4a7363;   /* Reflection Green */
  --ink: #231f20;     /* negro del catálogo */
  --stone: #606060;   /* Stone Grey */
  --white: #ffffff;
  --pad: clamp(24px, 4.45vw, 64px);
  --serif: "PP Writer", Georgia, serif;
  --display: "PP Editorial New", "Times New Roman", serif;
  --sans: "Aeonik", "Helvetica Neue", Arial, sans-serif;
  /* halo de la portada: radio y altura del centro (el centro va en el borde izquierdo) */
  --glow-r: min(75vw, 33vh);
  --glow-y: 42%;
  /* cuerpo del título y ancho de la columna de portada (título y bloque inferior) */
  --title: clamp(34px, 11.3vw, 56px);
  --col: min(100%, calc(8.7 * var(--title)));
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- Portada ---------- */

.intro { position: relative; }

.cover {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--green);
  color: var(--white);
}

/* Con JavaScript: la portada se queda fija mientras el halo crece */
.is-enhanced .intro { height: calc(100vh + 130vh); height: calc(100svh + 130vh); }
.is-enhanced .cover { position: sticky; top: 0; }

.cover__glow {
  position: absolute;
  left: calc(var(--glow-r) * -1);
  top: calc(var(--glow-y) - var(--glow-r));
  width: calc(var(--glow-r) * 2);
  height: calc(var(--glow-r) * 2);
  /* rampa de la portada del catálogo, con la cola suavizada para que el halo no tenga borde */
  background: radial-gradient(closest-side,
    #ffffff 0%, #f4f5f4 5%, #e8ebe7 10%, #dbe1d9 15%, #ced6cd 20%,
    #c1cbc0 25%, #b5c1b5 30%, #a9b7aa 35%, #9cada0 40%, #90a495 45%,
    #849c8c 50%, #799384 55%, #6f8c7c 60%, #678676 65%, #608272 70%,
    #5a7e6e 75%, #547a6a 80%, #507767 85%, #4d7565 90%, #4b7363 95%,
    #4a7363 100%);
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}

.cover__veil {
  position: absolute;
  inset: 0;
  background: var(--white);
  opacity: 0;
  will-change: opacity;
  pointer-events: none;
}

.cover__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px var(--pad) 24px;
  will-change: opacity, transform;
}

.cover__title {
  margin: 0;
  display: flex;
  justify-content: space-between;
  width: var(--col);
  font-family: var(--display);
  font-weight: 200;
  font-size: var(--title);
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.cover__bottom { display: flex; flex-direction: column; gap: clamp(20px, 5vh, 56px); width: var(--col); }

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cover .button:hover,
.cover .button:focus-visible { background: var(--white); border-color: var(--white); color: var(--green); }
.foot .button:hover,
.foot .button:focus-visible,
.modal .button:hover,
.modal .button:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--white); }
.button:disabled { opacity: 0.5; cursor: default; }

.textlink {
  display: inline-flex;
  align-items: center;
  height: 48px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
}
.textlink:hover { text-decoration-thickness: 2px; }

.cover__foot { display: grid; grid-template-columns: auto 1fr auto; align-items: end; column-gap: 8px; }

.wordmark { display: block; flex: none; width: clamp(84px, 24.5vw, 104px); height: auto; aspect-ratio: 1528 / 471; fill: currentColor; }

.credit { margin: 0; text-align: right; font-size: clamp(11.5px, 3.3vw, 13px); line-height: 1.32; white-space: nowrap; }

.scrollhint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-self: center;
  min-width: 44px;
  padding-top: 8px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.scrollhint span { padding-left: 0.08em; }
.scrollhint i {
  display: block;
  width: 1px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.4);
  background-image: linear-gradient(#ffffff, #ffffff);
  background-repeat: no-repeat;
  background-size: 1px 12px;
  background-position: 0 -12px;
}
.is-enhanced .scrollhint i { animation: hint 2.4s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
@keyframes hint {
  0% { background-position: 0 -12px; }
  70%, 100% { background-position: 0 32px; }
}

/* ---------- Colección ---------- */

.collection {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
/* entra mientras la portada termina de quedarse en blanco */
.is-enhanced .collection { margin-top: -36vh; }

/* cabecera: en móvil la etiqueta va sobre el título; en escritorio, título a la izquierda y etiqueta a la derecha */
.collection__head {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 14px;
  padding-top: clamp(40px, 9vh, 96px);
}

.label {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 10.5px;
  line-height: 16px;
  letter-spacing: 0.08em;
  color: var(--stone);
  white-space: nowrap;
}

.collection__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 200;
  font-size: 22px;
  line-height: 28px;
  letter-spacing: 0;
}

/* Galería: musa y vidrio intercalados, todos al mismo tamaño.
   En móvil, cada fila es una musa (izquierda) y su vidrio (derecha, algo más abajo). */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 48px;
  align-items: start;
  margin-top: clamp(24px, 4vh, 40px);
}

.fig { margin: 0; }
.fig:nth-child(2n) { margin-top: 40px; }
.fig img { width: 100%; aspect-ratio: 7 / 9; object-fit: cover; background: #f1efeb; }
.fig figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 10.5px;
  line-height: 16px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

/* ---------- Pie ---------- */

.foot {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(64px, 11vh, 120px) var(--pad) clamp(24px, 5vh, 48px);
}

.motto {
  margin: clamp(48px, 9vh, 96px) 0 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 10.5px;
  line-height: 16px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ---------- Formulario emergente ---------- */

html.has-modal { overflow: hidden; }

.modal {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal::backdrop { background: rgba(35, 31, 32, 0.55); }
.modal[open] { animation: modal-in 0.32s cubic-bezier(0.2, 0.6, 0.2, 1); }
.modal[open]::backdrop { animation: veil-in 0.32s ease; }
@keyframes modal-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes veil-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__box { display: flex; flex-direction: column; gap: 28px; padding: clamp(24px, 6.5vw, 36px); }
.modal__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.modal__title { margin: 0; font-family: var(--display); font-weight: 200; font-size: clamp(18px, 5vw, 22px); line-height: 1.27; letter-spacing: 0; }
.modal__close {
  margin: -14px 0;
  padding: 14px 0 14px 16px;
  border: 0;
  background: none;
  color: var(--stone);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.modal__close:hover { color: var(--ink); }
.modal__close:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

.modal__form { display: flex; flex-direction: column; gap: 22px; }
.modal__form[hidden],
.modal__done[hidden] { display: none; }

.field { display: flex; flex-direction: column; }
.field__label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  color: var(--stone);
}
.field__input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 24px;
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}
textarea.field__input { min-height: 82px; }
.field__input:focus { outline: none; border-bottom-width: 2px; padding-bottom: 9px; }
.field__error { margin: 6px 0 0; font-size: 13px; line-height: 18px; }
.field__error:empty { display: none; }

.modal__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.modal__foot { display: flex; align-items: center; gap: 20px; }
.modal__status { margin: 0; font-size: 14px; line-height: 19px; color: var(--stone); }
.modal__note { margin: 0; font-size: 13px; line-height: 18px; color: var(--stone); }

.modal__done { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.modal__thanks { margin: 0; font-size: 18px; line-height: 25px; }

/* ---------- Aparición de las imágenes ---------- */

.is-enhanced .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1.1s cubic-bezier(0.2, 0.6, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.is-enhanced .reveal.is-in { opacity: 1; transform: none; }
.is-enhanced .reveal:nth-child(2n) { transition-delay: 0.12s; }

/* ---------- Escritorio ---------- */

/* portada a dos columnas: escritorio y móviles en horizontal */
@media (min-width: 960px), (orientation: landscape) and (max-height: 520px) and (min-width: 640px) {
  :root { --glow-r: 60vw; --glow-y: 50%; --title: clamp(40px, 5vw, 84px); }
  .cover__content { padding: clamp(24px, 7vh, 64px) var(--pad) clamp(24px, 7vh, 64px) calc(50% + 32px); }
}

@media (min-width: 960px) {
  .actions { gap: 4px 28px; }
  .button { padding: 0 26px; }
  .wordmark { width: clamp(120px, 10.4vw, 150px); }
  .credit { font-size: 15px; line-height: 20px; }
  .label, .fig figcaption, .motto { font-size: 11px; }
  .label { font-size: 12px; }

  .collection__head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 24px; }

  /* tres por fila, la del centro más abajo: el tamaño y el escalonado de Polymnia y Euterpe */
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; row-gap: clamp(96px, 11vw, 168px); }
  .fig figcaption { margin-top: 12px; }
  .fig:nth-child(2n) { margin-top: 0; }
  .fig:nth-child(3n + 2) { margin-top: clamp(80px, 10vw, 144px); }
  .is-enhanced .reveal:nth-child(2n) { transition-delay: 0s; }
  .is-enhanced .reveal:nth-child(3n + 2) { transition-delay: 0.12s; }
  .is-enhanced .reveal:nth-child(3n) { transition-delay: 0.24s; }
}

/* ---------- Sin animación ---------- */

@media (prefers-reduced-motion: reduce) {
  .scrollhint i { animation: none !important; background-position: 0 0; }
  .button { transition: none; }
  .modal[open], .modal[open]::backdrop { animation: none; }
}

/* móviles muy estrechos: sin indicador de scroll para que la fila inferior no se apriete */
@media (max-width: 340px) {
  .scrollhint { display: none; }
  .cover__foot { grid-template-columns: auto 1fr; }
  .actions { flex-wrap: nowrap; gap: 0 12px; }
  .button { padding: 0 12px; }
  .button, .textlink { font-size: 11px; }
}
