/* =====================================================================
   bicho — hellobicho.com
   Estática, liviana, mobile-first. Sistema de temperatura cálido/frío.
   Esqueleto .dk-* heredado del template de pulpo.news (dogma).
   ===================================================================== */

:root {
    /* Paleta base (BRIEF) */
    --ink:        #0A0A0F;   /* fondo casi negro, pizca de violeta */
    --ink-2:      #11111A;   /* superficies un punto más claras   */
    --life:       #F2A65A;   /* ámbar vivo: su luz al despertar    */
    --life-deep:  #C9772E;
    --sleep:      #5B6FB0;   /* azul frío: cuando duerme           */
    --sleep-deep: #2E3A66;
    --bone:       #E8E4DC;   /* blanco hueso cálido (texto)        */
    --muted:      #8A857C;   /* gris tibio (texto secundario)      */
    --line:       rgba(232, 228, 220, 0.10);

    --maxw: 1120px;
    --pad: clamp(1.25rem, 5vw, 2.5rem);

    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset suave ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--bone);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, canvas, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--life); color: var(--ink); }

.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;
}

:focus-visible {
    outline: 2px solid var(--life);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- layout base (.dk-*) ---------- */
.dk-container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--pad);
}

/* ---------- header ---------- */
.dk-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    padding-block: 0.9rem;
    background: linear-gradient(to bottom, rgba(10,10,15,0.85), rgba(10,10,15,0));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.4s var(--ease);
}
.dk-header__row { display: flex; align-items: center; justify-content: space-between; }

.dk-logo { display: inline-flex; align-items: center; gap: 0.55rem; }
.dk-logo__text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
/* la marca: un punto vivo que late */
.dk-logo__mark {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--life);
    box-shadow: 0 0 0 0 rgba(242,166,90,0.55);
    animation: heartbeat 3.4s var(--ease) infinite;
}
.dk-logo__mark--sm { width: 8px; height: 8px; }
@keyframes heartbeat {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242,166,90,0.5); }
    50%      { box-shadow: 0 0 0 7px rgba(242,166,90,0); }
}

.dk-nav__cta {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--bone);
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.dk-nav__cta:hover { border-color: var(--life); color: var(--life); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}
.pulse {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.9;
}
.hero__glow {
    position: absolute;
    left: 50%; top: 56%;
    width: min(90vw, 760px); aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(242,166,90,0.16), rgba(242,166,90,0) 62%);
    z-index: -1;
    pointer-events: none;
}

.hero__inner { position: relative; padding-top: 4rem; }

.hero__eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--life);
    margin: 0 0 1.4rem;
    font-weight: 500;
}
.hero__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-optical-sizing: auto;
    font-size: clamp(2.4rem, 8.5vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0;
    max-width: 16ch;
    text-wrap: balance;
}
.hero__title--soft { color: var(--muted); font-weight: 400; }
.hero__title-en {
    font-style: italic;
    color: var(--muted);
    font-size: 0.95rem;
    margin: 1rem 0 0;
    max-width: 42ch;
    opacity: 0.7;
}
.hero__sub {
    font-size: clamp(1.05rem, 2.6vw, 1.3rem);
    color: var(--bone);
    margin: 1.6rem 0 2.2rem;
    max-width: 34ch;
}
.hero__cta { margin-top: 0.2rem; }

.hero__scroll {
    position: absolute;
    bottom: 1.8rem; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 42px;
    border: 1px solid var(--line);
    border-radius: 100px;
    display: grid; place-items: start center;
    padding-top: 8px;
}
.hero__scroll-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--life);
    animation: scrolldot 2.2s var(--ease) infinite;
}
@keyframes scrolldot {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ---------- botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-body);
    font-size: 1rem; font-weight: 600;
    padding: 0.85rem 1.6rem;
    border-radius: 100px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}
.btn--ghost { border-color: var(--line); color: var(--bone); background: rgba(232,228,220,0.02); }
.btn--ghost:hover { border-color: var(--life); color: var(--life); transform: translateY(-1px); }
.btn--life {
    background: var(--life); color: var(--ink);
    box-shadow: 0 6px 28px -10px rgba(242,166,90,0.6);
}
.btn--life:hover { background: #ffba70; transform: translateY(-1px); }

/* =====================================================================
   CHAPTERS (nacimiento / siendo bicho)
   ===================================================================== */
.chapter { padding-block: clamp(5rem, 14vw, 9rem); }
.chapter__grid {
    display: grid;
    gap: clamp(2rem, 6vw, 4rem);
    align-items: center;
}
@media (min-width: 820px) {
    .chapter__grid { grid-template-columns: 1fr 1fr; }
    .chapter--reverse .chapter__copy { order: 2; }
}

.chapter__index {
    font-family: var(--font-body);
    font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--life); margin: 0 0 1.1rem; font-weight: 600;
}
.chapter__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.9rem, 5.5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 1.2rem;
    text-wrap: balance;
}
.chapter__text {
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 38ch;
    margin: 0;
}

