/* ==========================================================================
   Jio Rafael Orpilla — the guest site.
   Eleven months, one day. A pastel nursery, with dinosaurs.
   Self-contained on purpose: the backend must never inherit this world.
   ========================================================================== */

@font-face {
    font-family: 'Archivo';
    src: url("../fonts/archivo-latin-StE8AAs.woff2") format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;

    /* The nursery: warm cream paper and slightly deeper creams for raised
       and sunk surfaces. */
    --ink-0: #fff8f1;
    --ink-1: #fffdfa;
    --ink-2: #fbefe8;
    --ink-3: #f5e4dc;
    --line: rgb(80 60 100 / 12%);
    --line-strong: rgb(80 60 100 / 26%);

    /* Voices. Deep plum rather than black; every one clears 4.5:1 on --ink-0. */
    --fg: #3b2f4a;
    --fg-2: #5f5173;
    --fg-3: #75668a;

    /* The pastel box of crayons. */
    --pink: #ffc4da;
    --peach: #ffd3b5;
    --butter: #ffeaa0;
    --mint: #bdeed3;
    --sky: #c3e0ff;
    --lilac: #d9c8ff;

    /* Washes for whole sections, a step lighter again. */
    --wash-pink: #ffe6ef;
    --wash-peach: #ffecdf;
    --wash-butter: #fff5d3;
    --wash-mint: #e2f7eb;
    --wash-sky: #e3f0ff;
    --wash-lilac: #efe6ff;

    /* Accent: a pastel pink to fill with, and a deeper rose for anything that
       has to be read as text on cream. */
    --accent: #ffb3cf;
    --accent-bright: #ff9dc1;
    --accent-ink: #b8356d;

    --danger: #c0392f;
    --success: #2d8052;

    --font: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* A fifth-based scale; the numeral is deliberately off the top of it. */
    --t--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
    --t-0: clamp(1rem, 0.97rem + 0.16vw, 1.08rem);
    --t-1: clamp(1.2rem, 1.12rem + 0.38vw, 1.45rem);
    --t-2: clamp(1.6rem, 1.4rem + 1vw, 2.4rem);
    --t-3: clamp(2.2rem, 1.7rem + 2.4vw, 4rem);
    --t-4: clamp(3rem, 1.9rem + 5.2vw, 6rem);

    --gutter: clamp(1.15rem, 0.7rem + 2.2vw, 2.75rem);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 24px 50px -28px rgb(120 80 130 / 38%), 0 2px 6px rgb(120 80 130 / 10%);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(60rem 40rem at 110% -10%, var(--wash-lilac), transparent 60%),
        radial-gradient(50rem 40rem at -10% 40%, var(--wash-mint), transparent 60%),
        var(--ink-0);
    color: var(--fg);
    font-family: var(--font);
    font-size: var(--t-0);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    /* clip, never hidden: `overflow-x: hidden` makes the body a scroll
       container, which silently breaks `position: sticky` (and scroll-linked
       observers) everywhere below it. clip contains the overflow without creating one. */
    overflow-x: clip;
}

/* --- the surfaces the browser draws, themed rather than left default ----- */

::selection {
    background: var(--pink);
    color: var(--fg);
}

:root {
    scrollbar-color: var(--lilac) var(--ink-0);
    scrollbar-width: thin;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-0); }
::-webkit-scrollbar-thumb { background: var(--lilac); border-radius: 99px; border: 2px solid var(--ink-0); }
::-webkit-scrollbar-thumb:hover { background: #c2abf5; }

:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

input, textarea, select { caret-color: var(--accent-ink); }

/* --- type --------------------------------------------------------------- */

h1, h2, h3, h4 {
    margin: 0 0 0.4em;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

h1 { font-size: var(--t-4); }
h2 { font-size: var(--t-3); }
h3 { font-size: var(--t-1); letter-spacing: -0.02em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--fg); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); }

img, svg, video { display: block; max-width: 100%; }

.lede {
    font-size: var(--t-1);
    color: var(--fg-2);
    font-weight: 400;
    letter-spacing: -0.015em;
    max-width: 34ch;
}

.prose { max-width: 68ch; }

/* Small caps-ish label. Never used as an eyebrow above a heading. */
.meta {
    font-size: var(--t--1);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-3);
}

