/* Hifa · página de «muy pronto». Colores tomados de los valores provisionales de
   marca/tokens.json (tarea hifa/001); cuando Daniel elija la ruta de marca, se cambian aquí. */
@font-face {
  font-family: "Fraunces";
  src: url("/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --fondo: #faf8fc;
  --fondo-lila: #efe7f8;
  --fondo-rosa: #fde9f2;
  --texto: #231a2e;
  --texto-suave: #5b4d6b;
  --marca: #6b4c9a;
  --marca-fuerte: #4e3474;
  --acento: #b0457a;
  --borde: #ddd3e8;
  --superficie: rgba(255, 255, 255, .72);
  --hilo-a: #8f6fd6;
  --hilo-b: #e07fb0;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #16111d;
    --fondo-lila: #2a1f3d;
    --fondo-rosa: #38192c;
    --texto: #f1ebf7;
    --texto-suave: #bcaecd;
    --marca: #c3a6ee;
    --marca-fuerte: #dcc8f7;
    --acento: #f0a1c6;
    --borde: #3c3049;
    --superficie: rgba(31, 24, 40, .66);
    --hilo-a: #b79cf0;
    --hilo-b: #f0a1c6;
  }
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  color: var(--texto);
  font-family: var(--sans);
  background:
    radial-gradient(70rem 46rem at 12% 8%, var(--fondo-lila) 0%, transparent 62%),
    radial-gradient(60rem 44rem at 92% 92%, var(--fondo-rosa) 0%, transparent 60%),
    var(--fondo);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#micelio {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, footer { position: relative; z-index: 1; }

main {
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem 1rem;
  gap: clamp(.9rem, 2.2vw, 1.5rem);
}

.casa {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--texto-suave);
  padding-left: .34em;
  animation: subir .9s .1s both cubic-bezier(.2, .7, .2, 1);
}

.marca {
  margin: 0;
  position: relative;
  line-height: .86;
  animation: subir 1.1s .2s both cubic-bezier(.2, .7, .2, 1);
}

.palabra {
  display: block;
  font-family: var(--serif);
  font-weight: 480;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(6.2rem, 27vw, 17rem);
  letter-spacing: -.045em;
  padding: 0 .06em .06em;
  background: linear-gradient(118deg, var(--marca-fuerte) 8%, var(--marca) 46%, var(--acento) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hilo {
  display: block;
  width: 104%;
  margin: -.2rem -2% 0;
  height: clamp(1.6rem, 5vw, 3.2rem);
  overflow: visible;
}

.hilo path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
}

.hilo-trazo {
  stroke: var(--hilo-a);
  stroke-width: 2.4;
  animation: crecer 2.6s .9s forwards cubic-bezier(.5, .1, .2, 1);
}

.hilo-rama {
  stroke: var(--hilo-b);
  stroke-width: 1.8;
  animation: crecer 1.1s 2.1s forwards ease-out;
}

.hilo-rama-2 { animation-delay: 2.9s; }

.hilo-nodo {
  fill: var(--hilo-b);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: brotar .6s 2s forwards cubic-bezier(.3, 1.6, .5, 1);
}

.hilo-nodo-2 { animation-delay: 2.8s; }

.lema {
  margin: 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 100;
  font-weight: 380;
  font-size: clamp(1.35rem, 3.6vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -.012em;
  color: var(--texto);
  text-wrap: balance;
  animation: subir 1.1s .55s both cubic-bezier(.2, .7, .2, 1);
}

.pronto {
  margin: clamp(.4rem, 1.4vw, 1rem) 0 0;
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: .62em 1.15em .62em 1em;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--superficie);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--marca-fuerte);
  animation: subir 1.1s .8s both cubic-bezier(.2, .7, .2, 1);
}

.pulso {
  position: relative;
  width: .62em;
  height: .62em;
  border-radius: 50%;
  background: var(--acento);
}

.pulso::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--acento);
  animation: latir 2.4s infinite ease-out;
}

footer {
  padding: 1rem 1.25rem max(1.6rem, env(safe-area-inset-bottom));
  text-align: center;
}

footer p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--texto-suave);
  text-wrap: balance;
  animation: subir 1.2s 1.2s both cubic-bezier(.2, .7, .2, 1);
}

@keyframes subir {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes crecer { to { stroke-dashoffset: 0; } }

@keyframes brotar {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes latir {
  from { opacity: .55; transform: scale(1); }
  to   { opacity: 0;   transform: scale(3.4); }
}

@media (prefers-reduced-motion: reduce) {
  .casa, .marca, .lema, .pronto, footer p { animation: none; }
  .hilo path { animation: none; stroke-dashoffset: 0; }
  .hilo-nodo { animation: none; opacity: 1; }
  .pulso::after { animation: none; opacity: 0; }
}
