/* ==========================================================================
   An invitation — 19 August 2026, The Nineteen, Jakarta
   A printed card: warm paper, ink serif, one brass accent, hairline rules.
   ========================================================================== */

:root {
    --paper: #f7f3ec;
    --paper-edge: #e5ddce;
    --table: #ddd4c3;
    --ink: #1b1916;
    --ink-soft: #6d6559;
    --ink-faint: #978f81;
    --brass: #8c5e34;
    --rule: rgba(27, 25, 22, 0.13);
    --rule-strong: rgba(27, 25, 22, 0.26);

    --serif: 'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Letterspaced small caps, used for every label and button */
    --caps-size: 0.7rem;
    --caps-track: 0.16em;
}

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

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

body {
    margin: 0;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(14px, 4vw, 56px);
    font-family: var(--serif);
    font-size: clamp(1rem, 2.6vw, 1.075rem);
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--table);
    background-image: radial-gradient(120% 90% at 50% 0%, #e7dfd0 0%, var(--table) 60%, #cfc5b2 100%);
    -webkit-font-smoothing: antialiased;
}

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

.card {
    width: min(560px, 100%);
    padding: clamp(30px, 7vw, 60px) clamp(22px, 6vw, 58px) clamp(26px, 6vw, 48px);
    text-align: center;
    background: var(--paper);
    border: 1px solid var(--paper-edge);
    border-radius: 3px;
    box-shadow:
        0 1px 1px rgba(27, 25, 22, 0.05),
        0 10px 20px -8px rgba(27, 25, 22, 0.14),
        0 34px 60px -30px rgba(27, 25, 22, 0.3);
}

/* An inner keyline, the way a printed card is bordered */
.card__inner {
    padding: clamp(20px, 5vw, 34px) 0 0;
    border-top: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   Label — hairline, small caps, hairline
   -------------------------------------------------------------------------- */

.label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    font-family: var(--sans);
    font-size: var(--caps-size);
    font-weight: 500;
    letter-spacing: var(--caps-track);
    text-transform: uppercase;
    color: var(--brass);
}

.label::before,
.label::after {
    content: '';
    width: clamp(20px, 7vw, 34px);
    height: 1px;
    background: var(--rule-strong);
}

/* --------------------------------------------------------------------------
   Crest — the nineteenth, and the name of the place, in one mark
   -------------------------------------------------------------------------- */

.crest {
    position: relative;
    display: grid;
    place-content: center;
    width: 96px;
    height: 96px;
    margin: clamp(24px, 5vw, 34px) auto clamp(22px, 5vw, 30px);
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    color: var(--brass);
}

.crest::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid var(--rule);
    border-radius: 50%;
}

.crest span {
    display: block;
    font-family: var(--sans);
    font-size: 0.53rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.crest b {
    display: block;
    margin: 5px 0 6px;
    font-family: var(--serif);
    font-size: 2.1rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.title {
    margin: 0;
    font-size: clamp(1.95rem, 7.6vw, 2.85rem);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.005em;
    text-wrap: balance;
}

.title em {
    font-style: italic;
    color: var(--brass);
}

.body {
    margin: clamp(16px, 4vw, 22px) auto 0;
    max-width: 34ch;
    color: var(--ink-soft);
    text-wrap: pretty;
}

.body strong {
    font-weight: 500;
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: clamp(26px, 6vw, 36px);
}

.btn {
    display: inline-block;
    padding: 14px 26px;
    font-family: var(--sans);
    font-size: var(--caps-size);
    font-weight: 500;
    letter-spacing: var(--caps-track);
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid var(--ink);
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, transform 0.25s ease;
}

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

.btn--yes:hover {
    background: var(--brass);
    border-color: var(--brass);
}

.btn--ghost {
    color: var(--ink);
    background: transparent;
    border-color: var(--rule-strong);
}

.btn--ghost:hover {
    color: var(--brass);
    border-color: var(--brass);
}

.btn--no {
    color: var(--ink-faint);
    background: transparent;
    border-color: var(--rule);
}

.btn:focus-visible {
    outline: 1px solid var(--brass);
    outline-offset: 3px;
}

/* Holds the gap open once the No button breaks out of the flow */
.slot {
    display: inline-flex;
}

.btn--loose {
    position: fixed;
    z-index: 10;
    margin: 0;
    background: var(--paper);
    transition: left 0.32s cubic-bezier(0.33, 1, 0.68, 1),
                top 0.32s cubic-bezier(0.33, 1, 0.68, 1),
                transform 0.32s ease, color 0.25s ease, border-color 0.25s ease;
}

.note {
    margin: clamp(20px, 5vw, 26px) auto 0;
    max-width: 30ch;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.55;
    color: var(--ink-faint);
    text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Details — hairline-separated rows, as on a printed programme
   -------------------------------------------------------------------------- */

.details {
    margin: clamp(26px, 6vw, 34px) 0 0;
    text-align: left;
    border-top: 1px solid var(--rule);
}

/* Label above value at every width. The values here run long, and a
   right-aligned value column strands them against a tiny label. */
.details > div {
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
}

.details dt {
    margin-bottom: 3px;
    font-family: var(--sans);
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.details dd {
    margin: 0;
    line-height: 1.45;
    text-wrap: pretty;
}

.details a {
    color: var(--brass);
    text-decoration: none;
    border-bottom: 1px solid rgba(140, 94, 52, 0.35);
}

.details a:hover {
    border-bottom-color: var(--brass);
}

/* --------------------------------------------------------------------------
   The song — a dark player inset into the paper, framed like a plate
   -------------------------------------------------------------------------- */

.song {
    margin: clamp(26px, 6vw, 34px) 0 0;
}

.song .label {
    margin-bottom: 14px;
}

.song__frame {
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    line-height: 0;
}

.song__frame iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* Names the track when the embed is blocked, and credits it when it isn't. */
.song__credit {
    margin: 10px 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--ink-faint);
}

.song__credit a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
}

.song__credit a:hover {
    color: var(--brass);
    border-bottom-color: var(--brass);
}

/* --------------------------------------------------------------------------
   Countdown as a single sentence, and the sign-off
   -------------------------------------------------------------------------- */

.countdown {
    margin: clamp(22px, 5vw, 28px) 0 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--ink-soft);
    text-wrap: pretty;
}

.countdown b {
    font-weight: 500;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.signoff {
    margin: clamp(24px, 5vw, 30px) 0 0;
    padding-top: clamp(18px, 4vw, 24px);
    border-top: 1px solid var(--rule);
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-soft);
    text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Entrance — a short, staggered settle. Nothing loops.
   -------------------------------------------------------------------------- */

.card > *,
.card__inner > * {
    animation: settle 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.card > :nth-child(1)  { animation-delay: 0.04s; }
.card > :nth-child(2)  { animation-delay: 0.10s; }
.card__inner > :nth-child(1) { animation-delay: 0.16s; }
.card__inner > :nth-child(2) { animation-delay: 0.22s; }
.card__inner > :nth-child(3) { animation-delay: 0.28s; }
.card__inner > :nth-child(4) { animation-delay: 0.34s; }
.card__inner > :nth-child(5) { animation-delay: 0.40s; }
.card__inner > :nth-child(6) { animation-delay: 0.46s; }
.card__inner > :nth-child(7) { animation-delay: 0.52s; }

@keyframes settle {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Narrow screens and reduced motion
   -------------------------------------------------------------------------- */

@media (max-width: 360px) {
    .btn {
        padding: 13px 20px;
        letter-spacing: 0.12em;
    }

    .crest {
        width: 84px;
        height: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }
}