/* --- page furniture ----------------------------------------------------- */

.wrap {
    width: min(100% - (var(--gutter) * 2), 78rem);
    margin-inline: auto;
}

.wrap--tight { width: min(100% - (var(--gutter) * 2), 46rem); }

.section {
    position: relative;
    padding-block: clamp(4rem, 2rem + 9vw, 9rem);
}

.section--hairline { border-top: 1px solid var(--line); }

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 200;
    background: var(--accent);
    color: var(--fg);
    padding: 0.7rem 1.1rem;
    font-weight: 700;
}

.skip-link:focus { left: 0.75rem; top: 0.75rem; }

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

/* --- navigation: a pill that yields to the photographs ------------------ */

.nav {
    position: fixed;
    top: max(0.9rem, env(safe-area-inset-top));
    left: 50%;
    translate: -50% 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: rgb(255 251 247 / 80%);
    box-shadow: var(--shadow);
    /* Specific, not decorative: this sits on top of moving photographs and
       has to stay readable over every one of them. */
    backdrop-filter: blur(14px) saturate(160%);
    transition: translate 0.45s var(--ease), opacity 0.45s var(--ease);
}

.nav[data-hidden='true'] {
    translate: -50% -180%;
    opacity: 0;
}

.nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 99px;
    font-size: var(--t--1);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--fg-2);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
}

.nav a:hover { color: var(--fg); background: var(--wash-lilac); }

.nav a[aria-current='page'] { color: var(--fg); background: var(--lilac); }

.nav__reply { color: var(--accent-ink) !important; }
.nav__reply:hover { color: var(--fg) !important; background: var(--accent) !important; }

@media (max-width: 38rem) {
    .nav {
        top: auto;
        bottom: max(0.7rem, env(safe-area-inset-bottom));
        left: 0.7rem;
        right: 0.7rem;
        translate: none;
        justify-content: space-between;
        gap: 0;
    }

    .nav[data-hidden='true'] { translate: 0 180%; }
    .nav a { flex: 1; justify-content: center; padding: 0.55rem 0.4rem; font-size: 0.74rem; }
}

/* --- buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 99px;
    background: var(--accent);
    color: var(--fg);
    box-shadow: 0 10px 22px -12px rgb(184 53 109 / 55%);
    font: inherit;
    font-size: var(--t--1);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), color 0.2s, border-color 0.2s, translate 0.2s var(--ease);
}

.btn:hover { background: var(--accent-bright); color: var(--fg); translate: 0 -2px; }
.btn:active { translate: 0 0; }

.btn--ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--line-strong);
    box-shadow: none;
}

.btn--ghost:hover { background: var(--wash-lilac); color: var(--fg); border-color: var(--fg-3); }

.btn--small { padding: 0.55rem 1.05rem; font-size: 0.72rem; }

.btn .icon { width: 1em; height: 1em; }

/* --- icons -------------------------------------------------------------- */

