/* =========================================================================
   O DIÁRIO DOS NOIVOS — newspaper-chic design system
   Ana & Renan · 18.10.2026 · La Selva

   Single committed look: newsprint. No dark mode — a newspaper is paper.
   ========================================================================= */

:root {
    /* Ink & paper — warm, not stark. The page should feel welcoming in the hand. */
    --newsprint:        #F7F4EC;
    --newsprint-deep:   #EFEBE0;
    --newsprint-edge:   #E5DFD1;
    --ink:              #1C1A15;
    --ink-soft:         #55503F;
    --ink-faint:        #918978;
    --ink-ghost:        #C4BCAA;
    --accent:           #8A4034;  /* one warm red, used sparingly */

    /* Rules — hairlines carry the structure; nothing needs to shout */
    --rule-hair:        0.5px solid var(--ink-ghost);
    --rule-thin:        1px solid var(--ink);
    --rule-thick:       2px solid var(--ink);
    --rule-faint:       1px solid var(--ink-ghost);

    /* Type */
    --display: "Playfair Display", "Times New Roman", Times, serif;
    --body:    "Libre Baskerville", Georgia, "Times New Roman", serif;
    --label:   "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;

    /* Measure & rhythm */
    --measure:    72rem;
    --measure-text: 34rem;
    --gutter:     clamp(1.25rem, 4vw, 2.75rem);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* The nav is sticky, so an anchor target would otherwise land behind it. */
    scroll-padding-top: 4rem;
    /* Lets the full-bleed game panel use 100vw without the vertical scrollbar's
       width spilling into a horizontal scroll. `clip`, not `hidden`: hidden
       would make this a scroll container and kill position:sticky on the nav. */
    overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    margin: 0;
    background-color: var(--newsprint);
    /* Faint fibre tooth so the paper isn't a flat swatch */
    background-image:
        radial-gradient(circle at 15% 20%, rgba(23,21,15,.020) 0 1px, transparent 1px),
        radial-gradient(circle at 62% 71%, rgba(23,21,15,.016) 0 1px, transparent 1px),
        radial-gradient(circle at 84% 38%, rgba(23,21,15,.013) 0 1px, transparent 1px);
    background-size: 37px 41px, 53px 47px, 29px 61px;
    color: var(--ink);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

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

/* ---------- Shell ------------------------------------------------------- */

.sheet {
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute; left: -9999px;
    background: var(--ink); color: var(--newsprint);
    padding: .6rem 1rem; z-index: 100; font-family: var(--label);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Masthead ---------------------------------------------------- */

.masthead {
    padding-top: clamp(1.5rem, 4vw, 2.75rem);
    text-align: center;
}

.masthead__flag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--label);
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-bottom: .5rem;
    border-bottom: var(--rule-hair);
}
.masthead__flag span:nth-child(2) { text-align: center; }
.masthead__flag span:last-child { text-align: right; }

.masthead__title {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(3.1rem, 13vw, 9.5rem);
    line-height: .86;
    letter-spacing: -0.02em;
    margin: clamp(.9rem, 2.5vw, 1.6rem) 0 clamp(.6rem, 2vw, 1rem);
    /* Optical tightening of the ampersand pair */
    font-feature-settings: "liga" 1, "kern" 1;
}
.masthead__title .amp {
    font-style: italic;
    font-weight: 400;
    padding-inline: .06em;
}

.masthead__dateline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .55rem 1.1rem;
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: .7rem 0;
    border-top: var(--rule-thin);
    border-bottom: var(--rule-thick);
}
.masthead__dateline .dot { color: var(--ink-ghost); }

/* ---------- Navigation -------------------------------------------------- */

.rag {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--newsprint);
    border-bottom: var(--rule-thin);
    box-shadow: 0 1px 0 rgba(23,21,15,.06), 0 6px 14px -12px rgba(23,21,15,.5);
}

.rag__inner {
    max-width: var(--measure);
    margin-inline: auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    /* `center` is UNSAFE alignment: when the links overflow, the excess is split
       across both edges and the start edge sits at a negative scroll offset the
       browser will not let you reach — the first two links become permanently
       unreachable on a phone. `safe center` centres only when it fits; the
       unprefixed declaration above it is the fallback for older engines. */
    justify-content: flex-start;
    justify-content: safe center;
    gap: clamp(.75rem, 2.4vw, 2rem);
    overflow-x: auto;
    scrollbar-width: none;
}
.rag__inner::-webkit-scrollbar { display: none; }

