/* Self-hosted (see fonts/README.txt). Display type in Nosifer is NOT a web
   font: blockers can refuse every font, so it ships as inline SVG paths made
   by tools/outline.py. These faces may fall back without breaking the look. */
@font-face {
    font-family: 'BigNoodleTitling';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('/fonts/big_noodle_titling.ttf') format('truetype');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
}

:root {
    --bg: #000;
    --fg: #e8e4dc;
    --dim: #7a756c;
    --line: #2a2826;
    --blood: #a10d0d;
    --blood-hi: #d11a1a;
    --billing: 'BigNoodleTitling', 'Oswald', 'Arial Narrow', sans-serif;
    --body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: inherit; }

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

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.5rem 2.5rem;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

/* Full-bleed spider, in three layers that share one geometry (cover, same
   focal point), so the two photos stay pixel-aligned at every viewport:
   .hero-fill  the same scene without the spider, dimmed
   .hero-art   the scene with the spider, faded out in an oval: a spotlight
               that blends into .hero-fill with no seam
   ::after     a vignette over both that also melts the bottom into the page */
.hero {
    --focus: 50% 52%;
}

.hero-fill,
.hero-art {
    position: absolute;
    inset: 0;
}

.hero-fill {
    z-index: -3;
    background: var(--focus) / cover no-repeat url("/hero-web-1200.jpg");
    background-image: image-set(url("/hero-web-1200.webp") type("image/webp"), url("/hero-web-1200.jpg") type("image/jpeg"));
    filter: brightness(.45) saturate(.8);
}

.hero-art { z-index: -2; }

.hero-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus);
    -webkit-mask-image: radial-gradient(closest-side ellipse at 50% 38%, #000 50%, transparent);
    mask-image: radial-gradient(closest-side ellipse at 50% 38%, #000 50%, transparent);
    animation: lurk 2.5s ease-out both;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0, 0, 0, .75) 100%),
        linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, .7) 80%, #000 100%);
    pointer-events: none;
}

@keyframes lurk {
    from { opacity: 0; }
}

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

/* Outlined Nosifer words (tools/outline.py); sized by font-size through em. */
.type {
    display: block;
    width: auto;
    max-width: 100%;
    fill: currentColor;
    overflow: visible;
}

h1 {
    margin: 0;
    font-weight: 400;
    font-size: clamp(2.6rem, 11vw, 7.5rem);
    line-height: 1.05;
    color: var(--blood);
    filter: drop-shadow(0 2px 18px rgba(0, 0, 0, .9)) drop-shadow(0 0 30px rgba(161, 13, 13, .35));
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 .amp {
    font-family: var(--body);
    font-weight: 300;
    font-size: max(.16em, .7rem);
    letter-spacing: .6em;
    text-transform: uppercase;
    color: var(--dim);
    margin: .9em 0 1.5em .6em;
}

/* pulsing arrow under the title, pointing people down to the RSVP button */
.cue {
    display: block;
    margin-top: 1.6rem;
    padding: .4rem;
    color: #8a857c;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility 0s linear .6s;
}
/* shown by app.js after ~5.5s with no activity */
.cue.show {
    visibility: visible;
    transition: opacity .6s ease;
    animation: cue 2.2s ease-in-out .6s infinite;
    opacity: .35;
}
.cue svg { display: block; }
.cue:hover, .cue:focus-visible { color: var(--fg); }

@keyframes cue {
    0%, 100% { opacity: .35; transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(.45rem); }
}

/* ---------- release (below the fold, set like a one-sheet) ---------- */

.release {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 6rem;
    text-align: center;
    font-family: var(--billing);
    text-transform: uppercase;
}

/* ---------- studio footer: the credit at the foot of the one-sheet ---------- */

.studio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 2rem 1.5rem 3.5rem;
    font-family: var(--billing);
    text-transform: uppercase;
    text-align: center;
    color: #3d3a35;
}

/* ZHI lockup: mark + wordmark, monochrome grey */
.lockup {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.lockup img { width: 1.5rem; height: 1.5rem; opacity: .22; }
.wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}
.wordmark b {
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: .01em;
    color: #3d3a35;
    -webkit-text-stroke: .4pt #3d3a35;   /* the wordmark's spec'd faux-bold */
}
.wordmark span {
    font-size: .45rem;
    letter-spacing: .26em;
    margin-top: .1rem;
}

.joint {
    margin: 0;
    font-size: .8rem;
    letter-spacing: .32em;
    padding-left: .32em;              /* balance the trailing tracking */
}
/* the collab x: a true multiplication sign, lighter and set apart */
.joint .x {
    display: inline-block;
    margin: 0 .35em 0 .05em;
    font-family: var(--body);
    font-weight: 300;
    font-size: 1.15em;
    letter-spacing: 0;
    line-height: 0;
    vertical-align: -.04em;
}

.date {
    margin: 2.5rem 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: .9;
}
.date .pre {
    font-size: 1.3rem;
    letter-spacing: .6em;
    padding-left: .6em;
    color: var(--blood-hi);
    margin-bottom: .6rem;
}
.date .big {
    font-size: clamp(2.4rem, 12.5vw, 7.5rem);
    letter-spacing: .02em;
    text-wrap: balance;               /* one line in BigNoodle; wraps if it falls back */
    color: var(--fg);
}

.time {
    margin: .9rem 0 0;
    font-size: clamp(1.6rem, 4.5vw, 2.4rem);
    letter-spacing: .35em;
    padding-left: .35em;
}

.where {
    margin: 1.4rem 0 0;
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    letter-spacing: .3em;
    padding-left: .3em;
}
.where a {
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: border-color .2s, color .2s;
}
.where a:hover { color: var(--blood-hi); border-color: var(--blood-hi); }