.icon {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- the months: one row, scrolled sideways ------------------------------ */

.reel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.reel__controls { display: flex; gap: 0.5rem; }
.reel__controls .btn { padding-inline: 0.8rem; }
.reel__controls .btn:disabled { opacity: 0.35; cursor: default; translate: none; background: transparent; }

/* Full-bleed track; the first card lines up with the page's left edge. */
.reel {
    --edge: max(var(--gutter), (100% - 78rem) / 2);
    list-style: none;
    margin: 0;
    padding: 0.5rem var(--edge) 1.5rem;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(14.5rem, 24vw, 19rem);
    gap: clamp(0.9rem, 1.8vw, 1.5rem);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    scrollbar-width: thin;
}

.reel__card {
    scroll-snap-align: start;
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 0.75rem 0.75rem 1rem;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 28px;
}

/* Six washes, cycling through the months, each with its own crayon. */
.reel__card:nth-child(6n + 1) { --wash: var(--wash-pink);   --crayon: #e56f9c; }
.reel__card:nth-child(6n + 2) { --wash: var(--wash-sky);    --crayon: #5f9ee0; }
.reel__card:nth-child(6n + 3) { --wash: var(--wash-butter); --crayon: #d8a520; }
.reel__card:nth-child(6n + 4) { --wash: var(--wash-mint);   --crayon: #3fae78; }
.reel__card:nth-child(6n + 5) { --wash: var(--wash-lilac);  --crayon: #9674e0; }
.reel__card:nth-child(6n + 6) { --wash: var(--wash-peach);  --crayon: #ec8a55; }

.reel__media {
    position: relative;
    margin: 0;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    background: var(--ink-2);
    border: 5px solid #fff;
    box-shadow: var(--shadow);
}

.reel__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.9s var(--ease);
}

.reel__card:hover .reel__media img { scale: 1.04; }

/* The lead photo opens the month in the viewer; the button is invisible. */
.reel__open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.reel__caption {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 0.7rem;
    padding-inline: 0.25rem;
}

.reel__numeral {
    margin: 0;
    font-size: clamp(3.25rem, 5vw, 4.25rem);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.045em;
    color: var(--crayon, var(--fg));
    font-variant-numeric: lining-nums tabular-nums;
    user-select: none;
}

.reel__title {
    font-size: var(--t-1);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.15;
}

.reel__note { color: var(--fg-2); margin: 0; font-size: 0.85rem; line-height: 1.4; }

/* One friend per month, at the end of the caption. */
.reel__dino { width: 3.25rem; }
.reel__card:nth-child(even) .reel__dino { scale: -1 1; }

.reel__awaiting {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgb(255 251 247 / 88%);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-3);
}

/* --- the reply ---------------------------------------------------------- */

.reply {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem clamp(1rem, 3vw, 2rem);
    margin-top: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--wash-pink);
    border: 1px solid var(--line);
    border-radius: 28px;
}

.reply .hatch { width: clamp(4rem, 8vw, 5.5rem); margin: 0; }
.reply p { color: var(--fg-2); }

.reply__title {
    font-size: var(--t-2);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0 0 0.25em;
}

/* On a phone, one card and the edge of the next, so it reads as a row. */
@media (max-width: 40rem) {
    .reel { grid-auto-columns: 76vw; }
}

@media (max-width: 44rem) {
    .reply { grid-template-columns: auto minmax(0, 1fr); }
    .reply .btn { grid-column: 1 / -1; }
}

/* --- hero --------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: end;
    overflow: clip;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: drift 24s var(--ease) infinite alternate;
}

@keyframes drift {
    from { scale: 1.02; translate: 0 0; }
    to { scale: 1.12; translate: -1.5% -1.5%; }
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Only where it is needed: a soft pool behind the words, and the ground
       the parade walks on. The rest of the photograph stays clear. */
    background:
        linear-gradient(to top, var(--ink-0) 0%, rgb(255 248 241 / 0%) 22%),
        linear-gradient(to right, rgb(255 248 241 / 88%) 0%, rgb(255 248 241 / 72%) 26%, transparent 42%);
}

.hero__inner {
    position: relative;
    z-index: 2;
    width: min(100% - (var(--gutter) * 2), 78rem);
    margin-inline: auto;
    padding-block: clamp(6rem, 14vh, 8rem) calc(var(--parade-h) + clamp(1.5rem, 4vh, 3rem));
}

.hero { --parade-h: clamp(4.5rem, 9vw, 7.5rem); }

.hero__name {
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    margin: 0 0 clamp(1rem, 3vw, 1.75rem);
}

.hero__name span { display: block; }
.hero__name span:nth-child(1) { color: #d9588b; }
.hero__name span:nth-child(3) { color: #3f9a6e; }
.hero__name span:nth-child(2) { padding-left: 0.08em; color: #8463d6; }

.hero__facts {
    display: grid;
    gap: 0.75rem;
    align-items: baseline;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero__fact strong {
    display: block;
    font-size: var(--t-1);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero__actions {
    display: grid;
    justify-items: start;
    gap: 1rem;
}

.hero__scroll {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-3);
    font-size: var(--t--1);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.hero__scroll .icon { animation: nudge 2.4s var(--ease) infinite; }

@keyframes nudge {
    0%, 62%, 100% { translate: 0 0; }
    78% { translate: 0 4px; }
}

/* --- countdown ---------------------------------------------------------- */

.countdown {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2.75rem);
    margin-bottom: clamp(2.5rem, 6vw, 4rem);
    font-variant-numeric: tabular-nums;
}

.countdown > div {
    min-width: 6.5rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    background: var(--bubble, var(--wash-pink));
    text-align: center;
}

.countdown > div:nth-child(2) { --bubble: var(--wash-sky); }
.countdown > div:nth-child(3) { --bubble: var(--wash-butter); }
.countdown > div:nth-child(4) { --bubble: var(--wash-mint); }

.countdown__value {
    display: block;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}

.countdown__label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-3);
}

/* Four across on a phone, rather than three and an orphan. */
@media (max-width: 40rem) {
    .countdown {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
    }
    .countdown > div { min-width: 0; padding: 0.85rem 0.25rem; }
    .countdown__value { font-size: clamp(1.6rem, 8vw, 2rem); }
    .countdown__label { font-size: 0.72rem; letter-spacing: 0.08em; }
}

/* --- gallery mosaic ----------------------------------------------------- */

.mosaic {
    columns: 4 16rem;
    column-gap: 0.55rem;
}

.mosaic__item {
    break-inside: avoid;
    margin-bottom: 0.55rem;
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: var(--ink-2);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    transition: opacity 0.4s var(--ease);
}

.mosaic__item img {
    width: 100%;
    height: auto;
    transition: scale 0.7s var(--ease), filter 0.5s var(--ease);
}

.mosaic__item:hover img { scale: 1.04; }

/* Everything else recedes so the one you are looking at is the only one. */
.mosaic:hover .mosaic__item:not(:hover) { opacity: 0.42; }

@media (max-width: 40rem) { .mosaic { columns: 2 9rem; } }

.mosaic__item[hidden] { display: none; }

/* --- lightbox ----------------------------------------------------------- */

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(255 248 241 / 96%);
    color: var(--fg);
}

.lightbox::backdrop { background: rgb(255 248 241 / 88%); }

.lightbox__figure {
    /* Room for the close button above and breathing space all round. */
    --pad-block: max(clamp(1rem, 4vw, 3rem), 3.75rem);
    --pad-inline: clamp(1rem, 4vw, 3rem);

    box-sizing: border-box;
    margin: 0;
    height: 100%;
    display: grid;
    place-items: center;
    padding: var(--pad-block) var(--pad-inline);
}

/* Sized against the screen itself, not the grid: a grid row grows to fit its
   content, so a 4000px phone photo would otherwise open at full size. */
.lightbox__figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100svh - var(--pad-block) * 2);
    object-fit: contain;
    border-radius: var(--radius);
}

.lightbox__bar {
    position: absolute;
    top: 0;
    right: 0;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    display: flex;
    gap: 0.5rem;
}

.lightbox__nav {
    position: absolute;
    inset-block: 0;
    display: grid;
    place-items: center;
    width: clamp(3rem, 8vw, 5rem);
    border: 0;
    background: transparent;
    color: var(--fg-2);
    cursor: pointer;
}

.lightbox__nav:hover { color: var(--fg); background: rgb(80 60 100 / 5%); }
.lightbox__nav[data-dir='prev'] { left: 0; }
.lightbox__nav[data-dir='next'] { right: 0; }
.lightbox__nav .icon { width: 1.6rem; height: 1.6rem; }
.lightbox__nav[hidden], .lightbox .chip[hidden] { display: none; }

/* --- cards -------------------------------------------------------------- */

.tiles {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    background: var(--ink-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: background-color 0.3s var(--ease), border-color 0.3s;
}

.tile:hover { background: var(--ink-2); border-color: var(--line-strong); }

.tile__media {
    margin: calc(-1 * clamp(1.1rem, 2vw, 1.6rem));
    margin-bottom: 0.4rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ink-3);
}

.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.6s var(--ease); }
.tile:hover .tile__media img { scale: 1.03; }

.tile__title { font-size: var(--t-1); font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.tile__foot { margin-top: auto; padding-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* --- data chips --------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--fg-2);
    white-space: nowrap;
}

.chip--accent { color: var(--accent-ink); border-color: rgb(184 53 109 / 35%); background: var(--wash-pink); }

/* --- the white ticket: QR codes must stay light to scan reliably -------- */

.ticket {
    background: #fff;
    color: #111;
    border-radius: var(--radius);
    padding: clamp(1rem, 2vw, 1.4rem);
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    text-align: center;
    box-shadow: var(--shadow);
}

.ticket img, .ticket svg { width: clamp(8rem, 20vw, 11rem); height: auto; }

.ticket__label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #555;
}