.rag__link {
    flex: 0 0 auto;
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    padding: .85rem .1rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}
.rag__link:hover,
.rag__link[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

/* ---------- Section heads ----------------------------------------------- */

.section {
    padding-block: clamp(3.25rem, 9vw, 6rem);
    border-top: var(--rule-hair);
}
.section:first-of-type { border-top: 0; }

/* ---------- Grid & gallery ---------------------------------------------- */

.grid {
    display: grid;
    gap: clamp(1.75rem, 5vw, 3.25rem);
    align-items: start;
}
@media (min-width: 52rem) {
    .grid--2 { grid-template-columns: 1fr 1fr; }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Caderno de viagem: a página da lua de mel -------------------- */

.foto-lua { margin: 0 0 clamp(1.2rem, 3vw, 2rem); }
.foto-lua--capa { margin-top: clamp(1.5rem, 4vw, 2.5rem); }

/* The five numbers that make the trip legible before any of the prose. */
.numeros {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
    border-top: var(--rule-thick);
    border-bottom: var(--rule-thick);
}
@media (min-width: 46rem) {
    .numeros { grid-template-columns: repeat(5, 1fr); }
}
.numeros > div {
    padding: .9rem .5rem;
    text-align: center;
    border-right: var(--rule-hair);
}
.numeros > div:last-child { border-right: 0; }
.numeros dt {
    font-family: var(--label);
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    order: 2;
}
.numeros dd {
    font-family: var(--display);
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 .3rem;
    font-variant-numeric: lining-nums;
}
.numeros > div { display: flex; flex-direction: column; }

/* The ask: three groups of real line items, priced like a menu. */
.grupo-lua { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.grupo-lua__dek {
    font-style: italic;
    color: var(--ink-soft);
    max-width: var(--measure-text);
    margin: .3rem 0 .9rem;
}

.linha-roteiro { list-style: none; margin: 0; padding: 0; }
.linha-roteiro li {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .55rem 0;
    border-top: var(--rule-hair);
}
.linha-roteiro li:last-child { border-bottom: var(--rule-hair); }

/* A dotted leader, the way a menu or an index sets a price against a name. */
.linha-roteiro__nome { flex: 0 1 auto; }
.linha-roteiro li::after {
    content: "";
    flex: 1 1 auto;
    border-bottom: 1px dotted var(--ink-ghost);
    transform: translateY(-.25em);
    min-width: 1.5rem;
}
.linha-roteiro__valor {
    order: 3;
    font-family: var(--label);
    font-size: .8rem;
    letter-spacing: .06em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.linha-roteiro .tomada { color: var(--ink-faint); }
.linha-roteiro .tomada .linha-roteiro__nome { text-decoration: line-through; }

/* ---------- Embedded video ---------------------------------------------- */

.video {
    margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

.video__frame {
    border: var(--rule-thin);
    padding: .4rem;
    background: var(--newsprint-deep);
}

.video__frame iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    background: var(--ink);
}

/* Justified gallery: each row is packed server-side so its aspect ratios add
   up to roughly one width, then flex-grow turns those ratios into widths. Every
   photo in a row lands on the same height and the row ends flush with the margin
   — column masonry could not do that, because balancing four tiles across three
   columns leaves one of them empty. */
.gallery {
    display: flex;
    flex-direction: column;
    gap: clamp(.5rem, 1.4vw, .9rem);
}

.gallery__linha {
    display: flex;
    gap: clamp(.5rem, 1.4vw, .9rem);
}

.gallery__item {
    /* flex-grow is set per photo from its ratio; basis 0 so the whole row width
       is shared out by ratio alone. */
    flex: 0 1 0;
    min-width: 0;
}
.gallery__item figure { margin: 0; }

/* A slow push in on hover — the only thing on the page that moves. */
.gallery .figure__frame { overflow: hidden; }
.gallery .figure__frame img { transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.gallery figure:hover .figure__frame img { transform: scale(1.04); }

/* On a phone a justified row of three would be three stamps. Below the
   breakpoint the rows dissolve — display: contents — and the photos pack as a
   two-column masonry instead, where the tiles balance evenly. */
@media (max-width: 51.999rem) {
    .gallery {
        display: block;
        columns: 2;
        column-gap: clamp(.5rem, 1.4vw, .9rem);
    }
    .gallery__linha { display: contents; }
    .gallery__item {
        break-inside: avoid;
        margin-bottom: clamp(.5rem, 1.4vw, .9rem);
    }
}

.section__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.section__head::before,
.section__head::after {
    content: "";
    flex: 1;
    border-top: var(--rule-thin);
}
/* The section rubric is a graphic device, not document structure. It renders as
   a <p> so it doesn't put an h2 ahead of the page's h1 in the heading outline;
   h2 stays matched so markup can migrate in any order. */
.section__head > :is(h2, p) {
    font-family: var(--label);
    font-size: clamp(.78rem, 2vw, .92rem);
    font-weight: 700;
    letter-spacing: .34em;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
    text-indent: .34em; /* compensate for trailing letterspace */
}

/* Headline hierarchy inside a section */
.headline {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.015em;
    margin: 0 0 .6rem;
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    text-wrap: balance;
}
.headline--sm { font-size: clamp(1.35rem, 3.2vw, 1.9rem); }

.kicker {
    font-family: var(--label);
    font-size: .7rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 .5rem;
}

.standfirst {
    font-family: var(--body);
    font-style: italic;
    font-size: clamp(1rem, 2.4vw, 1.18rem);
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 46rem;
    margin: 0 auto 1.75rem;
    text-align: center;
    text-wrap: pretty;
}

.byline {
    font-family: var(--label);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-block: .5rem;
    border-block: var(--rule-hair);
    margin-bottom: 1.5rem;
}

/* ---------- Columns ----------------------------------------------------- */

.columns {
    column-gap: clamp(1.75rem, 4vw, 3rem);
    column-rule: var(--rule-faint);
    text-align: justify;
    hyphens: auto;
}
.columns--2 { column-count: 1; }
.columns--3 { column-count: 1; }

@media (min-width: 46rem) {
    .columns--2 { column-count: 2; }
    .columns--3 { column-count: 2; }
}
@media (min-width: 68rem) {
    .columns--3 { column-count: 3; }
}

.columns p { margin: 0 0 1.05em; }
.columns p:last-child { margin-bottom: 0; }
/* Never orphan a heading at the foot of a column */
.columns h3, .columns .headline--sm { break-after: avoid; break-inside: avoid; }
.columns figure, .columns .box { break-inside: avoid; }

.dropcap::first-letter {
    font-family: var(--display);
    font-weight: 900;
    float: left;
    font-size: 3.9em;
    line-height: .82;
    padding: .06em .09em 0 0;
    margin-top: .04em;
    color: var(--ink);
}

.prose { max-width: var(--measure-text); }
.prose--center { margin-inline: auto; }

/* ---------- Figures ----------------------------------------------------- */

figure { margin: 0 0 1.5rem; }

.figure__frame {
    border: var(--rule-thin);
    padding: .4rem;
    background: var(--newsprint-deep);
}
.figure__frame img {
    /* Photos stay in colour. A wholesale grayscale filter reads cold against
       warm paper, and it would flatten the genuinely black-and-white frames
       into the same look as everything else. Just a whisper of print contrast. */
    filter: contrast(1.03) saturate(.97);
    width: 100%;
}

figcaption {
    font-family: var(--body);
    font-style: italic;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--ink-soft);
    padding-top: .55rem;
    border-bottom: var(--rule-hair);
    padding-bottom: .55rem;
}
figcaption .credit {
    font-family: var(--label);
    font-style: normal;
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: block;
    margin-top: .25rem;
}

/* Placeholder plate for photos that don't exist yet */
.plate {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background-color: var(--newsprint-edge);
    background-image:
        repeating-linear-gradient(45deg,
            rgba(23,21,15,.055) 0 2px, transparent 2px 5px);
    color: var(--ink-faint);
    font-family: var(--label);
    font-size: .7rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    text-align: center;
    padding: 1rem;
}

/* ---------- Boxed items (sidebars, facts) ------------------------------- */

.box {
    border: var(--rule-thin);
    padding: clamp(1.1rem, 3vw, 1.6rem);
    background: rgba(255,255,255,.34);
}
.box--rule-top { border: 0; border-top: var(--rule-thick); padding-inline: 0; }

.box__label {
    font-family: var(--label);
    font-size: .68rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 .6rem;
}

/* Fact list — "QUANDO / ONDE / TRAJE" */
.facts {
    display: grid;
    gap: 0;
    margin: 0;
}
.facts > div {
    display: grid;
    grid-template-columns: minmax(6.5rem, 8rem) 1fr;
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: var(--rule-hair);
    align-items: baseline;
}
.facts > div:first-child { border-top: var(--rule-hair); }
.facts dt {
    font-family: var(--label);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.facts dd { margin: 0; }
.facts dd strong { font-weight: 700; }
.facts dd small {
    display: block;
    font-size: .82rem;
    color: var(--ink-soft);
    font-style: italic;
}

/* ---------- Countdown ticker -------------------------------------------- */

.ticker {
    border-block: var(--rule-thick);
    padding-block: clamp(1rem, 3vw, 1.5rem);
    display: flex;
    justify-content: center;
    gap: clamp(1.1rem, 5vw, 3.5rem);
    text-align: center;
}
.ticker__unit { min-width: 3.5rem; }
.ticker__num {
    display: block;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.ticker__lbl {
    display: block;
    font-family: var(--label);
    font-size: .62rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: .45rem;
}

/* ---------- Reply coupon (RSVP) ----------------------------------------- */

.coupon {
    border: 2px dashed var(--ink);
    padding: clamp(1.25rem, 4vw, 2.25rem);
    background: rgba(255,255,255,.42);
    position: relative;
    max-width: 44rem;
    margin-inline: auto;
}
/* A short break in the dashed rule, where a printed coupon would carry its
   "destaque aqui" notch. */
.coupon::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 1.4rem;
    width: 2.25rem;
    height: 4px;
    background: var(--newsprint);
}

.coupon__head {
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 1.4rem;
    border-bottom: var(--rule-hair);
}
.coupon__head h3 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin: 0 0 .3rem;
}
.coupon__head p {
    margin: 0;
    font-size: .84rem;
    font-style: italic;
    color: var(--ink-soft);
}

/* ---------- Classifieds (gift list) ------------------------------------- */

.classifieds {
    columns: 1;
    column-gap: clamp(1.5rem, 3.5vw, 2.5rem);
    column-rule: var(--rule-faint);
}
@media (min-width: 44rem) { .classifieds { columns: 2; } }
@media (min-width: 68rem) { .classifieds { columns: 3; } }

.ad {
    break-inside: avoid;
    padding: 1.1rem 0;
    border-bottom: var(--rule-hair);
    display: block;
    text-decoration: none;
}
.ad:first-child { border-top: var(--rule-hair); }
.ad:hover .ad__title { color: var(--accent); }

/* The "cut" — the square block a classified ad was always set around.
   Mounted like the article photos: hairline rule, a margin of paper, image within. */
.ad__cut {
    aspect-ratio: 1 / 1;
    border: var(--rule-thin);
    padding: .35rem;
    margin-bottom: .9rem;
    background: var(--newsprint-deep);
    overflow: hidden;
}

.ad__cut img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.03) saturate(.97);
    transition: transform .5s ease;
}
.ad:hover .ad__cut img { transform: scale(1.045); }

.ad--taken .ad__cut img { filter: grayscale(1) opacity(.55); }

/* Larger cut for the single-item page. */
.cut--lg {
    width: min(20rem, 80vw);
    margin-bottom: 0;
}

.ad__title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.14rem;
    line-height: 1.25;
    margin: 0 0 .35rem;
    transition: color .15s ease;
}
.ad__body {
    font-size: .85rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 .6rem;
}
.ad__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    font-family: var(--label);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.ad__price { font-weight: 700; letter-spacing: .06em; }
.ad__stock { color: var(--ink-faint); }
.ad--taken { opacity: .48; }
.ad--taken .ad__title { text-decoration: line-through; }

/* ---------- Map --------------------------------------------------------- */

/* Mounted like the article photos so it reads as part of the paper, not a widget. */
.map {
    border: var(--rule-thin);
    padding: .4rem;
    background: var(--newsprint-deep);
    margin-bottom: 1.5rem;
}
.map iframe {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    /* Google's tiles are a cold blue-grey; warm and mute them onto the newsprint. */
    filter: sepia(.28) saturate(.72) contrast(1.02) brightness(1.02);
}
@media (min-width: 52rem) {
    .map iframe { aspect-ratio: 16 / 10; }
}

/* ---------- PIX panel --------------------------------------------------- */

.pix {
    display: grid;
    gap: clamp(1.25rem, 4vw, 2rem);
    align-items: start;
}
@media (min-width: 46rem) { .pix { grid-template-columns: auto 1fr; } }

.pix__qr {
    border: var(--rule-thin);
    padding: .5rem;
    background: #fff;
    width: min(15rem, 60vw);
    justify-self: center;
}
.pix__qr img { width: 100%; image-rendering: pixelated; }

.pix__key {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .82rem;
    word-break: break-all;
    background: var(--newsprint-deep);
    border: var(--rule-faint);
    padding: .7rem .85rem;
    margin: .5rem 0 .85rem;
    line-height: 1.5;
}

/* ---------- Forms ------------------------------------------------------- */

.field { margin-bottom: 1.2rem; }

.field > label,
.fieldset__legend {
    display: block;
    font-family: var(--label);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: .45rem;
}

.input,
select.input,
textarea.input {
    width: 100%;
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink);
    background: rgba(255,255,255,.6);
    border: 0;
    border-bottom: var(--rule-thin);
    padding: .6rem .2rem;
    border-radius: 0;
    transition: background .15s ease, border-color .15s ease;
}
.input:focus {
    outline: none;
    background: #fff;
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 0 var(--accent);
}
textarea.input { min-height: 5.5rem; resize: vertical; line-height: 1.6; }
select.input { appearance: none; background-image: none; cursor: pointer; padding-right: 1.5rem; }

