/* La TTorre Artespacio: estilos. Sitio estático para Hostinger. */

:root {
  --paper: #fff;
  --ink: #000;
  --ink-2: #3d3d3d;
  --line: #dcdcdc;
  --plus: #e51c23;
  --font-display: "Josefin Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Karla", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --holo: url("/images/holo.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.plus { color: var(--plus); font-weight: 700; }

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

.stage {
  position: fixed; inset: 0; overflow: hidden;
  display: grid; place-items: center; background: #fff;
}
.stage::before {
  content: ""; position: absolute; inset: -25%;
  background: var(--holo) center / cover;
  opacity: 0;
  translate: var(--dx, 0%) var(--dy, 0%);
  transition: opacity .9s ease, translate .8s cubic-bezier(.2, .8, .2, 1);
  animation: drift 28s ease-in-out infinite alternate paused;
}
.stage:focus-within::before,
.stage.is-lit::before { opacity: 1; animation-play-state: running; }
@media (hover: hover) { .stage:hover::before { opacity: 1; animation-play-state: running; } }
@keyframes drift {
  from { transform: scale(1.02) rotate(-4deg); }
  to   { transform: scale(1.16) rotate(6deg); }
}

/* El logo está armado con piezas: la base y, por separado, cada palabra y cada + */
.logo-wrap {
  position: relative; isolation: isolate;
  width: min(94vw, calc(94dvh * 1.2244));
  aspect-ratio: 2052 / 1676;
  view-transition-name: logo;
}
.logo-base { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.plus-sign {
  position: absolute; display: block; height: auto;
  transition: rotate .8s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
}

.word {
  position: absolute; display: block; isolation: isolate; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale .5s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
}
.word img { position: absolute; display: block; height: auto; }

/* Resaltador con el degradado de la marca: la palabra se ve "marcada", como un enlace */
.word::before {
  content: ""; position: absolute; z-index: -1;
  left: 1%; right: 1%; top: 35%; height: 34%; border-radius: 999px;
  background: var(--holo) 0% var(--my, 15%) / 500% auto;
  transition: opacity .35s ease;
}
/* Cápsula que se enciende al pasar el cursor, tocar o enfocar con teclado */
.word::after {
  content: ""; position: absolute; z-index: -1;
  inset: -1% -3% 7% -3%; border-radius: 999px;
  background: rgba(255, 255, 255, .85); border: 2px solid var(--ink);
  opacity: 0; scale: .9;
  transition: opacity .35s ease, scale .5s cubic-bezier(.2, .8, .2, 1);
}
.word:hover, .word:focus-visible { scale: 1.1; outline: none; }
.word:hover::before, .word:focus-visible::before { opacity: 0; }
.word:hover::after, .word:focus-visible::after { opacity: 1; scale: 1; }
.word:active { scale: .95; }

/* Al enfocar una palabra, las demás piezas retroceden y los + giran */
.logo-wrap:has(.word:hover) .word:not(:hover),
.logo-wrap:has(.word:focus-visible) .word:not(:focus-visible) { opacity: .3; }
.logo-wrap:has(.word:hover) .plus-sign,
.logo-wrap:has(.word:focus-visible) .plus-sign { opacity: .3; rotate: 90deg; }

/* ---------- Navegación ---------- */

.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 64px;
}
.brand img { height: 48px; width: auto; }

.menu {
  display: flex; align-items: center; gap: .55em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
}
.menu a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; padding: 0 .1em;
  background: linear-gradient(var(--plus), var(--plus)) 0 100% / 0 3px no-repeat;
  transition: background-size .45s cubic-bezier(.2, .8, .2, 1);
}
.menu a:hover, .menu a:focus-visible { background-size: 100% 3px; }
.menu a[aria-current="page"] {
  background-image: linear-gradient(var(--ink), var(--ink)); background-size: 100% 3px;
}
.brand img { view-transition-name: logo; transform-origin: left center; }

/* ---------- Encabezado de página ---------- */

.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(44px, 9vw, 112px) 0 clamp(36px, 7vw, 84px);
}
.page-hero::before {
  content: ""; position: absolute; inset: -30% -10%; z-index: -1;
  background: var(--holo) center var(--hy, 0%) / cover;
}
.page-hero--arte { --hy: 6%; }
.page-hero--fotografia { --hy: 44%; }
.page-hero--espacio { --hy: 84%; }

