:root {
    --cream: #f8f4ec;
    --ink: #2f3a33;
    --sage: #8a9a7b;
    --sage-dark: #5f6f52;
    --line: #e2dccf;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Lato", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    margin: 0;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
}

.site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.site-nav a {
    color: var(--sage-dark);
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    border-bottom: 1px solid var(--sage);
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: clamp(2.75rem, 8vw, 5rem);
    margin: 0 0 0.5rem 0;
}

.hero-date {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.hero-place {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin: 0 0 2rem 0;
}

.button {
    display: inline-block;
    border: 1px solid var(--sage-dark);
    color: var(--sage-dark);
    padding: 0.6rem 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.button:hover,
.button:focus-visible {
    background-color: var(--sage-dark);
    color: var(--cream);
}

.photo-strip {
    min-height: 200px;
    margin: 2rem 0;
}

.story {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 0;
}

.site-footer {
    text-align: center;
    color: var(--sage-dark);
    border-top: 1px solid var(--line);
    padding: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 374px) {
    .site-nav {
        gap: 1rem;
        padding: 1rem;
    }
}

/* Login page styles */
.login {
    max-width: 420px;
    margin: 0 auto;
    padding: 5rem 1.25rem;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.login-form label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sage-dark);
    font-size: 0.9rem;
    text-align: left;
}

.login-form input[type="password"] {
    padding: 0.7rem;
    border: 1px solid var(--line);
    background: white;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
}

.login-form input[type="password"]:focus {
    border-color: var(--sage-dark);
    outline: 2px solid var(--sage);
    outline-offset: 1px;
}

.login-error {
    color: #9b3d3d;
}

[hidden] {
    display: none !important;
}

/* Page styles */
.page {
    padding-bottom: 4rem;
}

.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.page-lede {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--sage-dark);
}

.timeline {
    list-style: none;
    padding: 0;
    max-width: 640px;
    margin: 0 auto;
}

.event {
    text-align: center;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
}

.event:last-child {
    border-bottom: none;
}

.event-time {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sage-dark);
    font-size: 0.9rem;
    margin: 0;
}

.event-name {
    font-size: 1.75rem;
    margin: 0.25rem 0;
}

.event-detail {
    margin: 0;
}

.note {
    max-width: 640px;
    margin: 2.5rem auto 0;
    text-align: center;
}

.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: white;
    border: 1px solid var(--line);
    padding: 1.75rem;
}

.card h2 {
    margin-top: 0;
}

/* Ensure no horizontal scrolling at 375px */
@media (max-width: 375px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* FAQ styles */
.faq {
    max-width: 680px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.faq-item summary {
    cursor: pointer;
    font-family: var(--serif);
    font-size: 1.35rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    color: var(--sage-dark);
}

.faq-item[open] summary::after {
    content: "\2013";
}

.faq-item p {
    margin: 0.75rem 0 0;
}

/* Registry card styles */
.registry-card {
    text-align: center;
}

.button[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* RSVP form styles */
.rsvp-form {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.rsvp-form label,
.rsvp-form legend {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sage-dark);
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem;
    border: 1px solid var(--line);
    background: white;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
}

.rsvp-form input[type="text"]:focus,
.rsvp-form input[type="email"]:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    border-color: var(--sage-dark);
    outline: 2px solid var(--sage);
    outline-offset: 1px;
}

.rsvp-form [aria-invalid="true"] {
    border-color: #9b3d3d;
}

.choice {
    border: 0;
    padding: 0;
    margin: 0;
}

.choice label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 1.5rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
    color: var(--ink);
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    max-width: 520px;
    margin: 0 auto 1rem;
    color: #9b3d3d;
    text-align: center;
}

/* No horizontal scrolling at 375px */
@media (max-width: 375px) {
    .rsvp-form {
        gap: 1rem;
    }
}

/* Polish: <button class="button"> should look like the link buttons */
button.button {
    background: transparent;
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

/* Polish: keep each label close to its own field in the RSVP form */
.rsvp-form label + input,
.rsvp-form label + select,
.rsvp-form label + textarea {
    margin-top: -0.75rem;
}

.rsvp-form button.button {
    margin-top: 0.75rem;
}

.rsvp-form [aria-invalid="true"] {
    border-color: #9b3d3d;
    box-shadow: 0 0 0 1px #9b3d3d;
}

/* Planning page styles */
.planning-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.planning-card .button {
    margin-top: auto;
}

/* Photo strip marquee styles */
.photo-strip {
    overflow: hidden;
    margin: 1rem 0 2.5rem;
    min-height: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: 0;
}

.photo-track {
    display: flex;
    width: max-content;
    animation: photo-scroll 72s linear infinite;
}

.photo-set {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.375rem;
    margin: 0;
    list-style: none;
}

.photo-set li {
    flex: 0 0 auto;
    width: calc((100vw - 2.25rem) / 3);
}

.photo-set img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 2px;
}

@media (max-width: 900px) {
    .photo-set li {
        width: calc((100vw - 1.5rem) / 2);
    }
}

@media (max-width: 600px) {
    .photo-set li {
        width: calc(100vw - 0.75rem);
    }
}

@keyframes photo-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.photo-strip:hover .photo-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .photo-track {
        animation: none;
    }
    .photo-strip {
        overflow-x: auto;
    }
}

body {
    overflow-x: hidden;
}

.drive-embed {
    margin: 0 0 2.5rem;
}

.drive-embed h2 {
    margin-bottom: 1rem;
}

.drive-embed-frame {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.drive-embed-frame iframe {
    display: block;
    width: 100%;
    height: 480px;
    border: 0;
}

.drive-embed-help {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .drive-embed-frame iframe {
        height: 360px;
    }
}

/* Heart monogram */
.heart-names,
.hero h1.heart-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 15rem;
    max-width: 80vw;
    aspect-ratio: 100 / 90;
    margin: 0 auto 1rem;
    padding-top: 6%;
    box-sizing: border-box;
    background: url("/img/heart.svg") center / contain no-repeat;
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--ink);
}

.heart-names .amp {
    font-size: 0.7em;
    margin: 0.1em 0;
}

.heart-names--small {
    display: inline-flex;
    vertical-align: middle;
    width: 6.5rem;
    padding-top: 0;
    margin: 0 0.5rem 0 0;
    font-size: 1rem;
}

/* Planning folder browser */
.drive-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.drive-head h2 {
    margin: 0;
}

.drive-path {
    font-size: 0.9rem;
    color: var(--sage-dark);
    margin-bottom: 0.5rem;
}

.drive-sep {
    margin: 0 0.4rem;
}

.drive-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.drive-item,
.drive-empty {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--line);
}

.drive-name {
    flex: 1 1 14rem;
    color: var(--ink);
    word-break: break-word;
}

.drive-folder::before {
    content: "\1F4C1  ";
}

.drive-meta {
    font-size: 0.85rem;
    color: var(--sage-dark);
}

.drive-action {
    font-size: 0.85rem;
    color: var(--sage-dark);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