.input--code {
    font-family: var(--label);
    font-size: clamp(1.3rem, 5vw, 1.9rem);
    letter-spacing: .32em;
    text-transform: uppercase;
    text-align: center;
    padding: .7rem .2rem;
}

.hint {
    font-size: .78rem;
    font-style: italic;
    color: var(--ink-faint);
    margin: .4rem 0 0;
}
/* Invitation URLs get echoed back here and have no natural break points. */
.hint strong { overflow-wrap: anywhere; }

/* Invite codes and request ids appear in <code>; without this they fall back to
   the UA monospace default at a size that fights the serif around it. */
code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .88em;
    overflow-wrap: anywhere;
}

/* Radio pair styled as a stamped choice */
.choice {
    display: inline-flex;
    border: var(--rule-thin);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
    font-family: var(--label);
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: .5rem 1.05rem;
    cursor: pointer;
    background: transparent;
    color: var(--ink-soft);
    transition: background .12s ease, color .12s ease;
    user-select: none;
}
.choice label + input + label { border-left: var(--rule-thin); }
.choice input:checked + label { background: var(--ink); color: var(--newsprint); }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Guest row on the coupon */
.guest-row {
    padding: 1rem 0;
    border-bottom: var(--rule-hair);
}
.guest-row:first-of-type { border-top: var(--rule-hair); }
.guest-row__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.guest-row__name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.14rem;
    margin: 0;
}
/* Standalone: the admin tables use .tag outside a guest row, where a descendant
   selector left the status reading as undifferentiated body text. */