.wordmark {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 8.4vw, 5.9rem); line-height: 1.04; letter-spacing: .01em;
}
.wordmark--long { font-size: clamp(1.55rem, 5.4vw, 4.2rem); }
.wordmark .plus { margin: 0 .04em; }
.lede {
  margin: clamp(14px, 2.4vw, 26px) 0 0; max-width: 34ch;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem); line-height: 1.4; font-weight: 500;
}

/* ---------- Secciones ---------- */

.block { padding: clamp(40px, 7vw, 84px) 0; }
.block + .block { border-top: 1px solid var(--line); }

h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.55rem, 3.3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 700; }
.block h2 .plus { margin-right: .3em; }
.block-head { margin-bottom: clamp(22px, 3.6vw, 40px); }
.block-head p { margin: 10px 0 0; max-width: 62ch; color: var(--ink-2); }
.sub { margin-top: clamp(30px, 5vw, 56px); }
.sub h3 { margin-bottom: 16px; }

.intro { margin: 0 0 clamp(24px, 4vw, 40px); max-width: 60ch; font-size: 1.15rem; }

.jump {
  display: flex; gap: 6px 26px; flex-wrap: wrap;
  padding: 18px 0 0; font-family: var(--font-display); font-weight: 600;
}
.jump a {
  text-decoration: none; padding: 2px 0;
  background:
    linear-gradient(var(--plus), var(--plus)) 0 100% / 0 3px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 2px no-repeat;
  transition: background-size .45s cubic-bezier(.2, .8, .2, 1);
}
.jump a:hover, .jump a:focus-visible { background-size: 100% 3px, 100% 2px; }

/* ---------- Hoja de contactos (galerías) ---------- */

.sheet {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 28px 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.sheet--small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.sheet--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (max-width: 600px) {
  .sheet, .sheet--small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .sheet--wide { grid-template-columns: 1fr; }
}

.tile {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.tile-img {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--holo) var(--px, 0%) var(--py, 0%) / 320% auto;
  transition: background-position 1.4s cubic-bezier(.2, .8, .2, 1);
}
.tile-img::after {
  content: "+"; position: absolute; inset: 0; z-index: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--plus);
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.tile-img img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .9s ease, scale 1.1s cubic-bezier(.2, .8, .2, 1);
}
.js .tile-img img:not(.is-loaded) { opacity: 0; }
.tile:hover .tile-img { background-position: calc(var(--px, 0%) + 14%) calc(var(--py, 0%) + 14%); }
.tile:hover .tile-img img { scale: 1.07; }
.tile:hover .tile-img::after { transform: rotate(90deg) scale(1.25); }
.tile-img img.is-missing { display: none; }
.tile-img--wide { aspect-ratio: 16 / 9; }
.tile-img--room { aspect-ratio: 3 / 2; }
.tile-img--video { aspect-ratio: 16 / 9; }
.tile-img--video::after {
  content: ""; width: 0; height: 0; inset: auto; top: 50%; left: 50%;
  transform: translate(-35%, -50%); display: block;
  border-left: 26px solid var(--plus);
  border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}