@media (max-width: 480px) {
    .joint { font-size: .72rem; letter-spacing: .2em; padding-left: .2em; }
}

/* pumpkin spilling candy corn; its black ground fades into the page */
.candy {
    display: block;
    width: min(30rem, 100%);
    margin-top: 3.5rem;
}
.candy img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image: radial-gradient(closest-side ellipse at 50% 52%, #000 72%, transparent);
    mask-image: radial-gradient(closest-side ellipse at 50% 52%, #000 72%, transparent);
}
.candy + .rating { margin-top: 1rem; }

/* fictitious rating block, after the one at the foot of a one-sheet:
   rating | descriptors on top, the house notes across the bottom */
.rating {
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: auto 1fr;
    max-width: 30rem;
    border: 2px solid var(--fg);
    text-align: left;
    line-height: 1.15;
}
.rating-mark {
    display: flex;
    align-items: center;
    padding: .35rem .9rem .2rem;
    border-right: 2px solid var(--fg);
    font-size: 3.2rem;
    letter-spacing: .02em;
    -webkit-text-stroke: .6pt var(--fg);
    white-space: nowrap;
}
.rating-why {
    display: flex;
    align-items: center;
    padding: .55rem .9rem .5rem;
    font-size: 1.1rem;
    letter-spacing: .06em;
}
.rating-notes {
    grid-column: 1 / -1;
    border-top: 2px solid var(--fg);
    padding: .5rem .9rem .45rem;
}
.rating-notes p {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: .06em;
}
@media (max-width: 480px) {
    .rating-mark { font-size: 2.4rem; padding: .3rem .6rem .15rem; }
    .rating-why { font-size: .95rem; letter-spacing: .03em; padding: .5rem .65rem .45rem; }
    .rating-notes { padding: .45rem .65rem .4rem; }
    .rating-notes p { font-size: .95rem; letter-spacing: .03em; }
}

.scroll {
    margin-top: 4rem;
    font-family: var(--body);
    font-size: .75rem;
    letter-spacing: .35em;
    text-decoration: none;
    padding: .9rem 2.2rem .9rem 2.55rem;
    border: 1px solid var(--blood);
    transition: background .2s, color .2s;
}
.scroll:hover { background: var(--blood); color: #000; }

/* ---------- rsvp ---------- */

/* Folded until the RSVP button opens it (or a manage link / #rsvp arrives).
   Animating grid rows 0fr -> 1fr gives a smooth height transition. */
.fold {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .7s cubic-bezier(.2, .8, .2, 1);
}
.fold.open { grid-template-rows: 1fr; }
.fold-inner {
    min-height: 0;
    overflow: hidden;
}
.fold .rsvp {
    opacity: 0;
    transform: translateY(-1.5rem);
    transition: opacity .5s ease .15s, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.fold.open .rsvp { opacity: 1; transform: none; }
.fold.instant, .fold.instant .rsvp { transition: none; }

.scroll[aria-expanded="true"] { background: var(--blood); color: #000; }

.rsvp {
    max-width: 30rem;
    margin: 0 auto;
    padding: 6rem 1.5rem 8rem;
    border-top: 1px solid var(--line);
}

.rsvp h2 {
    margin: 0 0 3rem;
    font-weight: 400;
    font-size: 2rem;
    color: var(--blood);
    display: flex;
    justify-content: center;
}

.field {
    display: block;
    margin-bottom: 2rem;
}

.field > span,
.choice legend {
    display: block;
    font-size: .7rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: .4rem;
}

.field input,
.field select {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    font: inherit;
    font-size: 1.1rem;
    padding: .4rem 0;
    border-radius: 0;
    outline: none;
    transition: border-color .2s;
}
.field input:focus,
.field select:focus { border-color: var(--blood-hi); }
.field select option { background: #000; }

.choice {
    border: 0;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
}
.choice legend { padding: 0; margin-bottom: .8rem; }

.choice label {
    flex: 1;
    position: relative;
}
.choice input {
    position: absolute;
    opacity: 0;
    inset: 0;
}
.choice span {
    display: block;
    text-align: center;
    padding: .8rem 0;
    border: 1px solid var(--line);
    margin-left: -1px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.choice label:first-of-type span { margin-left: 0; }
.choice input:checked + span {
    background: var(--blood);
    border-color: var(--blood);
    color: #000;
    position: relative;
}
.choice input:focus-visible + span { outline: 1px solid var(--fg); outline-offset: 2px; }

button {
    font: inherit;
    font-size: .75rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--fg);
    background: transparent;
    border: 1px solid var(--blood);
    padding: .9rem 2.2rem .9rem 2.55rem;
    cursor: pointer;
    transition: background .2s, color .2s;
}
button:hover:not(:disabled) { background: var(--blood); color: #000; }
button:disabled { opacity: .5; cursor: default; }

form button[type="submit"] { width: 100%; margin-top: 1rem; }

.status,
.who,
.done-msg {
    text-align: center;
}
.status { color: var(--dim); }
.status.error { color: var(--blood-hi); }
.who { margin: 0 0 2rem; color: var(--dim); }
.done-msg { font-size: 1.2rem; margin: 0 0 2rem; }

.small {
    font-size: .8rem;
    color: var(--dim);
    margin: 0 0 .5rem;
}

.link-box {
    display: flex;
    gap: .5rem;
}
.link-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--fg);
    font: inherit;
    font-size: .8rem;
    padding: .6rem;
}
.link-box button { padding: .6rem 1rem .6rem 1.35rem; }

@media (prefers-reduced-motion: reduce) {
    .hero-art img, .cue { animation: none; }
    .fold, .fold .rsvp { transition: none; }
    html { scroll-behavior: auto; }
}