.tag {
    display: inline-block;
    font-family: var(--label);
    font-size: .6rem;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border: var(--rule-hair);
    padding: .1rem .4rem;
    white-space: nowrap;
}

/* Inside a guest row it's a quiet annotation on the name, not a badge. */
.guest-row__name .tag {
    border: 0;
    padding: 0;
    vertical-align: .22em;
    margin-left: .5rem;
}
.guest-row__extra {
    margin-top: .9rem;
    display: grid;
    gap: .9rem;
}
@media (min-width: 40rem) {
    .guest-row__extra { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
}

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

.btn {
    display: inline-block;
    font-family: var(--label);
    font-size: .76rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    padding: .82rem 1.9rem;
    border: var(--rule-thin);
    background: var(--ink);
    color: var(--newsprint);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
    transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--newsprint); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

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

.btn--block { display: block; width: 100%; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ---------- Notices ----------------------------------------------------- */

.notice {
    border-left: 3px solid var(--accent);
    background: rgba(140,47,47,.05);
    padding: .9rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}
.notice--ok { border-left-color: var(--ink); background: rgba(23,21,15,.045); }

.stamp {
    display: inline-block;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-family: var(--label);
    font-size: .8rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    transform: rotate(-3.5deg);
}

/* ---------- Tables (admin) ---------------------------------------------- */

.table-wrap { overflow-x: auto; border-block: var(--rule-thin); }

table.sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
table.sheet-table th {
    font-family: var(--label);
    font-size: .66rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    text-align: left;
    padding: .7rem .8rem;
    border-bottom: var(--rule-thin);
    white-space: nowrap;
}
table.sheet-table td {
    padding: .65rem .8rem;
    border-bottom: var(--rule-hair);
    vertical-align: top;
}
table.sheet-table tr:last-child td { border-bottom: 0; }
table.sheet-table tbody tr:hover { background: rgba(23,21,15,.028); }

.tally {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 0;
    border: var(--rule-thin);
    margin-bottom: 2rem;
}
.tally > div {
    padding: 1rem;
    text-align: center;
    border-right: var(--rule-hair);
}
.tally > div:last-child { border-right: 0; }
.tally__num {
    display: block;
    font-family: var(--display);
    font-weight: 900;
    /* Currency totals ("R$ 12.500,00") are long. Fixed at 2rem they overflowed
       a 120px tile and pushed the admin page into horizontal scroll on a phone. */
    font-size: clamp(1.25rem, 6vw, 2rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.tally__lbl {
    display: block;
    font-family: var(--label);
    font-size: .62rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: .4rem;
}

/* ---------- Jogo: "A corrida até o altar" ------------------------------- */
/* Framed like the paper's cartoon strip: hairline rule, margin of paper. */

/* Full-bleed: the panel escapes the 72rem measure and runs edge to edge.
   `margin-inline: calc(50% - 50vw)` widens it to the viewport; the `overflow-x:
   clip` on <html> below stops the scrollbar's width turning that into a
   horizontal scroll. `clip` and not `hidden` — hidden would create a scroll
   container and break the sticky nav. */
#jogo {
    position: relative;
    margin-inline: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
    aspect-ratio: 16 / 9;
    /* Without a cap, 16:9 at 1920px wide would be 1080px tall — taller than the
       screen. Cap it against the viewport so the panel and its heading fit on
       one screen and nobody has to scroll to reach the game.
       `dvh` (not `vh`) because mobile browser chrome shows and hides: with `vh`
       the panel is sized against the *largest* viewport and gets clipped the
       moment the address bar appears. The `vh` line is the fallback. */
    max-height: min(80vh, 56rem);
    max-height: min(80dvh, 56rem);
    border-block: var(--rule-thin);
    border-inline: 0;
    padding: .4rem;
    background: var(--newsprint-deep);
    margin-block: 1.25rem;
    overflow: hidden;
    /* Stops a swipe that starts on the panel from rubber-banding the page
       behind it — the pull-to-refresh bounce mid-jump is maddening. */
    overscroll-behavior: contain;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* The game page trades editorial whitespace for play area: the panel is the
   content, so the heading block above it stays tight. */
.section--jogo {
    padding-block: clamp(1.25rem, 3.5vw, 2.25rem);
}
.section--jogo .headline {
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    margin-bottom: .35rem;
}
.section--jogo .standfirst {
    margin-bottom: .9rem;
    max-width: 42rem;
    font-size: clamp(.88rem, 2.2vw, 1rem);
}
.section--jogo .section__head { margin-bottom: 1rem; }
.section--jogo .kicker { margin-bottom: .3rem; }

/* On anything shorter than ~900px the intro paragraph is what pushes the panel
   below the fold. Drop it and let the game have the height instead — the
   headline already says what this is. */
@media (max-height: 56rem) {
    .section--jogo .standfirst { display: none; }
    .section--jogo .section__head { margin-bottom: .7rem; }
    .section--jogo { padding-block: clamp(.9rem, 2.5vw, 1.4rem); }
}

/* Below ~640px tall (a phone in landscape, which is how you actually play a
   runner) the prose is pure obstacle — hide it and give the panel the screen. */
@media (max-height: 40rem) and (orientation: landscape) {
    .section--jogo { padding-block: .5rem; }
    .section--jogo .section__head,
    .section--jogo .kicker,
    .section--jogo .standfirst,
    .section--jogo .hint,
    .section--jogo .btn-row { display: none; }
    .section--jogo .headline { font-size: 1.1rem; margin-bottom: .4rem; }
    #jogo { max-height: 82dvh; margin-block: .5rem; }
}

#jogo-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--newsprint);
    image-rendering: pixelated;
    /* Stops the page scrolling under a thumb mid-run. */
    touch-action: none;
}

/* ---- HUD ---- */

.jogo__hud {
    position: absolute;
    top: .4rem; left: .4rem; right: .4rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .7rem;
    font-family: var(--label);
    font-size: clamp(.6rem, 2.2vw, .74rem);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
    pointer-events: none;
    z-index: 2;
}

.jogo__hud-item { display: flex; flex-direction: column; gap: .15rem; line-height: 1.2; }
.jogo__hud-item b {
    font-family: var(--display);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.jogo__combo {
    font-family: var(--display);
    font-weight: 900;
    color: var(--accent);
    display: inline-block;
    transition: transform .18s cubic-bezier(.34, 1.8, .64, 1);
}
.jogo__combo[data-pop="1"] { transform: scale(1.45); }

.jogo__barra {
    position: absolute;
    left: .4rem; right: .4rem; bottom: .4rem;
    height: 4px;
    background: var(--newsprint-edge);
    border-top: var(--rule-hair);
    z-index: 2;
    pointer-events: none;
}
.jogo__barra-fill { height: 100%; background: var(--ink); width: 0; transition: width .25s linear; }

/* ---- Overlays ---- */

.jogo__overlay {
    position: absolute;
    inset: .4rem;
    display: grid;
    place-items: center;
    padding: clamp(.75rem, 3vw, 2rem);
    background: rgba(247, 244, 236, .93);
    z-index: 3;
    overflow-y: auto;
}
.jogo__overlay[hidden], .jogo__overlay:empty { display: none; }

.jogo__tela { width: 100%; max-width: 34rem; text-align: center; }

.jogo__titulo {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.5rem, 6vw, 2.75rem);
    line-height: 1.02;
    margin: 0 0 .4rem;
    text-wrap: balance;
}
.jogo__sub {
    font-style: italic;
    font-size: clamp(.85rem, 2.6vw, 1rem);
    color: var(--ink-soft);
    margin: 0 0 1.1rem;
}

.jogo__painel { text-align: left; margin: 0 auto 1.1rem; max-width: 22rem; }

.jogo__linha {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .3rem 0;
    border-bottom: var(--rule-hair);
    font-family: var(--label);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.jogo__valor { font-variant-numeric: tabular-nums; color: var(--ink); }

.jogo__total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    padding-top: .6rem;
    margin-top: .3rem;
    border-top: var(--rule-thick);
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.3rem, 5vw, 1.9rem);
    font-variant-numeric: tabular-nums;
}

/* ---- Leaderboard ---- */

.jogo__tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: .75rem; }
.jogo__tab {
    font-family: var(--label);
    font-size: .66rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: .35rem .8rem;
    border: var(--rule-hair);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}
.jogo__tab--ativa { background: var(--ink); color: var(--newsprint); border-color: var(--ink); }

/* list-style reset so the board works as either div[role=list] or a real <ol>
   without native markers printing the rank a second time. */
.jogo__placar {
    max-width: 24rem;
    margin: 0 auto 1rem;
    text-align: left;
    list-style: none;
    padding-left: 0;
}

.jogo__placar-linha {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: .6rem;
    align-items: baseline;
    padding: .34rem 0;
    border-bottom: var(--rule-hair);
    font-size: .88rem;
}
.jogo__placar-linha span:first-child {
    font-family: var(--label);
    font-size: .7rem;
    color: var(--ink-faint);
}
.jogo__placar-linha span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.jogo__placar-linha b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.jogo__placar-eu {
    background: rgba(138, 64, 52, .09);
    box-shadow: inset 3px 0 0 var(--accent);
    padding-inline: .45rem;
    margin-inline: -.45rem;
}
.jogo__placar-eu b { font-weight: 700; }

.jogo__chase {
    font-style: italic;
    color: var(--ink-soft);
    font-size: .92rem;
    margin: 0 0 1.1rem;
    text-wrap: pretty;
}
.jogo__chase strong { font-style: normal; color: var(--accent); }

/* ---- Transient in-game text ---- */

.jogo__interst, .jogo__chaos {
    position: absolute;
    left: 0; right: 0;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.jogo__interst { top: 34%; }
.jogo__interst strong {
    display: block;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(1.4rem, 6vw, 2.6rem);
    letter-spacing: -0.01em;
}
.jogo__interst em {
    font-size: clamp(.8rem, 2.6vw, 1rem);
    color: var(--ink-soft);
}

.jogo__chaos {
    top: 16%;
    font-family: var(--label);
    font-size: clamp(.72rem, 3vw, 1rem);
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}

.jogo__interst, .jogo__chaos { animation: jogo-fade .4s ease both; }
@keyframes jogo-fade { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .jogo__interst, .jogo__chaos, .jogo__combo { animation: none; transition: none; }
}

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

.colophon {
    border-top: var(--rule-thick);
    margin-top: clamp(2.5rem, 7vw, 4.5rem);
    padding-block: 2rem 3rem;
    text-align: center;
    font-family: var(--label);
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    line-height: 2;
}

/* ---------- Utilities --------------------------------------------------- */

.center { text-align: center; }
.stack > * + * { margin-top: 1.1rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.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;
}

/* Blazor's built-in error UI, restyled so it isn't a blue Bootstrap bar */
#blazor-error-ui {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: none;
    background: var(--ink);
    color: var(--newsprint);
    padding: .9rem 1.2rem;
    font-family: var(--label);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; padding-left: 1rem; }

.validation-message {
    display: block;
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--accent);
    margin-top: .35rem;
}