.tile-img--video::after { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile-img--video::after { transform: translate(-35%, -50%) scale(1.2); }
.tile-name {
  display: block; margin-top: 10px; padding-bottom: 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.25;
  background: linear-gradient(var(--plus), var(--plus)) 0 100% / 0 3px no-repeat;
  transition: background-size .5s cubic-bezier(.2, .8, .2, 1);
}
.tile-detail { display: block; color: var(--ink-2); font-size: .95rem; line-height: 1.4; }
.tile-soon { display: block; margin-top: 2px; font-size: .9rem; color: var(--ink-2); font-style: italic; }
.tile:hover .tile-name, .tile:focus-visible .tile-name { background-size: 100% 3px; }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-img { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- Paquetes ---------- */

.plans {
  display: grid; gap: 34px 30px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.plan { position: relative; padding-top: 17px; }
.plan::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ink); transform-origin: left;
}
.plan h3 { margin-bottom: 2px; }
.plan .what { margin: 0; color: var(--ink-2); font-size: .98rem; }
.price {
  margin: 6px 0 14px; font-family: var(--font-display);
  font-weight: 700; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.1;
}
.price small { font-size: .42em; font-weight: 600; margin-right: .4em; }
.price sup { font-size: .5em; color: var(--plus); margin-left: 1px; }
.plan ul { margin: 0; padding-left: 1.15em; }
.plan li { margin: 0; }
.plan li + li { margin-top: .45em; }
.plan li::marker { color: var(--plus); }
.plan p + ul { margin-top: 10px; }

.notes { margin: 26px 0 0; max-width: 72ch; color: var(--ink-2); font-size: .95rem; }
.notes p { margin: 0 0 6px; }
.packs-title { margin: clamp(30px, 5vw, 54px) 0 18px; }

/* ---------- Botones ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: color .4s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--holo) 50% 40% / 300% auto;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover, .btn:focus-visible { color: var(--ink); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn--line { background: #fff; color: var(--ink); }

.text-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; }
.text-links a {
  font-family: var(--font-display); font-weight: 600;
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.text-links a:hover { text-decoration-color: var(--plus); }

.rule-note { max-width: 66ch; }
.rule-note strong { font-weight: 700; }

/* ---------- Visor de galerías ---------- */

.viewer {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0; background: #fff; color: var(--ink); overflow: auto;
}
.viewer::backdrop { background: rgba(0, 0, 0, .72); }
.viewer {
  opacity: 0; translate: 0 36px;
  transition: opacity .4s ease, translate .55s cubic-bezier(.2, .8, .2, 1),
              overlay .55s allow-discrete, display .55s allow-discrete;
}
.viewer[open] { opacity: 1; translate: 0 0; }
@starting-style { .viewer[open] { opacity: 0; translate: 0 36px; } }
.viewer::backdrop {
  opacity: 0;
  transition: opacity .4s ease, overlay .4s allow-discrete, display .4s allow-discrete;
}
.viewer[open]::backdrop { opacity: 1; }
@starting-style { .viewer[open]::backdrop { opacity: 0; } }
@media (min-width: 900px) {
  .viewer {
    width: min(1100px, 92vw); height: auto; max-height: min(92dvh, 1000px);
    margin: auto; border: 2px solid var(--ink);
  }
}
.viewer-bar {
  position: sticky; top: 0; z-index: 2; background: #fff;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter); border-bottom: 1px solid var(--line);
}
.viewer-bar h2 { font-size: 1.5rem; }
.viewer-detail { margin: 2px 0 0; color: var(--ink-2); }
.viewer-close {
  flex: none; min-height: 44px; padding: 0 16px; background: #fff; color: var(--ink);
  border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 600;
  font-size: 1rem; cursor: pointer;
}
.viewer-close:hover { background: var(--ink); color: #fff; }
.viewer-contact { padding: 12px var(--gutter) 0; }
.viewer-contact .text-links { margin: 0; }
.viewer-body { max-width: 900px; margin: 0 auto; padding: 18px var(--gutter) 32px; }
.viewer-body img {
  width: 100%; height: auto; margin: 0 0 14px; background: #f1f1f1;
  transition: opacity .8s ease calc(min(var(--i, 0), 6) * 70ms),
              translate .9s cubic-bezier(.2, .8, .2, 1) calc(min(var(--i, 0), 6) * 70ms);
}
.viewer-body img:not(.is-loaded) { opacity: 0; translate: 0 28px; }
.viewer-body img.is-missing { display: none; }
.viewer-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.viewer-frame iframe, .viewer-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.viewer-empty {
  margin: 0; padding: clamp(28px, 6vw, 64px) 0; max-width: 40ch;
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.35;
}

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

.site-foot { border-top: 1px solid var(--line); padding: 30px 0 42px; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.site-foot p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.site-foot .text-links { margin: 0; }

/* ---------- 404 ---------- */

.lost { padding: clamp(60px, 14vw, 160px) 0; }

/* ---------- Ajustes ---------- */

@media (max-width: 360px) {
  .menu { font-size: .92rem; gap: .35em; }
  .brand img { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Movimiento (solo CSS) ---------- */
/* Todo va dentro de "sin preferencia de movimiento reducido" y, lo que depende de
   la línea de tiempo del scroll, dentro de @supports: si el navegador no lo soporta,
   el contenido se ve igual, solo sin la animación. */

@media (prefers-reduced-motion: no-preference) {

  /* Transición entre páginas: el logo de la portada viaja hasta la barra */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: .32s cubic-bezier(.4, 0, 1, 1) both vt-out; }
  ::view-transition-new(root) { animation: .6s cubic-bezier(0, 0, .2, 1) .08s both vt-in; }
  ::view-transition-group(logo) {
    animation-duration: .8s; animation-timing-function: cubic-bezier(.65, 0, .2, 1);
  }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

  /* Entrada de la portada cuando se abre directo (la clase .fresh la pone el script del head):
     primero el perfil, luego las palabras llegan una a una y los + giran */
  .fresh .logo-base { animation: logo-in 1.3s cubic-bezier(.2, .8, .2, 1) backwards; }
  @keyframes logo-in {
    from { opacity: 0; scale: .94; filter: blur(12px); }
    to { opacity: 1; scale: 1; filter: blur(0); }
  }
  .fresh .word { animation: word-in .9s cubic-bezier(.2, .8, .2, 1) calc(.7s + var(--n, 0) * .16s) backwards; }
  @keyframes word-in { from { opacity: 0; translate: 0 12%; scale: .9; } }
  .fresh .plus-sign { animation: plus-in 1.2s cubic-bezier(.2, .8, .2, 1) calc(.6s + var(--n, 0) * .3s) backwards; }

  /* Portada: las palabras "flotan" apenas, una tras otra, y el resaltador se desliza */
  .word img { animation: bob 3.8s ease-in-out infinite; animation-delay: calc(var(--n, 0) * .5s); }
  @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5%; } }
  .word::before { animation: marker-drift 9s ease-in-out infinite alternate; animation-delay: calc(var(--n, 0) * -3s); }
  @keyframes marker-drift { from { background-position-x: 0%; } to { background-position-x: 100%; } }

  /* Encabezado de cada página: el título entra y el + gira */
  .wordmark { animation: rise-in 1s cubic-bezier(.2, .8, .2, 1) .12s backwards; }
  .wordmark .plus { display: inline-block; animation: plus-in 1.3s cubic-bezier(.2, .8, .2, 1) .25s backwards; }
  .lede { animation: rise-in 1s cubic-bezier(.2, .8, .2, 1) .3s backwards; }
  @keyframes rise-in {
    from { opacity: 0; translate: 0 .6em; filter: blur(8px); }
    to { opacity: 1; translate: 0 0; filter: blur(0); }
  }
  @keyframes plus-in { from { rotate: -270deg; scale: .2; } to { rotate: 0deg; scale: 1; } }

  /* El degradado del encabezado fluye despacio */
  .page-hero::before { animation: hero-drift 30s ease-in-out infinite alternate; }
  @keyframes hero-drift {
    from { transform: scale(1.05) translateX(-3%); }
    to { transform: scale(1.18) translateX(3%); }
  }

  @supports (animation-timeline: view()) {

    /* Al bajar: cada pieza sube y aparece */
    .block-head, .sub h3, .packs-title, .notes, .cta-row, .intro, .sheet > li, .plan {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes rise {
      from { opacity: 0; translate: 0 48px; scale: .96; }
      to { opacity: 1; translate: 0 0; scale: 1; }
    }
    /* Escalonado dentro de cada fila */
    .sheet > li:nth-child(4n + 2), .plan:nth-child(4n + 2) { animation-range: entry 6% entry 61%; }
    .sheet > li:nth-child(4n + 3), .plan:nth-child(4n + 3) { animation-range: entry 12% entry 67%; }
    .sheet > li:nth-child(4n + 4), .plan:nth-child(4n + 4) { animation-range: entry 18% entry 73%; }

    /* Cada + de título gira al entrar en pantalla */
    .block h2 .plus {
      display: inline-block;
      animation: plus-turn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
    @keyframes plus-turn { from { rotate: -180deg; scale: .3; } to { rotate: 0deg; scale: 1; } }

    /* La línea de cada paquete se dibuja */
    .plan::before {
      animation: draw linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }

  @supports (animation-timeline: scroll()) {

    /* El degradado del encabezado avanza más lento que la página */
    .page-hero::before {
      animation: hero-drift 30s ease-in-out infinite alternate, hero-scroll linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 80vh;
    }
    @keyframes hero-scroll { from { translate: 0 0; } to { translate: 0 28%; } }

    /* La barra gana sombra y el logo se encoge al bajar */
    .site-nav {
      animation: nav-solid linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120px;
    }
    .brand img {
      animation: brand-shrink linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120px;
    }
    @keyframes nav-solid {
      from { box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
      to { box-shadow: 0 10px 30px rgba(0, 0, 0, .09); }
    }
    @keyframes brand-shrink { from { scale: 1; } to { scale: .8; } }
  }
}