.ticket__perf {
    width: 100%;
    border-top: 1px dashed #c9c9c9;
    padding-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* --- map ---------------------------------------------------------------- */

.map-frame {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--ink-2);
}

/* ux-map renders a bare div carrying only its Stimulus data attributes, with
   no class to hook. The frame owns the height; the child fills it. */
.map-frame { height: clamp(20rem, 52vh, 32rem); }
.map-frame > div { height: 100%; width: 100%; }

/* Leaflet's own chrome, dragged into this world. */
.map-frame .leaflet-container { background: var(--ink-2); }
.map-frame .leaflet-control-zoom a {
    background: var(--ink-1);
    color: var(--fg);
    border-color: var(--line);
}
.map-frame .leaflet-control-zoom a:hover { background: var(--ink-3); }
.map-frame .leaflet-control-attribution {
    background: rgb(255 251 247 / 85%);
    color: var(--fg-3);
}
.map-frame .leaflet-control-attribution a { color: var(--fg-2); }
.map-frame .leaflet-popup-content-wrapper,
.map-frame .leaflet-popup-tip {
    background: var(--ink-2);
    color: var(--fg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* --- forms -------------------------------------------------------------- */

.form-row { margin-bottom: 1.4rem; }

.form-row > label,
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: var(--t--1);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-3);
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='search'],
input[type='password'],
textarea,
select {
    width: 100%;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: var(--t-0);
    color: var(--fg);
    background: var(--ink-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background-color 0.2s;
}

input::placeholder, textarea::placeholder { color: #9a8cab; }

input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-ink);
    background: #fff;
    box-shadow: 0 0 0 4px rgb(255 179 207 / 45%);
}