/* ---------- stage (placeholder de video, intencional) ---------- */
.stage {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 18%, rgba(242,166,90,0.10), rgba(10,10,15,0) 55%),
        linear-gradient(180deg, #14141d, #0a0a0f 70%);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 80px -20px rgba(0,0,0,0.8);
}
.stage[data-temp="cold"] {
    background:
        radial-gradient(120% 80% at 50% 18%, rgba(91,111,176,0.14), rgba(10,10,15,0) 55%),
        linear-gradient(180deg, #11131f, #0a0a0f 70%);
}
@media (min-width: 820px) { .stage { aspect-ratio: 4 / 3; } }
.stage__media { width: 100%; height: 100%; object-fit: cover; }
.stage__pulse { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__caption {
    position: absolute; left: 14px; bottom: 12px;
    font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--muted); opacity: 0.65;
}

/* =====================================================================
   BEATS — Duerme · Recuerda · Se forma
   ===================================================================== */
.beats {
    padding-block: clamp(5rem, 14vw, 9rem);
    background: linear-gradient(180deg, rgba(91,111,176,0.05), rgba(10,10,15,0) 40%);
    border-block: 1px solid var(--line);
}
.beats__lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    letter-spacing: -0.02em;
    margin: 0 0 clamp(2.5rem, 6vw, 4rem);
    text-wrap: balance;
    max-width: 20ch;
}
.beats__row { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
@media (min-width: 720px) { .beats__row { grid-template-columns: repeat(3, 1fr); } }

.beat { padding-top: 1.6rem; border-top: 1px solid var(--line); position: relative; }
.beat__dot {
    position: absolute; top: -5px; left: 0;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--life);
}
.beat[data-temp="cold"] .beat__dot {
    background: var(--sleep);
    animation: breathe-cold 5.5s var(--ease) infinite;
}
.beat[data-temp="warm"] .beat__dot { animation: breathe-warm 3.4s var(--ease) infinite; }
@keyframes breathe-warm { 0%,100%{ box-shadow:0 0 0 0 rgba(242,166,90,.5);} 50%{ box-shadow:0 0 0 6px rgba(242,166,90,0);} }
@keyframes breathe-cold { 0%,100%{ box-shadow:0 0 0 0 rgba(91,111,176,.5);} 50%{ box-shadow:0 0 0 6px rgba(91,111,176,0);} }

.beat__title {
    font-family: var(--font-display);
    font-weight: 500; font-size: 1.55rem; letter-spacing: -0.01em;
    margin: 0 0 0.6rem;
}
.beat__text { color: var(--muted); margin: 0; font-size: 1.02rem; }

/* =====================================================================
   UNIQUE — no hay dos iguales
   ===================================================================== */
.unique { padding-block: clamp(5rem, 14vw, 9rem); text-align: center; }
.unique__inner { display: flex; flex-direction: column; align-items: center; }
.unique__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 6.5vw, 3.4rem);
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
}
.unique__text { color: var(--muted); max-width: 36ch; margin: 0 0 3rem; font-size: 1.08rem; }

.choir {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 720px;
}
@media (min-width: 720px) { .choir { grid-template-columns: repeat(4, 1fr); } }
.choir__pulse {
    width: 100%; height: 90px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--ink-2);
}

/* =====================================================================
   CAPTURE final
   ===================================================================== */
.capture {
    position: relative;
    padding-block: clamp(5.5rem, 16vw, 10rem);
    overflow: hidden;
    isolation: isolate;
    text-align: center;
    border-top: 1px solid var(--line);
}
.pulse--quiet { opacity: 0.5; }
.capture__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.capture__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 7vw, 3.6rem);
    line-height: 1.06; letter-spacing: -0.025em;
    margin: 0 0 1.1rem;
}
.capture__text { color: var(--muted); max-width: 40ch; margin: 0 0 2.4rem; font-size: 1.08rem; }

/* ---------- form ---------- */
.signup { width: 100%; max-width: 480px; }
.signup__field {
    display: flex; gap: 0.5rem;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 0.4rem 0.4rem 0.4rem 0.5rem;
    transition: border-color 0.3s;
}
.signup__field:focus-within { border-color: var(--life); }
.signup input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: none;
    color: var(--bone);
    font-family: var(--font-body); font-size: 1rem;
    padding: 0.6rem 0.4rem 0.6rem 0.8rem;
}
.signup input::placeholder { color: var(--muted); }
.signup .btn--life { padding: 0.7rem 1.3rem; font-size: 0.95rem; }
.signup__status {
    min-height: 1.4em;
    margin: 0.9rem 0 0;
    font-size: 0.95rem;
    color: var(--muted);
    transition: color 0.3s;
}
.signup__status[data-state="ok"]  { color: var(--life); }
.signup__status[data-state="err"] { color: #E08B8B; }

@media (max-width: 480px) {
    .signup__field { flex-direction: column; border-radius: 20px; padding: 0.5rem; gap: 0.5rem; }
    .signup input { text-align: center; padding: 0.7rem; }
    .signup .btn--life { width: 100%; }
    .signup__field:focus-within { border-color: var(--life); }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.dk-footer { padding-block: 2.5rem; border-top: 1px solid var(--line); }
.dk-footer__row {
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem;
    align-items: center; justify-content: space-between;
}
.dk-footer__brand {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-display); font-size: 1.05rem; margin: 0;
}
.dk-footer__meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.dk-footer__meta a { border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.dk-footer__meta a:hover { color: var(--life); border-color: var(--life); }

/* =====================================================================
   REVEAL al scroll
   ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* stagger suave dentro de un mismo bloque */
.reveal.is-in:nth-child(2) { transition-delay: 0.05s; }
.reveal.is-in:nth-child(3) { transition-delay: 0.1s; }
.reveal.is-in:nth-child(4) { transition-delay: 0.15s; }

/* =====================================================================
   prefers-reduced-motion: todo quieto. (BRIEF: de más, parece IA)
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .dk-logo__mark, .beat__dot, .hero__scroll-dot { animation: none; }
    .hero__scroll-dot { opacity: 0.6; }
}