/* ---------- Convite: the invitation card -------------------------------- */

.convite {
    position: relative;
    max-width: 46rem;
    margin-inline: auto;
    padding: clamp(2.5rem, 8vw, 5rem) clamp(1.4rem, 6vw, 4rem);
    background: var(--newsprint-deep);
    border: var(--rule-thin);
    text-align: center;
}

/* An engraved card carries two frames: the rule, and a hairline set inside it. */
.convite::before {
    content: "";
    position: absolute;
    inset: .5rem;
    border: var(--rule-hair);
    pointer-events: none;
}

.convite__pais {
    font-family: var(--display);
    font-size: clamp(1rem, 2.6vw, 1.2rem);
    line-height: 1.5;
    margin: 0 0 1.1rem;
}
.convite__pais span { display: block; }

.convite__intro,
.convite__hora {
    font-family: var(--label);
    font-size: clamp(.7rem, 1.8vw, .8rem);
    letter-spacing: .24em;
    text-transform: uppercase;
    line-height: 2.1;
    color: var(--ink-soft);
    margin: 0;
}

/* Engraved type is light and open — the weight the masthead uses would shout here. */
.convite__nomes {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.7rem, 11vw, 5rem);
    line-height: 1.02;
    letter-spacing: .005em;
    margin: clamp(1rem, 3vw, 1.6rem) 0 0;
}
.convite__nomes .amp {
    display: block;
    font-style: italic;
    font-size: .42em;
    color: var(--ink-faint);
    margin-block: .12em;
}