textarea { min-height: 7.5rem; resize: vertical; }

.form-help { margin-top: 0.45rem; font-size: var(--t--1); color: var(--fg-3); }

.form-errors {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    color: var(--danger);
    font-size: var(--t--1);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
}

fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
legend { padding: 0; }

/* A choice you tap, not a checkbox you hunt for. */
.choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--ink-1);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.choice:hover { border-color: var(--line-strong); background: var(--ink-2); }

.choice:has(input:checked) {
    border-color: var(--accent-ink);
    background: var(--wash-pink);
}

.choice:has(input:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.choice input {
    margin: 0.2rem 0 0;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent-ink);
    flex: none;
}

.choice label,
.choice > span {
    margin: 0;
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    color: var(--fg);
    cursor: pointer;
}

/* --- panels & flashes --------------------------------------------------- */

.panel {
    padding: clamp(1.4rem, 3vw, 2.25rem);
    background: rgb(255 253 250 / 82%);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
}

.flash {
    padding: 0.9rem 1.15rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--ink-2);
    color: var(--fg-2);
}

.flash--success { border-color: rgb(45 128 82 / 30%); color: var(--success); background: var(--wash-mint); }
.flash--error { border-color: rgb(192 57 47 / 30%); color: var(--danger); background: var(--wash-pink); }

/* --- footer ------------------------------------------------------------- */

.foot {
    border-top: 1px solid var(--line);
    padding-block: 3.5rem;
    color: var(--fg-3);
    font-size: var(--t--1);
}

.foot__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
}

/* --- dinosaurs ----------------------------------------------------------
   Drawn in templates/site/_partials/dino.html.twig. Each kind is one pastel
   with a plum outline; the parts are classed so they can move separately. */

.dino {
    --dino: var(--mint);
    --dino-shade: #93d9b3;
    --dino-spot: #e3f8ec;
    --dino-accent: var(--butter);
    --dino-horn: #fff8e6;
    display: block;
    overflow: visible;
    height: auto;
}

