* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Rustic Roadway';
    src: url('fonts/rustic-roadway-personal-use/RusticRoadway.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* ============================================
   SHARED STYLES
   ============================================ */

.landing {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.landing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 40px 64px;
    width: 100%;
    max-width: 600px;
}

.names {
    font-size: 5em;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 14px;
    line-height: 1.2;
    font-family: 'Playfair Display', Georgia, serif;
    color: #fff;
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 0, 0, 0.3);
}

.date {
    font-size: 1.3em;
    letter-spacing: 4px;
    margin-bottom: 6px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.location {
    font-size: 0.9em;
    letter-spacing: 2px;
    margin-bottom: 36px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

.cta-btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 1.05em;
    letter-spacing: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.95);
    color: #3a2e22;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.cta-btn:hover {
    background: #fff;
    color: #1a1410;
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.info-btn {
    display: block;
    margin-top: 16px;
    font-size: 0.82em;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.info-btn:hover {
    color: #fff;
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */

.landing-bg {
    background: url('Background_video.gif') center/cover scroll;
    background-color: #8b7355;
}

.landing-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(255,255,255,0.22), rgba(255,255,255,0.22)),
        linear-gradient(135deg, rgba(139, 115, 85, 0.25) 0%, rgba(168, 153, 104, 0.15) 50%, rgba(122, 99, 68, 0.25) 100%);
    pointer-events: none;
}

.landing-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0, 0, 0, 0.65) 100%
    );
    pointer-events: none;
}


/* ============================================
   RSVP PAGE STYLES
   ============================================ */

.rsvp-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.rsvp-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Background_video.gif') center/cover scroll;
    background-color: #8b7355;
    z-index: -2;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.rsvp-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(255,255,255,0.22), rgba(255,255,255,0.22)),
        linear-gradient(135deg, rgba(139, 115, 85, 0.25) 0%, rgba(168, 153, 104, 0.15) 50%, rgba(122, 99, 68, 0.25) 100%);
    pointer-events: none;
    z-index: -2;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.rsvp-bg::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
    z-index: -2;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.back-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95em;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #fff;
}

/* ============================================
   CONFIRMATION PAGE STYLES
   ============================================ */

.confirmation-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.confirmation-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Background_video.gif') center/cover scroll;
    background-color: #8b7355;
    z-index: -2;
}

.confirmation-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(255,255,255,0.22), rgba(255,255,255,0.22)),
        linear-gradient(135deg, rgba(139, 115, 85, 0.25) 0%, rgba(168, 153, 104, 0.15) 50%, rgba(122, 99, 68, 0.25) 100%);
    pointer-events: none;
    z-index: -2;
}

.confirmation-bg::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
    z-index: -2;
}

.confirmation-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    padding: 60px 40px 40px;
    margin: 0 20px;
}

.confirmation-header {
    text-align: left;
    margin-bottom: 24px;
}

.confirmation-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3em;
    letter-spacing: 5px;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.confirmation-subtitle {
    font-size: 1em;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}


.info-link {
    color: #a89968;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid #a89968;
}

.info-link:hover {
    color: #c9a961;
    border-bottom-color: #c9a961;
}

/* Resubmission notice */
.confirmation-resubmit {
    background: rgba(255, 255, 255, 0.93);
    margin-bottom: 4px;
    padding: 20px 30px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    border-left: 3px solid #8b7355;
}

.confirmation-resubmit ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.confirmation-resubmit li {
    margin: 3px 0;
    color: #444;
}

/* Confirmation Footer */
.confirmation-footer {
    background: rgba(255, 255, 255, 0.93);
    text-align: center;
    padding: 32px 30px;
}