.convite__ornamento {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 17rem;
    margin: clamp(1.4rem, 4vw, 2.2rem) auto;
}
.convite__ornamento::before,
.convite__ornamento::after {
    content: "";
    flex: 1;
    border-top: var(--rule-hair);
}
.convite__ornamento span {
    font-size: .5rem;
    line-height: 1;
    color: var(--ink-ghost);
}

.convite__data {
    display: inline-flex;
    align-items: center;
    border-block: var(--rule-thin);
    padding-block: .85rem;
    margin: 0;
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.convite__data-lado {
    padding-inline: clamp(.9rem, 3vw, 1.6rem);
    line-height: 1.6;
}
.convite__dia {
    font-family: var(--display);
    font-size: clamp(2.6rem, 9vw, 3.6rem);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
    color: var(--ink);
    padding-inline: clamp(.9rem, 3vw, 1.6rem);
    border-inline: var(--rule-hair);
    font-variant-numeric: lining-nums;
}

.convite__hora { margin-top: 1.1rem; }

.convite__local {
    font-family: var(--display);
    font-size: clamp(1.6rem, 5vw, 2.3rem);
    line-height: 1.2;
    margin: clamp(1.4rem, 4vw, 2.1rem) 0 .35rem;
}
.convite__cidade {
    font-family: var(--label);
    font-size: .72rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0;
}

.convite__notas {
    display: grid;
    gap: 1.1rem;
    margin: 0;
    padding-top: clamp(1.1rem, 3vw, 1.6rem);
    border-top: var(--rule-hair);
}
@media (min-width: 40rem) {
    .convite__notas { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
}
.convite__notas dt {
    font-family: var(--label);
    font-size: .62rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: .3rem;
}
.convite__notas dd {
    margin: 0;
    font-size: .92rem;
    line-height: 1.5;
}

/* ---------- Palco: the card, full screen, on the photograph ------------- */

.palco {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    /* svh, not vh: on phones the address bar must not push the card off-screen. */
    min-height: calc(100svh - var(--rag-h, 3.2rem));
    padding: clamp(.8rem, 2vh, 2rem) var(--gutter)
             calc(clamp(.7rem, 1.8vh, 1.4rem) + env(safe-area-inset-bottom));
    overflow: hidden;
    isolation: isolate;
}

.palco__fundo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
}

.palco__fundo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 38%;
    animation: palco-entra 1.6s cubic-bezier(.2, .7, .3, 1) both,
               palco-respira 30s ease-in-out 1.6s infinite alternate;
}

