:root {
    --paper: #faf7f2;
    --paper-deep: #f2ece2;
    --ink: #2f2a25;
    --ink-soft: #7b7168;
    --line: #e0d7c9;
    --accent: #8b9a7f;
    /* tmavší varianta pro text – světlá šalvěj má na papíru slabý kontrast */
    --accent-deep: #5d6b4f;

    --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --sans: "Jost", "Segoe UI", system-ui, sans-serif;

    --gutter: clamp(1.5rem, 5vw, 4rem);
    --photo-frame: clamp(1.25rem, 3vw, 2.75rem);
    --measure: 46rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

::selection {
    background: var(--accent);
    color: var(--paper);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* --- Hero ------------------------------------------------------------- */

.hero {
    display: grid;
    min-height: 100svh;
}

/* Fotka je samotné oznámení, takže se nikdy neořezává –
   vždy je vidět celá, jen orámovaná plochou papírové barvy. */
.hero__photo {
    display: grid;
    place-items: center;
    margin: 0;
    padding: var(--photo-frame);
    background: var(--paper-deep);
}

.hero__photo img {
    width: auto;
    /* height: auto je nutné – jinak se uplatní atribut height z <img>. */
    height: auto;
    max-width: 100%;
    max-height: calc(100svh - 2 * var(--photo-frame));
    object-fit: contain;
    box-shadow: 0 1.25rem 3.5rem rgba(47, 42, 37, 0.22);
}

.hero__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: clamp(3rem, 8vw, 6rem) var(--gutter);
    text-align: center;
}

/* Nese hlavní sdělení („Afterparty"), proto je to štítek, ne drobný popisek:
   musí být jasné, že nejde o pozvánku na svatbu samotnou. */
.eyebrow {
    display: inline-block;
    margin: 0 0 1.5rem;
    padding: 0.55em 1.2em;
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.15rem);
    font-weight: 500;
    letter-spacing: 0.3em;
    /* vyrovná mezeru, kterou letter-spacing přidá za poslední písmeno */
    text-indent: 0.3em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

/* Věta, která vysvětlí, proč to není svatba. */
.lead {
    max-width: 27rem;
    margin: 1.75rem auto 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.65;
}

.lead p {
    margin: 0;
}

.names {
    margin: 0;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.75rem, 1.5rem + 5vw, 5.25rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
}

.names__part {
    display: block;
}

.names__amp {
    display: block;
    margin: 0.15em 0;
    font-style: italic;
    font-size: 0.5em;
    color: var(--accent);
}

.date {
    margin: 1.8rem 0 0;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.place {
    margin: 0.5rem 0 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.25s ease;
}

.scroll-cue:hover {
    color: var(--ink);
}

.scroll-cue svg {
    width: 1.25rem;
    height: 1.25rem;
    animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(0.35rem); }
}

@media (min-width: 900px) {
    .hero {
        grid-template-columns: 52fr 48fr;
    }

    .hero__photo {
        height: 100svh;
        position: sticky;
        top: 0;
    }
}

@media (max-width: 899px) {
    .hero {
        min-height: 0;
    }

    .hero__photo img {
        max-height: 76svh;
    }
}

/* --- Sekce ------------------------------------------------------------ */

main {
    padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0;
}

.info,
.rsvp {
    max-width: var(--measure);
    margin: 0 auto;
}

.rsvp {
    margin-top: clamp(4rem, 10vw, 7rem);
    padding: clamp(2.25rem, 6vw, 3.5rem);
    border: 1px solid var(--line);
    background: var(--paper-deep);
    text-align: center;
}

.section-title {
    margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
    line-height: 1.2;
    text-align: center;
}

/* --- Rozbalovací informace -------------------------------------------- */

.accordion {
    border-top: 1px solid var(--line);
}

.accordion__item {
    border-bottom: 1px solid var(--line);
}

.accordion__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 0.25rem;
    cursor: pointer;
    font-family: var(--serif);
    font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem);
    list-style: none;
    transition: color 0.2s ease;
}

.accordion__head::-webkit-details-marker {
    display: none;
}

.accordion__head:hover {
    color: var(--accent);
}

.accordion__icon {
    position: relative;
    flex: 0 0 auto;
    width: 0.85rem;
    height: 0.85rem;
}

.accordion__icon::before,
.accordion__icon::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordion__icon::after {
    transform: rotate(90deg);
}

[open] > .accordion__head .accordion__icon::after {
    transform: rotate(0deg);
    opacity: 0;
}

.accordion__body {
    padding: 0 0.25rem 1.75rem;
    color: var(--ink-soft);
    animation: reveal 0.35s ease both;
}

.accordion__body :first-child { margin-top: 0; }
.accordion__body :last-child  { margin-bottom: 0; }

@keyframes reveal {
    from { opacity: 0; transform: translateY(-0.4rem); }
    to   { opacity: 1; transform: none; }
}

/* --- Přihlášení ------------------------------------------------------- */

.rsvp__text {
    max-width: 34rem;
    margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
    color: var(--ink-soft);
}

.rsvp__text :first-child { margin-top: 0; }
.rsvp__text :last-child  { margin-bottom: 0; }

.button {
    display: inline-block;
    padding: 1rem 2.25rem;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.button:hover {
    background: transparent;
    color: var(--ink);
}

.rsvp__fallback {
    margin: 1.75rem 0 0;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.copy {
    padding: 0;
    border: 0;
    border-bottom: 1px dashed var(--ink-soft);
    background: none;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.copy__hint {
    display: none;
}

.copy__status {
    display: block;
    min-height: 1.4em;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.rsvp__deadline {
    margin: 1.5rem 0 0;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* --- Patička ---------------------------------------------------------- */

.footer {
    margin-top: clamp(4rem, 10vw, 7rem);
    padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer__names {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.5rem;
}

.footer__date {
    margin: 0.35rem 0 0;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* --- Přístupnost ------------------------------------------------------ */

@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;
    }
}