.confirmation-footer p {
    font-size: 14px;
    color: #444;
    margin: 10px 0;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.confirmation-footer p:first-child {
    font-size: 15px;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px;
}

.confirmation-footer .back-link {
    color: rgba(90, 74, 58, 0.7);
    text-shadow: none;
}

.confirmation-footer .back-link:hover {
    color: #5a4a3a;
}

/* ============================================
   INFO PAGE STYLES
   ============================================ */

.info-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.info-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('Background_video.gif') center/cover scroll;
    background-color: #8b7355;
    z-index: -2;
}

.info-bg::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        linear-gradient(rgba(255,255,255,0.22), rgba(255,255,255,0.22)),
        linear-gradient(135deg, rgba(139, 115, 85, 0.25) 0%, rgba(168, 153, 104, 0.15) 50%, rgba(122, 99, 68, 0.25) 100%);
    pointer-events: none;
    z-index: -2;
}

.info-bg::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
    z-index: -2;
}

.info-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    padding: 60px 40px 40px;
    margin: 0 20px;
}

.info-header {
    margin-bottom: 48px;
}

.info-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3em;
    letter-spacing: 5px;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.info-subtitle {
    font-size: 1em;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sections */
.info-section {
    background: rgba(255, 255, 255, 0.93);
    margin-bottom: 4px;
    padding: 28px 30px;
}

.info-section--last {
    margin-bottom: 0;
}

.info-section-title {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #8b7355;
    font-weight: 700;
    margin-bottom: 20px;
}

.info-section-intro {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 18px;
}

.info-section p {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

/* Timeline */
.info-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f0ece6;
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-item:first-child {
    padding-top: 0;
}

.timeline-time {
    font-size: 13px;
    font-weight: 600;
    color: #8b7355;
    letter-spacing: 0.5px;
    min-width: 48px;
    flex-shrink: 0;
    padding-top: 1px;
}

.timeline-label {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 2px 0;
}

.timeline-detail {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.timeline-day {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #b5a48a;
    padding: 14px 0 6px;
    border-bottom: 1px solid #f0ece6;
}

.timeline-day:first-child {
    padding-top: 0;
}

/* Info blocks within a section */
.info-block {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f0ece6;
}


.info-block-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #333;
    margin: 0 0 6px 0;
}

.info-block p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.info-venue-name {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px 0;
}

.info-address {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px 0;
}

/* Lodging items */
/* Info list (bullet points within a section) */
.info-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 16px;
}

.info-list li {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    padding: 7px 0 7px 20px;
    position: relative;
    border-bottom: 1px solid #f0ece6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #8b7355;
    font-weight: 600;
}

.info-section-note {
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}


/* Links */
.info-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #8b7355;
    text-decoration: none;
    border-bottom: 1px solid #8b7355;
    margin-top: 10px;
    transition: color 0.2s, border-color 0.2s;
}

.info-link:hover {
    color: #6b5840;
    border-bottom-color: #6b5840;
}

.info-link--email {
    font-size: 14px;
    margin-top: 6px;
}

/* Footer */
.info-footer {
    text-align: center;
    padding: 24px 0 16px;
}

/* ============================================
   PANTONE CARD — RSVP
   ============================================ */

.rsvp-page {
    padding: 40px 20px;
    align-items: flex-start;
}

.pantone-card {
    width: 100%;
    background: #fff;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.4);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.pantone-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pantone-color-block {
    height: 220px;
    background: #a89968;
    width: 100%;
    flex-shrink: 0;
    position: relative;
}

/* Handwritten note display inside the color block (readonly mirror) */
.handwritten-note {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 24px;
    font-family: 'Rustic Roadway', cursive;
    font-size: 26px;
    line-height: 1.4;
    color: inherit;
    pointer-events: none;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
}

/* Pantone label (code + color name) */
.pantone-label {
    padding: 10px 20px 12px;
}

.pantone-code-text {
    display: block;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #111;
    font-weight: 700;
}

.pantone-name-text {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #888;
    margin-top: 2px;
    letter-spacing: 0.3px;
}


/* Form area */
.pantone-form-area {
    padding: 16px 20px 20px;
}