/* Ink over the photograph: the card has to read as paper laid on top of it,
   which only happens if the ground behind it is darker than the paper. */
.palco__fundo::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% 45%, rgba(28, 26, 21, .38), rgba(28, 26, 21, .78)),
        linear-gradient(rgba(28, 26, 21, .3), rgba(28, 26, 21, .5));
}

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

.convite--capa {
    align-self: center;
    width: 100%;
    max-width: 33rem;
    padding: clamp(1.3rem, 3vh, 2.6rem) clamp(1.2rem, 5vw, 2.75rem);
    box-shadow: 0 34px 70px -30px rgba(12, 10, 6, .85),
                0 4px 18px -8px rgba(12, 10, 6, .45);
    /* The whole card arrives first; its contents then settle onto it. */
    animation: cartao-entra 1.15s cubic-bezier(.2, .75, .3, 1) both;
}

/* Every line rides the same rise; --d is its place in the queue. */
.convite--capa > *,
.convite--capa .convite__letra {
    animation: cartao-linha .8s cubic-bezier(.2, .7, .3, 1) both;
    animation-delay: calc(.45s + var(--d, 0) * 45ms);
}

/* ---- Monogram, stamped ---- */

.convite__selo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(2.6rem, min(8vw, 6vh), 3.4rem);
    aspect-ratio: 1;
    line-height: 1;
    margin: 0 auto clamp(.8rem, 2.2vh, 1.5rem);
    border: var(--rule-hair);
    border-radius: 50%;
    font-family: var(--display);
    font-size: clamp(.95rem, 3vw, 1.15rem);
    letter-spacing: .02em;
    color: var(--ink-soft);
    /* Overrides the shared rise: a seal is pressed down, not floated up. */
    animation: selo-carimbo .75s cubic-bezier(.3, 1.5, .5, 1) both !important;
    animation-delay: .3s !important;
}
.convite__selo .amp {
    font-style: italic;
    color: var(--accent);
    padding-inline: .06em;
}

.convite--capa .convite__intro {
    font-size: clamp(.64rem, 1.9vw, .78rem);
    letter-spacing: .16em;
    line-height: 1.95;
}

.convite--capa .convite__data { padding-block: clamp(.5rem, 1.2vh, .8rem); }
.convite--capa .convite__hora { margin-top: clamp(.7rem, 1.8vh, 1.1rem); }
.convite--capa .convite__ornamento { margin-block: clamp(.7rem, 1.8vh, 2rem); }
.convite--capa .convite__local {
    font-size: clamp(1.45rem, min(4.6vw, 3.4vh), 2.1rem);
    margin-top: clamp(.9rem, 2.4vh, 1.8rem);
}

