/*
 * PelCan Guadaira · "Muy pronto". The same look as the web: white and ink,
 * flat pastel colours, Satoshi, no gradients. Every animation stops when the
 * phone asks for less motion.
 */

@font-face {
    font-family: 'Satoshi';
    src: url('Satoshi-Variable.woff2') format('woff2');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #1c1a19;
    --muted: #716b65;
    --border: #ebe8e4;
    --brand: #f7c29b;
    --brand-soft: #fff1e6;
    --caramel: #8c5330;
    --whatsapp: #128c7e;
    --track: #f1ede8;
    --shadow-soft:
        0 1px 2px rgb(28 26 25 / 0.04), 0 6px 20px -12px rgb(28 26 25 / 0.12);
    --shadow-lift:
        0 2px 6px rgb(28 26 25 / 0.05), 0 18px 40px -20px rgb(28 26 25 / 0.22);
    color-scheme: light;
}

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

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

body {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--ink);
    font-family:
        'Satoshi',
        ui-sans-serif,
        system-ui,
        -apple-system,
        'Segoe UI',
        sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Layout ---------------------------------------------------------- */

.page {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    padding: max(1.25rem, env(safe-area-inset-top)) 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo {
    display: block;
    border-radius: 50%;
    outline-offset: 4px;
}

.logo img {
    display: block;
    width: 6.5rem;
    height: auto;
    user-select: none;
    animation:
        logo-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both,
        logo-float 7s ease-in-out 1.2s infinite;
}

@keyframes logo-in {
    from {
        opacity: 0;
        transform: scale(0.6) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes logo-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-4px) rotate(-2deg);
    }
}

/* ---- The bath: the mascot peeking over the card ---------------------- */

.tub {
    width: 100%;
    animation: rise-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.tub-dog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto -0.9rem;
    aspect-ratio: 400 / 150;
}

.dog {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.dog:focus-visible .head-ink {
    stroke: var(--caramel);
}

.ear {
    transition: transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.ear path {
    fill: #f4bf95;
    stroke: var(--ink);
    stroke-width: 3.5;
    stroke-linejoin: round;
}

.ear-l {
    transform-origin: 166px 56px;
}

.ear-r {
    transform-origin: 234px 56px;
}

.dog.happy .ear-l {
    transform: rotate(16deg);
}

.dog.happy .ear-r {
    transform: rotate(-16deg);
}

.head-ink {
    fill: var(--ink);
    stroke: var(--ink);
    stroke-width: 7;
    stroke-linejoin: round;
}

.head-fill {
    fill: #ffffff;
}

.dog-head {
    transform-origin: 200px 140px;
    animation: sway 6s ease-in-out infinite;
}

.dog.happy .dog-head {
    animation: none;
}

.dog.happy .dog-hop {
    animation: hop 650ms cubic-bezier(0.3, 1.6, 0.5, 1) 2;
}

.brows {
    transform: translateX(calc(var(--lx, 0) * 2px));
    transition: transform 0.2s ease-out;
}

.brows path {
    fill: none;
    stroke: #c98a5a;
    stroke-width: 3;
    stroke-linecap: round;
}

/* The eyes follow the pointer (or the finger). */
.eyes-open {
    transform: translate(
        calc(var(--lx, 0) * 4.5px),
        calc(var(--ly, 0) * 3px)
    );
    transition: transform 0.2s ease-out;
}

.blink {
    transform-box: fill-box;
    transform-origin: center;
    animation: blink 5.5s infinite;
}

.eyes-happy path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 3.6;
    stroke-linecap: round;
}

.eyes-happy,
.mouth-happy {
    display: none;
}

.dog.happy .eyes-open,
.dog.happy .mouth-idle {
    display: none;
}

.dog.happy .eyes-happy,
.dog.happy .mouth-happy {
    display: inline;
}

.cheeks {
    fill: #f2a5a0;
    opacity: 0.18;
    transition: opacity 0.3s;
}

.dog.happy .cheeks {
    opacity: 0.65;
}

.mouth-idle {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.foam-edge {
    fill: #e9e4de;
    stroke: #e9e4de;
    stroke-width: 3.5;
}

.foam {
    fill: #ffffff;
}

.fizz circle,
.splash circle {
    fill: rgb(255 255 255 / 0.85);
    stroke: #e3ddd5;
    stroke-width: 1.4;
}

.fizz circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: fizz 3.2s ease-in-out infinite;
}

.paw ellipse {
    fill: #ffffff;
    stroke: var(--ink);
    stroke-width: 3.5;
}

.paw path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.6;
    stroke-linecap: round;
}

@keyframes sway {
    0%,
    100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

@keyframes blink {
    0%,
    93%,
    100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.12);
    }
}

@keyframes hop {
    0%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-9px);
    }
}

