/* BioIntegral Health · Landing "Cuaderno de noche"
   Un escritorio de noche (tinta lisa) y hojas de papel marfil.
   Dos voces: Newsreader para lo que escribe la persona, Figtree para la app. */

:root {
  --ink: #140C2B;
  --deep: #1E1440;
  --night-plum: #2C1D5A;
  --night-text: #F6F1FF;
  --night-muted: #B9AED6;
  --ivory: #FBF8F3;
  --white: #FFFFFF;
  --plum: #39266B;
  --plum-muted: #6D628A;
  --violet: #7248E8;
  --violet-soft: #EEE9FF;
  --coral: #FF6B66;
  --coral-hover: #FF807B;
  --mint: #63BFA7;
  --mint-deep: #287C6A;
  --gold: #F5B93F;
  --gold-text: #8A5A07;
  --border: #E9E2F5;

  --voice: "Newsreader", Georgia, serif;
  --ui: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ink); color: var(--plum);
  font: 400 1.0625rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, blockquote, figure, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ivory); color: var(--plum); border-radius: 8px; }
.skip:focus { top: 16px; }

/* Botones y enlaces */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px; border-radius: 12px;
  font: 600 1rem/1.2 var(--ui); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, transform .2s var(--ease), border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn--coral { background: var(--coral); color: var(--ink); }
.btn--coral:hover { background: var(--coral-hover); transform: translateY(-1px); }
.btn--outline { color: var(--night-text); box-shadow: inset 0 0 0 1px rgba(246, 241, 255, .45); }
.btn--outline:hover { background: rgba(246, 241, 255, .08); box-shadow: inset 0 0 0 1px rgba(246, 241, 255, .8); }
.btn--sm { padding: 10px 18px; font-size: .9375rem; }

.link {
  font-weight: 600; text-decoration: none; color: var(--night-text);
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  padding-bottom: 3px; transition: background-size .35s var(--ease);
}
.link:hover { background-size: 0% 1px; background-position: right bottom; }
.link--plum { color: var(--plum); }

/* Cursor que parpadea, como en un campo de texto */
.caret { display: inline-block; width: 2px; height: .95em; margin-left: 2px; vertical-align: -0.08em; background: var(--plum); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Navegación */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .3s, box-shadow .3s;
}
.nav.is-scrolled { background: rgba(20, 12, 43, .97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(246, 241, 255, .08); }
.nav__ink {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold); transform-origin: left; transform: scaleX(var(--read, 0));
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 80px; }
.nav__brand img { width: 132px; height: auto; }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  position: relative; text-decoration: none; color: var(--night-muted); font-weight: 500; font-size: .9375rem;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:hover, .nav__links a.is-current { color: var(--night-text); }
.nav__links a.is-current::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 18px; }
.lang { color: var(--night-muted); font-weight: 600; font-size: .875rem; letter-spacing: .04em; padding: 6px 4px; transition: color .2s; }
.lang:hover { color: var(--night-text); }

/* Hero: el escritorio */
.hero { position: relative; overflow: hidden; padding: 150px 0 120px; color: var(--night-text); }
.hero__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.hero__title {
  font: 600 clamp(2.6rem, 4.7vw, 4.1rem)/1.04 var(--ui); letter-spacing: -.028em;
  max-width: 11ch; text-wrap: balance;
}
.hero__lede { margin-top: 26px; max-width: 42ch; color: var(--night-muted); font-size: 1.125rem; }
.hero__ctas { display: flex; align-items: center; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero__note { margin-top: 26px; font-size: .875rem; color: rgba(185, 174, 214, .8); max-width: 40ch; }

.desk { position: relative; min-height: 600px; }

/* El logo como se presenta en la landing actual, con menos brillo */
.mark { position: absolute; top: -84px; right: -64px; width: min(480px, 76%); aspect-ratio: 1; }
/* Las ondas de la landing actual: tres anillos que nacen del símbolo y se disuelven */
.halo {
  position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(238, 233, 255, .14), rgba(114, 72, 232, .1) 45%, transparent 70%);
  animation: breathe 10s ease-in-out infinite;
}
.ripple {
  position: absolute; inset: 22%; border-radius: 50%;
  border: 1px solid rgba(238, 233, 255, .22);
  opacity: 0; animation: ripple 15s linear infinite;
}
.ripple--2 { animation-delay: -5s; }
.ripple--3 { animation-delay: -10s; }
.mark__knot {
  position: absolute; inset: 24%; width: 52%;
  filter: drop-shadow(0 0 14px rgba(238, 233, 255, .14));
  animation: float 10s ease-in-out infinite;
}
.dot { position: absolute; width: 8.5%; aspect-ratio: 1; border-radius: 50%; }
.dot--mint { left: 17%; top: 19%; background: var(--mint); --c: rgba(99, 191, 167, .38); }
.dot--gold { right: 17%; top: 19%; background: var(--gold); --c: rgba(245, 185, 63, .38); }
.dot--coral { left: 45.75%; bottom: 13%; background: var(--coral); --c: rgba(255, 107, 102, .38); }
.mark .dot { animation: glow 10s ease-in-out infinite; }
.mark .dot--gold { animation-delay: -3.3s; }
.mark .dot--coral { animation-delay: -6.6s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.88); opacity: .7; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes ripple { 0% { transform: scale(.7); opacity: 0; } 15% { opacity: .9; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) scale(.985); } 50% { transform: translateY(-6px) scale(1.01); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 6px 0 var(--c); } 50% { box-shadow: 0 0 22px 4px var(--c); } }

