@font-face {
    font-family: "Doto";
    src: url("/fonts/Doto-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Doto";
    src: url("/fonts/Doto-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Doto";
    src: url("/fonts/Doto-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "Source Sans 3";
    src: url("/fonts/SourceSans3-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Source Sans 3";
    src: url("/fonts/SourceSans3-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Source Sans 3";
    src: url("/fonts/SourceSans3-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-color: #0d0d0d;
    --accent-color: #d3af37;
    --accent-dark: #8b6914;
    --text-color: #404040;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --success-color: #27ae60;
    --danger-color: #c0392b;
    --muted-color: #666666;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 30px 80px rgba(32, 24, 18, 0.14);
    --shadow-md: 0 18px 40px rgba(32, 24, 18, 0.03);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Source Sans 3", sans-serif;
    line-height: 1.65;
    color: var(--text-color);
    background:
        radial-gradient(circle at top left, rgba(193, 144, 87, 0.24), transparent 34%),
        radial-gradient(circle at top right, rgba(124, 79, 47, 0.16), transparent 28%),
        linear-gradient(180deg, #faf6ef 0%, var(--bg-color) 100%);
}

body.form-page,
body.admin-page {
    background:
        radial-gradient(circle at top left, rgba(193, 144, 87, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(124, 79, 47, 0.12), transparent 28%),
        linear-gradient(180deg, #f7f2ea 0%, #ece2d6 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

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

.page-wrapper {
    min-height: 100vh;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 8vw, 5rem);
    box-shadow: var(--shadow-lg);
}

.page-header::before,
.page-header::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.page-header::before {
    width: 20rem;
    height: 20rem;
    top: -8rem;
    right: -6rem;
}

.page-header::after {
    width: 14rem;
    height: 14rem;
    bottom: -6rem;
    left: -5rem;
}

.page-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.page-header--compact {
    padding-bottom: clamp(2rem, 5vw, 3rem);
}

.page-header--admin {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.header-row--single {
    justify-content: flex-start;
}

.language-switcher {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    align-self: flex-end;
}

.language-switcher--light {
    background: rgba(255, 255, 255, 0.18);
}

.lang-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    padding: 0.55rem 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.lang-btn:hover {
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: "Doto", sans-serif;
    line-height: 1.05;
    letter-spacing: 0.01em;
}

.page-header h1 {
    font-size: clamp(3rem, 8vw, 5.25rem);
}

.subtitle {
    margin: 1rem 0 0;
    max-width: 42rem;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255, 255, 255, 0.88);
}

.section {
    padding: clamp(2rem, 6vw, 4.5rem) 0;
}

.section h2 {
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section p,
.section li {
    font-size: 1.02rem;
}

.couple-photo {
    display: flex;
    justify-content: center;
    align-self: center;
    margin: 1.5rem 0 0;
}

.couple-photo img {
    width: clamp(200px, 42vw, 320px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
}

.intro,
.quote,
.cta-section {
    text-align: center;
}

.intro p,
.quote p,
.cta-card p {
    max-width: 44rem;
    margin: 0 auto;
    color: var(--muted-color);
}

.event-details {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.event-details h2 {
    color: var(--accent-color);
}

.event {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(29, 35, 43, 0.05);
    text-align: center;
}

.event h3 {
    margin-bottom: 0.75rem;
    color: var(--accent-color);
    font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.event p {
    margin: 0.3rem 0;
    color: var(--text-color);
}

.event .note {
    margin-top: 0.5rem;
    color: var(--muted-color);
    font-style: italic;
}

.timeline {
    position: relative;
    margin-top: 2rem;
    padding: 1rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(211, 175, 55, 0.2), rgba(211, 175, 55, 0.9), rgba(211, 175, 55, 0.2));
    border-radius: 999px;
}

.timeline-item {
    position: relative;
    display: flex;
    width: 100%;
    margin: 0 0 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 1.7rem;
    left: 50%;
    width: 1rem;
    height: 1rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 6px rgba(211, 175, 55, 0.1);
    z-index: 2;
}

.timeline-item--left {
    justify-content: flex-start;
    text-align: end;
}

.timeline-item--right {
    justify-content: flex-end;
    text-align: start;
}

.timeline-card {
    width: calc(50% - 2rem);
    padding: 1.0rem 1.0rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(29, 35, 43, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(29, 35, 43, 0.05);
}

.timeline-time {
    margin: 0 0 0.45rem;
    font-family: "Doto", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
}

.timeline-card h3 {
    margin-bottom: 0.35rem;
    color: var(--primary-color);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.timeline-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.timeline-inline-icon {
    display: inline-flex;
    width: 3.2rem;
    height: 3.2rem;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;
}

.timeline-card p:last-child {
    margin-bottom: 0;
}

.photo-placeholder {
    margin-top: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    border: 1px dashed rgba(124, 79, 47, 0.28);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.65));
}

.placeholder-content {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
}

.placeholder-icon {
    font-size: 2rem;
}

.photo-placeholder p {
    color: var(--text-color);
    font-weight: 700;
}

.photo-placeholder small {
    max-width: 32rem;
    color: var(--muted-color);
}

.card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.56);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.cta-card {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.cta-card h2 {
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 1.5rem;
}

.form-page-main,
.form-shell,
.admin-main {
    padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 8vw, 5rem);
}

.form-shell {
    padding-top: 0;
}

.form-card,
.admin-card {
    padding: clamp(1rem, 3vw, 2rem);
}

.password-container {
    width: min(34rem, 100%);
    margin: clamp(2rem, 8vw, 4rem) auto;
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
}

.password-container h2 {
    margin-bottom: 0.75rem;
    font-size: 2.4rem;
    color: var(--primary-color);
}

.password-container p {
    color: var(--muted-color);
    margin-bottom: 1.25rem;
}

.password-input-group {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.password-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.password-input-group input {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(29, 35, 43, 0.16);
    background: rgba(255, 255, 255, 0.96);
}

.password-input-group input:focus {
    outline: none;
    border-color: rgba(124, 79, 47, 0.4);
    box-shadow: 0 0 0 4px rgba(193, 144, 87, 0.16);
}

.hint {
    font-size: 0.9rem;
    color: var(--muted-color);
}

.password-submit,
.rsvp-btn,
.secondary-btn,
.danger-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.password-submit,
.rsvp-btn {
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #a86f3f);
    color: var(--white);
    box-shadow: 0 16px 30px rgba(124, 79, 47, 0.1);
}

.password-submit {
    width: 100%;
}

.rsvp-btn {
    min-width: min(16rem, 100%);
    margin: 30px auto;
}

.secondary-btn {
    padding: 0.8rem 1.1rem;
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-color);
    border-color: rgba(124, 79, 47, 0.18);
}

.danger-btn {
    padding: 0.75rem 1rem;
    background: rgba(194, 65, 65, 0.1);
    color: var(--danger-color);
    border-color: rgba(194, 65, 65, 0.16);
}

.password-submit:hover,
.rsvp-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.remove-btn:hover,
.back-link:hover {
    transform: translateY(-1px);
}

.password-error,
.error-message {
    color: var(--danger-color);
    font-weight: 700;
}

.password-error {
    margin-top: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: var(--accent-color);
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.back-link--light {
    color: var(--white);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.field-group--wide {
    grid-column: 1 / -1;
}

.field-group--choice {
    margin-bottom: 1.2rem;
}

.field-label {
    font-weight: 800;
    color: var(--text-color);
    font-size: 0.95rem;
}

.field-label--checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
}

.field-label--checkbox input,
.choice-card input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary-color);
}

.field-input,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(29, 35, 43, 0.16);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field-input::placeholder,
textarea::placeholder {
    color: rgba(29, 35, 43, 0.7);
    opacity: 1;
}

.field-input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(124, 79, 47, 0.4);
    box-shadow: 0 0 0 4px rgba(193, 144, 87, 0.1);
    background: var(--white);
}

.input-error {
    border-color: rgba(194, 65, 65, 0.66) !important;
    box-shadow: 0 0 0 4px rgba(194, 65, 65, 0.1);
}

.error-message {
    margin: 0.2rem 0 0;
    font-size: 0.92rem;
}

.form-grid,
.choice-grid {
    display: grid;
    gap: 1rem;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.choice-card:hover {
    border-color: rgba(124, 79, 47, 0.26);
    box-shadow: 0 10px 24px rgba(29, 35, 43, 0.05);
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    align-items: end;
    margin-bottom: 1rem;
}

.section-hint,
.empty-state,
.table-secondary,
footer .container,
.thank-you p {
    color: var(--muted-color);
}

.section-hint {
    margin: 0 0 1rem;
}

.guest-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(124, 79, 47, 0.12);
}

.guest-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.guest-list {
    display: grid;
    gap: 1rem;
}

.guest-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(29, 35, 43, 0.1);
    box-shadow: 0 12px 28px rgba(29, 35, 43, 0.05);
}

.guest-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.guest-card__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.guest-card__header h3 {
    font-size: 1.6rem;
    color: var(--text-color);
}

.remove-btn {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    border: 1px solid rgba(194, 65, 65, 0.2);
    background: rgba(194, 65, 65, 0.08);
    color: var(--danger-color);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.empty-state {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.accommodation-fields[hidden] {
    display: none;
}

.submit-row {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.admin-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid rgba(29, 35, 43, 0.08);
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: rgba(247, 241, 234, 0.98);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-color);
    z-index: 1;
}

.admin-table tbody tr:hover {
    background: rgba(193, 144, 87, 0.04);
}

.table-primary {
    font-weight: 800;
    color: var(--text-color);
    word-break: break-word;
}

.table-secondary {
    margin-top: 0.25rem;
    font-size: 0.92rem;
    word-break: break-word;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(29, 35, 43, 0.08);
    color: var(--text-color);
}

.status-pill--success {
    background: rgba(16, 124, 86, 0.12);
    color: var(--success-color);
}

.status-pill--muted {
    color: var(--muted-color);
}

.inline-form {
    display: inline-flex;
}

.thank-you {
    width: min(42rem, calc(100% - 2rem));
    margin: clamp(3rem, 10vw, 6rem) auto 2rem;
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.success-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(16, 124, 86, 0.12);
    color: var(--success-color);
    font-size: 2rem;
    font-weight: 900;
}

.success-message {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
}

footer {
    padding: 1rem 0 2.5rem;
    text-align: center;
}

@media (max-width: 900px) {
    .form-grid,
    .choice-grid,
    .section-heading {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: clamp(2.6rem, 10vw, 4rem);
        align-self: center;
    }

    .header-row {
        align-items: flex-start;
    }

    .page-header .container {
        gap: 0.75rem;
    }

    .timeline::before {
        left: 1rem;
        transform: none;
    }

    .timeline-item,
    .timeline-item--left,
    .timeline-item--right {
        justify-content: flex-start;
    }

    .timeline-item::before {
        left: 1rem;
        transform: translate(-50%, -50%);
    }

    .timeline-card {
        width: calc(100% - 2.75rem);
        margin-left: 2.75rem;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, 1120px);
    }

    .language-switcher {
        width: 100%;
        justify-content: space-between;
        align-self: flex-end;
        padding: 0.25rem;
    }

    .page-header .container {
        gap: 1rem;
    }

    .page-header h1 {
        margin-top: 0.3rem;
        line-height: 0.92;
        font-size: clamp(2.6rem, 15vw, 3.3rem);
    }

    .lang-btn {
        flex: 1 1 0;
        text-align: center;
    }

    .choice-card,
    .guest-card,
    .field-label--checkbox,
    .event,
    .cta-card,
    .admin-card,
    .thank-you,
    .password-container {
        border-radius: 18px;
    }

    .rsvp-btn,
    .secondary-btn,
    .danger-btn,
    .password-submit {
        width: 100%;
    }

    .guest-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .guest-card__header {
        flex-direction: column;
    }
}