@keyframes fizz {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* What the mascot says (it changes when you tickle it). */
.says {
    position: absolute;
    top: 0.1rem;
    right: 0;
    z-index: 3;
    margin: 0;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    transform-origin: 0% 100%;
    animation: says-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both;
}

.says.again {
    animation: says-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.says::after {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 0.7rem;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
}

@keyframes says-in {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- The card --------------------------------------------------------- */

.card {
    position: relative;
    z-index: 1;
    padding: 2rem 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 2rem;
    background: #ffffff;
    box-shadow: var(--shadow-lift);
    text-align: center;
}

.eyebrow {
    margin: 0;
    color: var(--caramel);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1 {
    margin: 0.4rem 0 0;
    font-size: clamp(1.55rem, 6.2vw, 2rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.lead {
    max-width: 24rem;
    margin: 0.6rem auto 0;
    color: var(--muted);
    font-size: 1.02rem;
    text-wrap: pretty;
}

/* The web in the bath: a bone that fills up step by step. */
.wash {
    max-width: 19rem;
    margin: 1.25rem auto 0;
}

.bone {
    display: block;
    width: 100%;
    height: auto;
}

.bone-track {
    fill: var(--track);
}

.bone-fill {
    fill: var(--brand);
    transform-box: fill-box;
    transform-origin: 0% 50%;
    transform: scaleX(var(--p, 0.06));
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.bone-line {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.5;
}

.step {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.step span {
    display: inline-block;
}

.step span.again {
    animation: step-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes step-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.contact {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}

.contact p {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.buttons {
    display: grid;
    gap: 0.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease-out,
        opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    opacity: 0.92;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible,
.info a:focus-visible,
.legal summary:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.btn-ink {
    background: var(--ink);
}

.btn-whatsapp {
    background: var(--whatsapp);
    box-shadow: 0 12px 30px -10px rgb(18 140 126 / 0.6);
}

.icon {
    flex: none;
    width: 1.2em;
    height: 1.2em;
}

.icon.stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.info {
    display: grid;
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
    text-align: left;
}

.info-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: start;
}

.info dt {
    display: flex;
    margin: 0;
    padding-top: 0.15rem;
    color: var(--caramel);
}

.info dd {
    display: grid;
    gap: 0.1rem;
    margin: 0;
}

.info b {
    font-weight: 700;
}

.nowrap {
    white-space: nowrap;
}

.info a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ---- Footer ----------------------------------------------------------- */

.foot {
    position: relative;
    z-index: 1;
    padding: 0.75rem 1rem max(1.25rem, env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.foot p {
    margin: 0.25rem 0;
}

.legal summary {
    display: inline;
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    list-style: none;
}

.legal summary::-webkit-details-marker {
    display: none;
}

.legal p {
    max-width: 28rem;
    margin: 0.5rem auto 0;
    font-size: 0.8rem;
}

/* A little walk of paw prints. */
.paws {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    height: 1.75rem;
    margin-bottom: 0.25rem;
}

.paws span {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--brand);
    opacity: 0;
    transform: translateY(var(--y)) rotate(var(--r));
    animation: paw-step 9s calc(var(--i) * 0.35s) infinite;
}

.paws svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes paw-step {
    0% {
        opacity: 0;
        transform: translateY(var(--y)) rotate(var(--r)) scale(0.6);
    }
    4%,
    40% {
        opacity: 1;
        transform: translateY(var(--y)) rotate(var(--r)) scale(1);
    }
    50%,
    100% {
        opacity: 0;
        transform: translateY(var(--y)) rotate(var(--r)) scale(1);
    }
}

/* ---- Bubbles going up (they pop when touched) -------------------------- */

.bubbles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -4rem;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border: 2px solid var(--rim);
    border-radius: 50%;
    background: rgb(255 255 255 / 0.45);
    cursor: pointer;
    pointer-events: auto;
    animation: bubble-rise var(--d) linear var(--delay) infinite;
    will-change: transform;
}

.bubble::after {
    content: '';
    position: absolute;
    top: 18%;
    left: 22%;
    width: 24%;
    height: 24%;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.95);
}

@keyframes bubble-rise {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0);
    }
    10% {
        opacity: 1;
    }
    35% {
        transform: translate3d(var(--sway), -40vh, 0);
    }
    70% {
        transform: translate3d(calc(var(--sway) * -1), -80vh, 0);
    }
    100% {
        opacity: 0.9;
        transform: translate3d(0, -115vh, 0);
    }
}

/* ---- Less motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .logo img,
    .tub,
    .dog-head,
    .blink,
    .fizz circle,
    .says,
    .says.again,
    .step span.again,
    .dog.happy .dog-hop {
        animation: none;
    }

    .bone-fill,
    .ear,
    .eyes-open,
    .brows,
    .cheeks {
        transition: none;
    }

    .bubbles {
        display: none;
    }

    .paws span {
        animation: none;
        opacity: 0.9;
    }
}