/* La hoja de papel */
.sheet {
  position: absolute; left: 0; bottom: 0; width: min(440px, 63%);
  padding: 38px 40px 32px; background: var(--ivory); color: var(--plum);
  border-radius: 3px; transform: rotate(-1.6deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 34px 60px -28px rgba(0, 0, 0, .7);
}
.sheet__voice p {
  font: 400 clamp(1.5rem, 2.2vw, 1.95rem)/1.24 var(--voice); letter-spacing: -.01em;
}
.pen {
  padding-bottom: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5C40 4 90 3.2 130 4.2S185 6.4 198 4.8' fill='none' stroke='%23F5B93F' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 0% .32em no-repeat;
  transition: background-size .9s var(--ease);
}
.pen.is-drawn { background-size: 100% .32em; }
.sheet__voice p.is-pending { color: transparent; }
.sheet__voice p.is-pending .caret { visibility: hidden; }
.sheet__reply {
  position: relative; margin-top: 26px; padding: 22px 0 0 24px;
  border-top: 1px solid var(--border);
  font-weight: 500; font-size: 1.0625rem; line-height: 1.5; max-width: 40ch;
}
.sheet__reply::before {
  content: ""; position: absolute; left: 0; top: 31px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint);
}

/* Coreografía de entrada (sólo con movimiento permitido) */
.motion .mark { opacity: 0; transform: scale(.94); transition: opacity 1.4s var(--ease), transform 1.6s var(--ease); }
.motion .mark .dot { opacity: 0; transform: scale(.4); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.motion .sheet { opacity: 0; transform: translate(40px, 50px) rotate(5deg); transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
.motion .sheet__reply { opacity: 0; }
.motion .sheet__reply::before { transform: scale(0); transition: transform .5s var(--ease); }
.motion .hero__copy > * { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.motion .hero__copy > :nth-child(2) { transition-delay: .12s; }
.motion .hero__copy > :nth-child(3) { transition-delay: .24s; }
.motion .hero__copy > :nth-child(4) { transition-delay: .36s; }

.is-ready .mark { opacity: 1; transform: none; }
.is-ready .mark .dot { opacity: 1; transform: none; }
.is-ready .mark .dot--mint { transition-delay: .7s; }
.is-ready .mark .dot--gold { transition-delay: .9s; }
.is-ready .mark .dot--coral { transition-delay: 1.1s; }
.is-ready .sheet { opacity: 1; transform: rotate(-1.6deg); transition-delay: .45s; }
.is-ready .hero__copy > * { opacity: 1; transform: none; }
.sheet__reply.is-shown { opacity: 1; transition: opacity .9s var(--ease); }
.sheet__reply.is-shown::before { transform: scale(1); }
.sheet .caret.is-done { animation: blink 1.05s steps(1) 3 forwards; }

/* Encabezados de sección */
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head h2 { font: 600 clamp(2rem, 3.4vw, 2.75rem)/1.1 var(--ui); letter-spacing: -.022em; color: var(--plum); text-wrap: balance; }
.section-head p { margin-top: 16px; color: var(--plum-muted); font-size: 1.125rem; max-width: 52ch; }

/* Papel: el recorrido en tres entradas */
.paper { background: var(--ivory); padding: 130px 0 110px; }
.entries { position: relative; }
.entries::before {
  content: ""; position: absolute; left: 58px; top: 0; bottom: 0; width: 1px; background: rgba(255, 107, 102, .3);
}
.entry {
  display: grid; grid-template-columns: 84px minmax(0, 4fr) minmax(0, 5fr); gap: 0 48px; align-items: start;
  padding: 52px 0; border-top: 1px solid var(--border);
}
.entry:last-child { border-bottom: 1px solid var(--border); }
.entry__n { font: 400 3.25rem/1 var(--voice); color: var(--plum-muted); padding-left: 6px; }
.entry__text h3 { font: 600 1.375rem/1.25 var(--ui); letter-spacing: -.01em; }
.entry__text p { margin-top: 12px; color: var(--plum-muted); max-width: 40ch; }

.artifact { border-radius: 16px; padding: 24px; }
.artifact--input, .artifact--reading { background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.a-label { font-size: .8125rem; font-weight: 600; color: var(--plum-muted); }
.a-field { margin-top: 10px; min-height: 4.2em; font: 400 1.1875rem/1.4 var(--voice); color: var(--plum); }
.caret--plum { background: var(--plum); }
.a-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.a-mic { position: relative; display: inline-flex; align-items: center; gap: 7px; color: var(--mint-deep); font-weight: 600; font-size: .875rem; }
.a-mic svg { position: relative; z-index: 1; }
.a-mic::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: rgba(99, 191, 167, .22); transform: scale(.6); opacity: 0;
}
.is-in .a-mic::before { animation: listen 2.4s ease-out infinite; }
@keyframes listen { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.a-btn { background: var(--coral); color: var(--ink); padding: 10px 18px; border-radius: 18px; font-weight: 600; font-size: .875rem; }

.artifact--reading { display: grid; gap: 18px; }
.r-line { position: relative; padding-left: 18px; }
.r-line::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; transform-origin: top; }
.r-line--mint::before { background: var(--mint); }
.r-line--violet::before { background: var(--violet); }
.r-line--gold::before { background: var(--gold); }
.r-label { font-size: .8125rem; font-weight: 600; }
.r-line--mint .r-label { color: var(--mint-deep); }
.r-line--violet .r-label { color: var(--violet); }
.r-line--gold .r-label { color: var(--gold-text); }
.r-line p:not(.r-label) { margin-top: 3px; color: var(--plum); line-height: 1.45; }
.r-quote { font: 400 1.1875rem/1.35 var(--voice); }

.artifact--player { background: var(--deep); color: var(--night-text); }
.p-title { font-weight: 600; font-size: 1rem; }
.p-wave { display: flex; align-items: center; gap: 3px; height: 64px; margin-top: 18px; }
.p-wave i { flex: 1; min-width: 2px; height: var(--h); border-radius: 2px; background: rgba(114, 72, 232, .85); transform-origin: center; }
.p-wave i.is-played { background: var(--mint); }
.is-in .p-wave i { animation: bar 1.6s ease-in-out infinite; animation-delay: var(--d); }
@keyframes bar { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
.p-progress { margin-top: 16px; height: 3px; border-radius: 3px; background: rgba(238, 233, 255, .14); }
.p-progress i { display: block; width: 37%; height: 100%; border-radius: inherit; background: var(--mint); }
.p-times { display: flex; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: var(--night-muted); font-variant-numeric: tabular-nums; }
.p-music { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.p-music button {
  padding: 7px 13px; border-radius: 18px; font-size: .8125rem; font-weight: 500; color: var(--night-muted);
  box-shadow: inset 0 0 0 1px rgba(238, 233, 255, .2); transition: background-color .25s, color .25s, box-shadow .25s;
}
.p-music button:hover { color: var(--night-text); box-shadow: inset 0 0 0 1px rgba(238, 233, 255, .5); }
.p-music button[aria-pressed="true"] { background: var(--mint); color: var(--ink); box-shadow: none; }

/* Revelado de cada entrada al llegar a ella */
.motion .entry .entry__n { opacity: 0; transform: translateX(-10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.motion .entry .entry__text { opacity: 0; transition: opacity .8s var(--ease) .1s; }
.motion .entry .artifact { opacity: 0; transform: translateY(18px) rotate(.6deg); transition: opacity .8s var(--ease) .2s, transform 1s var(--ease) .2s; }
.motion .entry .r-line::before { transform: scaleY(0); transition: transform .7s var(--ease); }
.motion .entry .r-line > * { opacity: 0; transition: opacity .6s var(--ease); }
.motion .entry.is-in .entry__n,
.motion .entry.is-in .entry__text,
.motion .entry.is-in .artifact { opacity: 1; transform: none; }
.motion .entry.is-in .r-line::before { transform: scaleY(1); }
.motion .entry.is-in .r-line > * { opacity: 1; }
.motion .entry.is-in .r-line:nth-child(1)::before, .motion .entry.is-in .r-line:nth-child(1) > * { transition-delay: .5s; }
.motion .entry.is-in .r-line:nth-child(2)::before, .motion .entry.is-in .r-line:nth-child(2) > * { transition-delay: .9s; }
.motion .entry.is-in .r-line:nth-child(3)::before, .motion .entry.is-in .r-line:nth-child(3) > * { transition-delay: 1.3s; }

/* La pared de notas */
.wall { background: var(--violet-soft); padding: 130px 0 140px; overflow: hidden; }
.notes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 36px 32px; align-items: start; }
.note {
  position: relative; padding: 38px 32px 32px; background: var(--ivory); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(57, 38, 107, .06), 0 22px 34px -26px rgba(57, 38, 107, .45);
  transform: rotate(var(--r));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.note::before {
  content: ""; position: absolute; left: 50%; top: 12px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), transparent 45%), var(--pin);
  box-shadow: 0 2px 3px rgba(20, 12, 43, .25);
  transition: transform .4s var(--ease);
}
.note[data-pin="mint"] { --pin: var(--mint); }
.note[data-pin="gold"] { --pin: var(--gold); }
.note[data-pin="coral"] { --pin: var(--coral); }
.note:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 1px 0 rgba(57, 38, 107, .06), 0 30px 40px -26px rgba(57, 38, 107, .5); }
.note:hover::before { transform: scale(1.15); }
.note h3 { font: 600 1.25rem/1.3 var(--ui); letter-spacing: -.01em; }
.note > p { margin-top: 10px; color: var(--plum-muted); font-size: 1rem; }

.note--release { grid-column: 1 / span 7; grid-row: span 2; padding: 44px 40px 40px; }
.note--release h3 { font-size: 1.5rem; }
.note--journal { grid-column: 8 / span 5; margin-top: 24px; }
.note--mood { grid-column: 8 / span 5; }
.note--history { grid-column: 2 / span 5; margin-top: 8px; }
.note--lang { grid-column: 7 / span 5; margin-top: 36px; }

.release-steps { margin-top: 28px; counter-reset: s; display: grid; gap: 2px; }
.release-steps li {
  counter-increment: s; position: relative; display: flex; align-items: center; gap: 14px;
  padding: 8px 0; color: var(--plum-muted); font-weight: 500; transition: color .5s;
}
.release-steps li::before {
  content: counter(s); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-size: .8125rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); color: var(--plum-muted);
  transition: background-color .5s, color .5s, box-shadow .5s;
}
.release-steps li.is-on { color: var(--plum); }
.release-steps li.is-on::before { background: var(--coral); color: var(--ink); box-shadow: none; }
.release-phrase {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border);
  font: 400 1.375rem/1.4 var(--voice); color: var(--plum); min-height: 4.2em;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.release-phrase.is-fading { opacity: 0; transform: translateY(6px); }

.journal-prompt { margin-top: 22px; font-weight: 600; font-size: 1.0625rem; color: var(--plum); }
.journal-line { display: block; margin-top: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(109, 98, 138, .35); }

.moods { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 20px; }
.moods button {
  position: relative; padding: 6px 11px; font-weight: 500; font-size: .9375rem; color: var(--plum);
  border-radius: 8px; transition: color .2s, background-color .2s;
}
.moods button:hover { background: rgba(114, 72, 232, .07); }
.moods svg { position: absolute; inset: -6px -8px; width: calc(100% + 16px); height: calc(100% + 12px); overflow: visible; pointer-events: none; }
.moods path { fill: none; stroke: var(--coral); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.moods button[aria-pressed="true"] path { stroke-dashoffset: 0; transition: stroke-dashoffset .7s var(--ease); }
.mood-feedback { margin-top: 16px; font-size: .9375rem; color: var(--plum-muted); min-height: 1.6em; }
.note--lang .link { margin-top: 18px; font-size: .9375rem; }

/* Las notas se clavan en la pared al llegar */
.motion .note { opacity: 0; transform: translateY(-28px) rotate(calc(var(--r) * 3.5)); transition: opacity .7s var(--ease), transform .9s var(--ease), box-shadow .5s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.motion .note::before { transform: scale(0); transition: transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 110ms + .55s); }
.motion .note.is-in { opacity: 1; transform: rotate(var(--r)); }
.motion .note.is-in::before { transform: none; }
.motion .note.is-in:hover { transform: rotate(0deg) translateY(-4px); transition-delay: 0s; }
.motion .note.is-in:hover::before { transform: scale(1.15); transition-delay: 0s; }

/* Respira S.O.S. */
.breathe { padding: 140px 0; color: var(--night-text); }
.breathe__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.breathe h2 { font: 600 clamp(2rem, 3.4vw, 2.75rem)/1.1 var(--ui); letter-spacing: -.022em; max-width: 16ch; }
.breathe__copy p { margin-top: 18px; color: var(--night-muted); font-size: 1.125rem; max-width: 44ch; }
.breathe__ctas { display: flex; align-items: center; gap: 24px; margin-top: 34px; }
.breathe__time { font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--night-text); }

.orb { position: relative; width: min(400px, 78vw); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; }
.orb__fill {
  position: absolute; inset: 14%; border-radius: 50%; background: var(--night-plum);
  transform: scale(.72); animation: idle 10s ease-in-out infinite;
}
.orb__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(246, 241, 255, .28); transition: transform 1s var(--ease); }
.orb__ring .dot { width: 5.5%; }
.orb__ring .dot--mint { left: 5.85%; top: 19.25%; }
.orb__ring .dot--gold { right: 5.85%; top: 19.25%; }
.orb__ring .dot--coral { left: 47.25%; bottom: -2.75%; }
.orb__cue { position: relative; font: 600 1.5rem/1.2 var(--ui); color: var(--night-text); min-height: 1.2em; }
.orb.is-active .orb__fill { animation: none; transition: transform 5s ease-in-out; }
.orb.is-in .orb__fill { transform: scale(1); }
.orb.is-out .orb__fill { transform: scale(.62); }
.orb.is-active .orb__ring { animation: spin 60s linear infinite; }
@keyframes idle { 0%, 100% { transform: scale(.7); } 50% { transform: scale(.78); } }

/* Instalación y privacidad */
.trust { background: var(--ivory); padding: 110px 0; }
.trust__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.trust h2 { font: 600 1.75rem/1.2 var(--ui); letter-spacing: -.015em; }
.trust h2 + p { margin-top: 14px; color: var(--plum-muted); max-width: 46ch; }
.devices { margin-top: 28px; }
.devices div { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.devices div:last-child { border-bottom: 1px solid var(--border); }
.devices dt { font-weight: 600; }
.devices dd { color: var(--plum-muted); }
.disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .875rem; line-height: 1.55; color: var(--plum-muted); max-width: 52ch; }

/* Cierre */
.closing { padding: 140px 0 130px; color: var(--night-text); text-align: center; }
.closing__inner { display: flex; flex-direction: column; align-items: center; }
.mini-mark { position: relative; width: 96px; height: 96px; margin-bottom: 36px; }
.mini-mark img { position: absolute; inset: 20%; width: 60%; filter: drop-shadow(0 0 8px rgba(238, 233, 255, .12)); }
.mini-mark .dot { width: 11%; }
.mini-mark .dot--mint { left: 10%; top: 14%; }
.mini-mark .dot--gold { right: 10%; top: 14%; }
.mini-mark .dot--coral { left: 44.5%; bottom: 2%; }
.closing h2 { font: 400 clamp(2.4rem, 5.2vw, 4.25rem)/1.1 var(--voice); letter-spacing: -.015em; max-width: 16ch; text-wrap: balance; }
.closing p { margin-top: 20px; color: var(--night-muted); max-width: 48ch; font-size: 1.125rem; }
.closing .btn { margin-top: 36px; }
.motion .mini-mark .dot { opacity: 0; transform: scale(.3); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.motion .mini-mark.is-in .dot { opacity: 1; transform: none; }
.motion .mini-mark.is-in .dot--gold { transition-delay: .2s; }
.motion .mini-mark.is-in .dot--coral { transition-delay: .4s; }

/* Pie */
.footer { padding: 36px 0 44px; color: var(--night-muted); border-top: 1px solid rgba(246, 241, 255, .08); font-size: .875rem; }
.footer__inner { display: flex; align-items: center; gap: 28px; }
.footer__inner img { width: 110px; }
.footer__year { margin-left: auto; }

/* Tablet */
@media (max-width: 1000px) {
  .nav__links { display: none; }
  .hero { padding-top: 130px; }
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__title { max-width: 14ch; }
  .desk { min-height: 0; padding-top: 330px; }
  .mark { width: 380px; right: auto; left: 50%; margin-left: -190px; top: -30px; }
  .sheet { position: relative; width: 100%; max-width: 600px; margin: 0 auto; }
  .entry { grid-template-columns: 64px minmax(0, 1fr); gap: 20px 24px; }
  .entries::before { left: 44px; }
  .entry .artifact { grid-column: 2; }
  .notes { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .note--release { grid-column: 1 / -1; grid-row: auto; }
  .note--journal, .note--mood, .note--history, .note--lang { grid-column: auto; margin-top: 0; }
  .breathe__grid, .trust__grid { grid-template-columns: 1fr; gap: 56px; }
}

/* Móvil */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 20px; }
  .nav__inner { height: 68px; }
  .nav__brand img { width: 112px; }
  .nav__actions { gap: 12px; }
  .hero { padding: 108px 0 90px; }
  .desk { padding-top: 250px; }
  .mark { width: 290px; margin-left: -145px; top: -20px; }
  .sheet { padding: 30px 24px 26px; }
  .paper, .wall, .breathe, .closing { padding: 96px 0; }
  .section-head { margin-bottom: 44px; }
  .entries::before { display: none; }
  .entry { grid-template-columns: 1fr; padding: 40px 0; }
  .entry__n { font-size: 2.5rem; padding-left: 0; }
  .entry .artifact { grid-column: 1; }
  .notes { grid-template-columns: 1fr; }
  .notes .note:nth-child(odd) { --r: -.8deg !important; }
  .notes .note:nth-child(even) { --r: .8deg !important; }
  .note--release { padding: 40px 26px 30px; }
  .trust { padding: 80px 0; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer__year { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .ripple { opacity: .5; transform: scale(1.2); }
  .ripple--2, .ripple--3 { display: none; }
}

/* Lista de espera: una hoja del Cuaderno de noche. */
.waitlist {
  width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 28px; border: 0; border-radius: 12px;
  background: var(--ivory); color: var(--plum);
  box-shadow: 0 24px 80px -20px rgba(20, 12, 43, .4);
  font: 400 1rem/1.6 var(--ui); overflow-y: auto;
}
.waitlist::backdrop { background: rgba(20, 12, 43, .7); }
body:has(.waitlist[open]) { overflow: hidden; }
.waitlist__close {
  display: block; margin: -8px -8px 12px auto; min-height: 44px;
  padding: 8px 12px; border: 0; background: transparent;
  color: var(--plum); font: 600 1rem var(--ui); cursor: pointer;
}
.waitlist__close:hover { background: var(--violet-soft); }
.waitlist h2 { font-size: clamp(1.75rem, 5vw, 2.25rem); line-height: 1.15; margin-bottom: 12px; }
.waitlist form { margin-top: 24px; }
.waitlist label { display: block; font-weight: 600; margin-bottom: 6px; }
.waitlist input {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--plum-muted); border-radius: 8px;
  background: var(--white); color: var(--plum); font: inherit; caret-color: var(--plum);
}
.waitlist input[aria-invalid="true"] { border-color: #9C303C; }
.waitlist__error { color: #9C303C; min-height: 1.6em; font-size: .9375rem; margin: 4px 0 12px; }
.waitlist .btn { width: 100%; }
.waitlist .btn:disabled { opacity: .65; cursor: wait; }
#waitlist-status:not(:empty) { margin-top: 20px; }
.waitlist[data-state="error"] #waitlist-status { color: #9C303C; }
.waitlist ::selection { background: var(--violet-soft); color: var(--plum); }

.waitlist .btn:disabled:hover { transform: none; background: var(--coral); }
.waitlist[data-state="success"] #waitlist-status { color: var(--mint-deep); }