.dino--rex      { --dino: #b4ebcd; --dino-shade: #8fd6b0; --dino-spot: #e3f8ec; --dino-accent: #ffc4da; }
.dino--longneck { --dino: #d6c4ff; --dino-shade: #b8a0f2; --dino-spot: #efe7ff; --dino-accent: #ffeaa0; }
.dino--trike    { --dino: #ffcfb0; --dino-shade: #f5b08a; --dino-spot: #ffe7d7; --dino-accent: #ffb3cf; }
.dino--stego    { --dino: #bcdcff; --dino-shade: #98c3f2; --dino-spot: #e3f0ff; --dino-accent: #ffe08a; }
.dino--anky     { --dino: #ffe7a3; --dino-shade: #f2cf73; --dino-spot: #fff4cf; --dino-accent: #d9c8ff; }
.dino--para     { --dino: #b8ecf0; --dino-shade: #8fd6dc; --dino-spot: #e0f8fa; --dino-accent: #ffb3cf; }
.dino--spino    { --dino: #f7c6ef; --dino-shade: #e7a3dc; --dino-spot: #fde6f9; --dino-accent: #bdeed3; }
.dino--ptero    { --dino: #ffd0e1; --dino-shade: #f5aecb; --dino-spot: #ffe8f0; --dino-accent: #ffc59e; }
.dino--hatchling { --dino: #c9f0b8; --dino-horn: #fffaf0; --dino-accent: #ffc4da; }

.dino :is(path, ellipse, rect, circle) {
    fill: var(--dino);
    stroke: var(--fg);
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.dino .dino__far { fill: var(--dino-shade); }
.dino .dino__accent, .dino .dino__accent :is(path, circle) { fill: var(--dino-accent); }
.dino .dino__horn { fill: var(--dino-horn); }
.dino .dino__belly { fill: var(--dino-spot); stroke: none; }
.dino .dino__spot { fill: var(--dino-spot); stroke: none; }
.dino .dino__cheek { fill: #ff9dc1; stroke: none; opacity: 0.7; }
.dino .dino__line { fill: none; stroke-width: 2.5; }
.dino .dino__stripe { stroke: var(--dino-shade); stroke-width: 4; }
.dino .dino__eye { fill: var(--fg); stroke: none; }

.dino :is(.dino__leg, .dino__tail, .dino__head, .dino__eye, .dino__torso, .dino__wing) {
    transform-box: fill-box;
}

.dino .dino__leg { transform-origin: 50% 12%; }
.dino .dino__tail { transform-origin: 100% 30%; animation: wag 1.6s ease-in-out infinite alternate; }
.dino .dino__eye { transform-origin: center; animation: blink 4.5s infinite; }
.dino .dino__head { transform-origin: 20% 80%; }
.dino .dino__wing { transform-origin: 50% 100%; }

/* Walking: legs step in pairs, the body bobs on every step. */
.dino--walking .dino__leg--a { animation: step 0.5s ease-in-out infinite alternate; }
.dino--walking .dino__leg--b { animation: step 0.5s ease-in-out infinite alternate-reverse; }
.dino--walking .dino__torso { animation: bob 0.25s ease-in-out infinite alternate; }

/* Flying: wings beat, the body rises and falls with them. */
.dino--flying .dino__wing,
.dino--ptero.dino--idle .dino__wing { animation: flap 0.45s ease-in-out infinite alternate; }
.dino--flying .dino__torso { animation: bob 0.45s ease-in-out infinite alternate; }
.dino--ptero.dino--idle .dino__wing { animation-duration: 1.1s; }

/* Idle: breathes, nods, and every so often hops. */
.dino--idle .dino__torso { animation: breathe 2.6s ease-in-out infinite; }
.dino--idle .dino__head { animation: nod 3.2s ease-in-out infinite; }
.dino--idle { animation: hop 3.6s var(--ease) infinite; animation-delay: var(--hop-delay, 0s); }

/* The ptero hovers rather than hops; the hatchling wobbles in its egg. */
.dino--ptero.dino--idle { animation: hover 2.4s ease-in-out infinite alternate; }
.dino--hatchling.dino--idle { animation: wobble 2.8s ease-in-out infinite; transform-origin: 50% 95%; }

@keyframes flap { from { scale: 1 1; } to { scale: 1 -0.55; } }
@keyframes hover { from { translate: 0 0; } to { translate: 0 -10%; } }
@keyframes wobble {
    0%, 55%, 100% { rotate: 0deg; }
    62% { rotate: -7deg; }
    70% { rotate: 6deg; }
    78% { rotate: -4deg; }
    86% { rotate: 2deg; }
}

@keyframes step { from { rotate: -18deg; } to { rotate: 18deg; } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -3px; } }
@keyframes wag { from { rotate: -5deg; } to { rotate: 6deg; } }
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.015 1.03; } }
@keyframes nod { 0%, 70%, 100% { rotate: 0deg; } 80% { rotate: -7deg; } 90% { rotate: 3deg; } }
@keyframes blink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 0.1; } }
@keyframes hop {
    0%, 72%, 100% { translate: 0 0; scale: 1 1; }
    76% { translate: 0 0; scale: 1.06 0.92; }
    84% { translate: 0 -18%; scale: 0.96 1.05; }
    92% { translate: 0 0; scale: 1.04 0.95; }
}

/* The parade: across the bottom of the opening frame, left to right. */
.parade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    height: var(--parade-h);
    pointer-events: none;
}

.parade::before {
    content: '';
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -1.2rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--wash-mint);
    border-top: 3px dashed #9fdcbc;
}

.parade .dino {
    position: absolute;
    bottom: 0.4rem;
    left: 0;
    height: calc(var(--parade-h) * var(--size, 1));
    width: auto;
    aspect-ratio: 200 / 140;
    animation: stroll var(--dur, 30s) linear infinite;
    animation-delay: var(--delay, 0s);
    translate: -30vw 0;
}

@keyframes stroll {
    from { translate: -30vw 0; }
    to { translate: 110vw 0; }
}

/* The flock: pterodactyls crossing the sky above the name. */
.flock {
    position: absolute;
    left: 0;
    right: 0;
    top: clamp(4.5rem, 11vh, 7rem);
    height: 12rem;
    z-index: 2;
    pointer-events: none;
}

.flock .dino {
    position: absolute;
    top: var(--top, 0);
    left: 0;
    width: calc(clamp(5rem, 8vw, 7.5rem) * var(--size, 1));
    animation: stroll var(--dur, 22s) linear infinite;
    animation-delay: var(--delay, 0s);
    translate: -30vw 0;
}

/* A hatchling waiting by the reply button. */
.hatch {
    width: clamp(6rem, 12vw, 8rem);
    margin: 0 auto 1rem;
}

.hatch--start { margin-inline: 0; }

/* On phones the nav sits at the bottom; the parade walks just above it. */
@media (max-width: 38rem) {
    .hero { --parade-h: 3.2rem; }
    /* The words stack tall on a phone, so they go under him, not over him:
       the photo takes the top of the screen and fades into the page. */
    .hero { align-items: start; align-content: start; }
    .hero__media {
        position: relative;
        inset: auto;
        height: 50svh;
        mask-image: linear-gradient(to bottom, #000 78%, transparent);
    }
    .hero__media img { object-position: 50% 40%; }
    .hero::after { display: none; }
    .parade { bottom: 4.4rem; }
    .hero__inner { padding-top: 0.5rem; padding-bottom: calc(var(--parade-h) + 6rem); }
    .parade::before { display: none; }
}

/* And one seeing guests out. */
.foot { position: relative; overflow: clip; padding-bottom: 5.5rem; }

.foot__dino {
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    width: 4.5rem;
    animation: stroll 42s linear infinite;
    animation-delay: -12s;
    translate: -30vw 0;
    opacity: 0.9;
}

/* --- reveal: one system, driven by position, not eleven copies of a fade - */

[data-reveal] {
    opacity: 0;
    translate: 0 1.75rem;
    transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
}

[data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] { opacity: 1; translate: none; }
    .hero__media img { scale: 1; animation: none; }
    .parade .dino, .flock .dino, .foot__dino { animation: none; translate: none; }
    .parade .dino:nth-child(1) { left: 2%; }
    .parade .dino:nth-child(2) { left: 16%; }
    .parade .dino:nth-child(3) { left: 30%; }
    .parade .dino:nth-child(4) { left: 44%; }
    .parade .dino:nth-child(5) { left: 58%; }
    .parade .dino:nth-child(6) { left: 72%; }
    .parade .dino:nth-child(7) { left: 86%; }
    .flock .dino:nth-child(1) { left: 55%; }
    .flock .dino:nth-child(2) { left: 78%; }
    .foot__dino { left: auto; right: 1rem; }
}

@media print {
    .nav, .reel__controls, .dino, .hero__scroll { display: none !important; }
    body { background: #fff; color: #000; }
}