/* Guest rows */
.pantone-guest-rows {
    display: flex;
    flex-direction: column;
}

.pantone-guest-row {
    padding: 10px 0;
}

.pantone-guest-row-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pantone-guest-name {
    font-size: 16px;
    color: #222;
    font-weight: normal;
    flex: 1;
}

.pantone-guest-tag {
    font-size: 10px;
    color: #999;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Tick-style Oui / Non */
.pantone-attendance-ticks {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.tick-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.tick-option input[type="radio"] {
    display: none;
}

.tick-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #ccc;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    background: #fff;
}

.tick-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border-right: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: border-color 0.15s;
}

.tick-option input[type="radio"]:checked ~ .tick-box {
    border-color: #8b7355;
    background: #8b7355;
}

.tick-option input[type="radio"]:checked ~ .tick-box::after {
    border-color: #fff;
}

/* "Non" tick — greyed when checked */
.tick-option.tick-no input[type="radio"]:checked ~ .tick-box {
    border-color: #bbb;
    background: #bbb;
}

.tick-label {
    font-size: 13px;
    color: #555;
    transition: color 0.15s;
}

.tick-option input[type="radio"]:checked ~ .tick-label {
    color: #333;
}

/* Menu options — same tick style, indented */
.pantone-menu-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    padding-left: 0;
}

.pantone-menu-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    width: 100%;
    margin-bottom: -6px;
}

.menu-tick-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.menu-tick-option input[type="radio"] {
    display: none;
}

.menu-tick-option .tick-box {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.menu-tick-option .tick-box::after {
    width: 4px;
    height: 7px;
}

.menu-tick-option input[type="radio"]:checked ~ .tick-box {
    border-color: #a89968;
    background: #a89968;
}

.menu-tick-option input[type="radio"]:checked ~ .tick-box::after {
    border-color: #fff;
}

.menu-tick-option .tick-label {
    font-size: 13px;
}


/* Allergies / remarks toggle */
.pantone-allergy-group {
    padding: 12px 0 4px;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.allergy-tick-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.allergy-tick-option input[type="checkbox"] {
    display: none;
}

.allergy-tick-option input[type="checkbox"]:checked ~ .tick-box {
    border-color: #8b7355;
    background: #8b7355;
}

.allergy-tick-option input[type="checkbox"]:checked ~ .tick-box::after {
    border-color: #fff;
}

.allergy-tick-option input[type="checkbox"]:checked ~ .tick-label {
    color: #333;
}

.allergy-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 0;
}

.allergy-expand--open {
    max-height: 160px;
    opacity: 1;
}

.allergy-textarea {
    width: 100%;
    margin-top: 10px;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 5px 0;
    font-size: 14px;
    color: #333;
    background: transparent;
    outline: none;
    resize: none;
    min-height: 60px;
    box-sizing: border-box;
    line-height: 1.5;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: border-color 0.2s;
}

.allergy-textarea:focus {
    border-bottom-color: #8b7355;
}

.allergy-textarea::placeholder {
    color: #ccc;
    font-style: italic;
}

/* Note box — outside the card, between card and submit */
.pantone-note-wrapper {
    margin-top: 2px;
    padding: 14px 20px 16px;
    background: rgba(255, 255, 255, 0.08);
}

.pantone-note-label {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 10px;
}

.pantone-note-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 10px 10px;
    font-family: 'Rustic Roadway', cursive;
    font-size: 22px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    resize: none;
    outline: none;
    min-height: 64px;
    box-sizing: border-box;
    caret-color: rgba(255, 255, 255, 0.7);
}

.pantone-note-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

.pantone-note-input:focus {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

/* Error */
.pantone-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border-left: 3px solid #e74c3c;
    color: #c0392b;
    font-size: 13px;
    display: none;
}