/* FocusOnNavigate moves focus to the page's h1. A heading is not interactive,
   so the ring only reads as a stray box drawn around the couple's names. */
.convite__nomes:focus-visible { outline: none; }

/* ---- Names, letter by letter ---- */

.convite--capa .convite__nomes {
    font-size: clamp(2.3rem, min(12vw, 9vh), 4.4rem);
    animation: none;
}
.convite__palavra { display: block; }
.convite__letra {
    display: inline-block;
    animation-name: cartao-letra;
    animation-duration: .9s;
}
.convite--capa .convite__nomes .amp {
    animation: cartao-amp .9s cubic-bezier(.34, 1.45, .5, 1) both;
    animation-delay: calc(.45s + var(--d, 0) * 45ms);
}

/* ---- Foot of the card: the R.S.V.P. line and the one button ---- */

.convite__pe {
    margin-top: clamp(.9rem, 2.4vh, 1.8rem);
    padding-top: clamp(.8rem, 2vh, 1.4rem);
    border-top: var(--rule-hair);
}
.convite__rsvp {
    font-family: var(--label);
    font-size: clamp(.58rem, 1.9vw, .66rem);
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 clamp(.8rem, 2.5vw, 1.1rem);
    line-height: 1.9;
}
.convite__rsvp .dot { color: var(--ink-ghost); }
.convite__pe .btn { width: 100%; max-width: 20rem; }

/* ---- Scroll cue ---- */

.palco__rolar {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: clamp(.6rem, 1.6vh, 1.2rem);
    padding: .5rem;
    font-family: var(--label);
    font-size: .6rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--newsprint);
    text-decoration: none;
    text-shadow: 0 1px 8px rgba(12, 10, 6, .6);
    animation: cartao-linha .8s ease both 1.7s;
}
.palco__rolar:hover { color: var(--newsprint); opacity: .75; }

.palco__seta {
    width: .5rem;
    height: .5rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    animation: palco-seta 1.9s ease-in-out infinite;
}

/* Short screens — landscape phones, small laptops — get a denser card rather
   than a card that scrolls before its own R.S.V.P. line. */
@media (max-height: 46rem) {
    .convite--capa { padding-block: 1.2rem; max-width: 30rem; }
    .convite__selo { display: none; }
    .convite--capa .convite__nomes { font-size: clamp(2.1rem, 9vw, 3rem); }
    .convite--capa .convite__ornamento { margin-block: .7rem; }
    .convite--capa .convite__local { font-size: 1.4rem; margin-top: .9rem; }
}

/* ---- Keyframes ---- */

@keyframes cartao-entra {
    from { opacity: 0; transform: translateY(2.2rem) scale(.965); }
    to   { opacity: 1; transform: none; }
}

@keyframes cartao-linha {
    from { opacity: 0; transform: translateY(.9rem); }
    to   { opacity: 1; transform: none; }
}

@keyframes cartao-letra {
    from { opacity: 0; transform: translateY(.45em) rotate(3deg); filter: blur(5px); }
    to   { opacity: 1; transform: none; filter: none; }
}

@keyframes cartao-amp {
    from { opacity: 0; transform: scale(.4) rotate(-14deg); }
    to   { opacity: 1; transform: none; }
}

@keyframes selo-carimbo {
    from { opacity: 0; transform: scale(1.9); }
    60%  { opacity: 1; }
    to   { opacity: 1; transform: none; }
}

@keyframes palco-entra {
    from { opacity: 0; transform: scale(1.12); }
    to   { opacity: 1; transform: scale(1.06); }
}

/* Barely a zoom — enough that the photograph is alive, not enough to notice. */
@keyframes palco-respira {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}

@keyframes palco-seta {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50%      { transform: rotate(45deg) translate(.18rem, .18rem); }
}

/* ---- Reveal on scroll ----
   Armed by site.js, never by the stylesheet: if the script fails to run, the
   details must still be on the page rather than invisible forever. */

[data-revelar].revelar {
    opacity: 0;
    transform: translateY(1.6rem);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .3, 1);
}
[data-revelar].revelar--visivel {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    [data-revelar].revelar { opacity: 1; transform: none; }
}

/* ---------- Print: it should actually print like a newspaper ------------ */

@media print {
    body { background: #fff; font-size: 10pt; }
    .rag, .btn, .btn-row, .coupon form { display: none !important; }
    .section { break-inside: auto; }
    a { text-decoration: none; }

    /* A heading that still holds focus would otherwise print its outline. */
    :focus-visible { outline: none; }

    /* The invitation is the one page meant to leave the screen as paper. The
       photograph behind it is screen furniture; the card is the artefact. */
    .palco { min-height: 0; padding: 0; }
    .palco__fundo, .palco__rolar, .convite__pe .btn { display: none !important; }
    .convite { background: #fff; max-width: none; break-inside: avoid; box-shadow: none; }

    /* Paper has no entrance to make, and a print job that catches the card
       mid-fade would come out of the tray half-inked. */
    .convite--capa, .convite--capa > *, .convite__letra, .convite__selo,
    .convite--capa .convite__nomes .amp {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
    [data-revelar].revelar { opacity: 1 !important; transform: none !important; }
    .convite ~ .hint, .colophon { display: none !important; }
}