/* Submit — outside the card */
.pantone-submit-btn {
    width: 100%;
    margin-top: 12px;
    padding: 18px;
    background: var(--pantone-color, #8b7355);
    color: #fff;
    border: none;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, filter 0.2s;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.pantone-submit-btn:hover {
    background: var(--pantone-color, #8b7355);
    filter: brightness(0.82);
}

/* Back link — outside the card */
.pantone-back {
    text-align: center;
    padding: 14px 0 8px;
}

.pantone-back a {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}

.pantone-back a:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* Invalid token */
.pantone-invalid {
    padding: 40px 0;
    text-align: center;
}

.pantone-invalid p {
    margin: 8px 0;
    font-size: 14px;
    color: #888;
}

.pantone-invalid a {
    color: #8b7355;
    text-decoration: none;
}

/* ============================================
   SEND ENVELOPE ANIMATION
   ============================================ */

.send-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 22, 12, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.send-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Stage — shared positioning context */
.send-stage {
    position: relative;
    width: 280px;
    height: 500px;
}

.send-stage.flying {
    transition: transform 1.1s cubic-bezier(0.3, 0, 0.5, 1),
                opacity 0.5s ease 0.55s;
    transform: translateY(-115vh) rotate(-6deg);
    opacity: 0;
}

/* ---- Pantone card ---- */
.send-card {
    position: absolute;
    width: 230px;
    height: 310px;
    left: 50%;
    margin-left: -115px;
    top: 20px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 14px 55px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.45s ease;
}

.send-card.shrink {
    transform: scale(0.75);
}

.send-card.insert {
    top: 185px;
    opacity: 0;
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.55s cubic-bezier(0.4, 0, 0.35, 1),
                opacity 0.4s ease 0.12s;
}

.send-card-color {
    height: 55%;
    background: var(--pantone-color, #a89968);
}

.send-card-lines {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.send-card-lines span {
    display: block;
    height: 2px;
    background: #e8e4de;
    border-radius: 1px;
}

.send-card-lines span:nth-child(2) { width: 70%; }
.send-card-lines span:nth-child(3) { width: 48%; }

/* ---- Envelope ---- */
.send-env {
    position: absolute;
    width: 265px;
    height: 165px;
    left: 50%;
    margin-left: -132px;
    top: 315px;
    transform: translateY(440px);
    transition: transform 0.75s cubic-bezier(0.22, 0, 0.12, 1);
}

.send-env.arrived {
    transform: translateY(0);
}

/* Envelope back */
.send-env-back {
    position: absolute;
    inset: 0;
    background: #faf8f4;
    border-radius: 1px;
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.45);
}

/* Fold lines */
.send-env-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom right,
            transparent calc(50% - 0.5px),
            #d8d3c8 calc(50% - 0.5px),
            #d8d3c8 calc(50% + 0.5px),
            transparent calc(50% + 0.5px)),
        linear-gradient(to bottom left,
            transparent calc(50% - 0.5px),
            #d8d3c8 calc(50% - 0.5px),
            #d8d3c8 calc(50% + 0.5px),
            transparent calc(50% + 0.5px));
}

/* Flap — triangle pointing down, initially folded back (open) */
.send-env-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 105px;
    background: #ede9e3;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transform: perspective(900px) rotateX(-170deg);
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-env.sealed .send-env-flap {
    transform: perspective(900px) rotateX(0deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


@media (max-width: 500px) {
    .rsvp-page {
        padding: 0;
    }

    .pantone-wrapper {
        max-width: 100%;
        margin: 20px 16px;
        width: calc(100% - 32px);
    }

    .pantone-card {
        box-shadow: none;
    }

    .pantone-color-block {
        height: 160px;
    }

    .pantone-submit-btn {
        margin-top: 0;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .names {
        font-size: 3em;
        letter-spacing: 4px;
    }

    .date {
        font-size: 1.1em;
        letter-spacing: 2px;
    }

    .location {
        font-size: 0.85em;
        letter-spacing: 1px;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 0.95em;
    }

    .confirmation-container {
        padding: 40px 25px;
        margin: 40px 15px;
    }

    .confirmation-title {
        font-size: 2.5em;
        letter-spacing: 3px;
    }

    .confirmation-subtitle {
        font-size: 1em;
    }

}

@media (max-width: 480px) {
    /* Mobile Background Optimization */
    .landing-bg,
    .rsvp-bg,
    .confirmation-bg {
        background-attachment: scroll !important;
        will-change: auto;
    }
    
    .landing-bg::before,
    .landing-bg::after,
    .rsvp-bg::before,
    .rsvp-bg::after,
    .confirmation-bg::before,
    .confirmation-bg::after {
        background-attachment: scroll !important;
        will-change: auto;
    }

    .landing {
        height: 100vh;   /* fallback */
        height: 100dvh;  /* excludes browser chrome on iOS — overrides where supported */
    }

    .landing-content {
        padding: 0 24px max(52px, env(safe-area-inset-bottom) + 40px);
    }

    .names {
        font-size: 2.4em;
        letter-spacing: 3px;
    }

    .date {
        font-size: 1em;
        letter-spacing: 2px;
    }

    .location {
        font-size: 0.8em;
        letter-spacing: 1px;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 0.9em;
    }

    .back-link {
        font-size: 0.9em;
    }

    .confirmation-page {
        min-height: auto;
        padding: 20px 0;
    }

    .confirmation-container {
        padding: 30px 20px;
        margin: 30px 0;
    }

    .confirmation-title {
        font-size: 2em;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    .confirmation-subtitle {
        font-size: 0.9em;
    }

    .confirmation-header {
        margin-bottom: 30px;
    }

    .confirmation-footer {
        padding: 24px 20px;
    }

    .confirmation-footer p {
        font-size: 13px;
    }

    .confirmation-footer p:first-child {
        font-size: 14px;
    }
}

/* ============================================
   ADMIN DASHBOARD
   ============================================ */

.admin-page {
    min-height: 100vh;
    position: relative;
}

.admin-bg {
    position: fixed;
    inset: 0;
    background-image: url('Wallpaper.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.admin-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 14, 8, 0.55);
}

.admin-wrap {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* Header */
.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8em;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
    margin: 0 0 4px;
}

.admin-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.admin-export-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Lato', sans-serif;
    font-size: 0.82em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 1px;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-export-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.backup-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backup-item {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    text-decoration: none;
    font-family: monospace;
    transition: background 0.15s, color 0.15s;
}

.backup-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Stats row */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    padding: 18px 16px;
    text-align: center;
}

.admin-stat--yes  { border-color: rgba(120, 168, 120, 0.4); background: rgba(120, 168, 120, 0.08); }
.admin-stat--no   { border-color: rgba(200, 120, 100, 0.4); background: rgba(200, 120, 100, 0.08); }
.admin-stat--pending { border-color: rgba(200, 180, 120, 0.4); background: rgba(200, 180, 120, 0.08); }

.stat-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4em;
    font-weight: 400;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 0.72em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* Sections */
.admin-section {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 24px;
    margin-bottom: 16px;
}

.admin-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25em;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.05em;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    font-family: 'Lato', sans-serif;
    font-size: 0.62em;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.admin-empty {
    font-family: 'Lato', sans-serif;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    margin: 0;
}

.admin-loading, .admin-error {
    font-family: 'Lato', sans-serif;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 40px 0;
}

/* Menu chips */
.admin-menu-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-menu-chip {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    padding: 10px 16px;
}

.menu-chip-count {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6em;
    color: #fff;
    line-height: 1;
}

.menu-chip-label {
    font-family: 'Lato', sans-serif;
    font-size: 0.78em;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
}

/* Pending list */
.admin-pending-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1px;
}

.pending-names {
    font-family: 'Lato', sans-serif;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.75);
}

.pending-count {
    font-family: 'Lato', sans-serif;
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}

/* Response rows */
.admin-responses {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-response-row {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1px;
    display: grid;
    grid-template-columns: 180px 1fr auto auto;
    align-items: center;
    gap: 16px;
}

.admin-response-row--anon {
    grid-template-columns: 180px 1fr auto;
}

.response-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-preview-btn {
    font-size: 11px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: rgba(200, 185, 160, 0.7);
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid rgba(200, 185, 160, 0.3);
    border-radius: 2px;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}

.admin-preview-btn:hover {
    color: rgba(200, 185, 160, 1);
    border-color: rgba(200, 185, 160, 0.7);
}

.admin-email-btn {
    font-size: 11px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(90, 138, 74, 0.6);
    border: none;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.admin-email-btn:hover:not(:disabled) {
    background: rgba(90, 138, 74, 0.9);
}

.email-btn--sent {
    background: rgba(90, 138, 74, 0.25);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.email-btn--sent:hover {
    background: rgba(90, 138, 74, 0.5) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.email-btn--error {
    background: rgba(180, 60, 60, 0.5) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
}

.response-group {
    font-family: 'Lato', sans-serif;
    font-size: 0.88em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
}

.response-attendance {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.response-yes {
    font-family: 'Lato', sans-serif;
    font-size: 0.84em;
    color: rgba(140, 200, 140, 0.9);
}

.response-no {
    font-family: 'Lato', sans-serif;
    font-size: 0.84em;
    color: rgba(220, 140, 120, 0.9);
}

.response-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.response-menu {
    font-family: 'Lato', sans-serif;
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.45);
}

.response-tag {
    font-family: 'Lato', sans-serif;
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 1px;
    cursor: default;
}

.response-tag--allergy {
    background: rgba(220, 160, 80, 0.2);
    color: rgba(220, 180, 100, 0.9);
    border: 1px solid rgba(220, 160, 80, 0.3);
}

.response-tag--note {
    background: rgba(120, 160, 220, 0.15);
    color: rgba(140, 180, 230, 0.9);
    border: 1px solid rgba(120, 160, 220, 0.25);
}

.response-date {
    font-family: 'Lato', sans-serif;
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-response-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .response-meta {
        justify-content: flex-start;
    }
}

/* ============================================
   NO-TOKEN OVERLAY
   ============================================ */

.no-token-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.no-token-overlay--open {
    display: flex;
}

.no-token-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.no-token-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #3a2e22;
    margin: 0 0 12px;
}

.no-token-body {
    font-size: 0.95rem;
    color: #5a4a3a;
    line-height: 1.6;
    margin: 0 0 12px;
}

.no-token-hint {
    font-size: 0.82rem;
    color: #888;
    line-height: 1.5;
    margin: 0 0 24px;
}

.no-token-close {
    background: #8b7355;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.no-token-close:hover {
    background: #7a6347;
}

.no-token-anon {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #888;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 10px 16px;
    font-style: normal;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.no-token-anon:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #666;
}

/* ============================================
   ANON RSVP MODE
   ============================================ */

.anon-guest-row--extra {
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
    padding-top: 14px;
}

.anon-name-fields {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.anon-name-input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
    color: #222;
    padding: 2px 0 4px;
    outline: none;
    background: transparent;
    font-family: inherit;
    transition: border-color 0.2s;
    min-width: 0;
}

.anon-name-input:focus {
    border-bottom-color: #8b7355;
}

.anon-name-input::placeholder {
    color: #ccc;
    font-style: italic;
}

.anon-attendance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.anon-add-btn {
    margin-top: 12px;
    padding: 9px 16px;
    background: none;
    border: 1px dashed #ccc;
    color: #999;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.anon-add-btn:hover {
    border-color: #8b7355;
    color: #8b7355;
}

.anon-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.15s;
}

.anon-remove-btn:hover {
    color: #e74c3c;
}

.anon-remove-btn--hidden {
    visibility: hidden;
    pointer-events: none;
}

