:root {
    --paper: #f6f1e7;
    --ink: #3a2c22;
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
}

body {
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 10% -10%, #fffaf3, transparent 50%),
        #e7dfd2;
    color: var(--ink);
    font-family: "Cormorant Garamond", Georgia, serif;
}

button, input, textarea { font: inherit; }

.stage {
    height: 100dvh;
    display: grid;
    place-items: center;
}

.phone {
    position: relative;
    width: min(100vw, 440px);
    height: 100dvh;
    background: var(--paper);
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(70, 46, 20, .18);
}

@media (max-width: 480px) {
    .phone { width: 100vw; box-shadow: none; }
}

.scroller {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    overscroll-behavior-y: contain;
}

.scroller::-webkit-scrollbar { display: none; }

.slide {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: #f3ecdf;
}

.slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform-origin: center top;
    animation: ken 28s ease-in-out alternate infinite;
}

.frame-stage {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    aspect-ratio: 576 / 1024;
    min-width: 100%;
    transform: translateX(-50%);
}

.frame-art {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

.frame-window {
    position: absolute;
    z-index: 1;
    left: 25.5%;
    width: 49%;
    top: 29.2%;
    height: 39.6%;
    overflow: hidden;
    container-type: inline-size;
}

.frame-track {
    display: flex;
    height: 100%;
    width: max-content;
    animation-name: var(--frame-anim, none);
    animation-duration: var(--frame-time, 1s);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.frame-track img {
    flex: 0 0 100cqi;
    width: 100cqi;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.frame-caption {
    position: absolute;
    z-index: 3;
    left: 24%;
    right: 24%;
    top: 74.2%;
    text-align: center;
    color: #6b4632;
    pointer-events: none;
}

.frame-caption p {
    max-width: 11em;
    margin: 0 auto;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(15px, 3.4vw, 20px);
    font-style: italic;
    font-weight: 500;
    line-height: 1.05;
}

.frame-count {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.frame-count div { min-width: 42px; }

.frame-count b {
    display: block;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 600;
    font-style: normal;
    line-height: 1;
}

.frame-count span {
    display: block;
    margin-top: 2px;
    font-family: Outfit, sans-serif;
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
}


.slide__copy {
    position: absolute;
    z-index: 6;
    left: 11%;
    right: 11%;
    top: var(--copy-top, 12%);
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 252, 247, .8), 0 10px 24px rgba(255, 248, 236, .7);
}

#page-haldi .slide__copy {
    left: 22%;
    right: 22%;
    top: 9%;
    overflow: visible;
    padding-top: 8px;
}

#page-haldi .script {
    font-size: clamp(30px, 7.4vw, 38px);
    line-height: 1.25;
    padding-top: .16em;
}

#page-haldi .prose p {
    font-size: 14px;
    line-height: 1.18;
}

#page-haldi .date-line {
    margin: 2px 0;
    font-size: 13px;
}

#page-cocktail .slide__copy {
    left: 24%;
    right: 16%;
    top: 13%;
    overflow: visible;
}

#page-cocktail .script {
    font-size: clamp(32px, 7.8vw, 40px);
    line-height: .9;
}

#page-cocktail .date-line {
    margin: 2px 0 1px;
    font-size: 13px;
}

#page-cocktail .prose p {
    font-size: 12.5px;
    line-height: 1.15;
}

#page-cocktail .prose .gap { height: 3px; }

.slide--letter .slide__copy {
    top: var(--copy-top, 22%);
    bottom: auto;
    left: 12%;
    right: 12%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    text-align: center;
    text-shadow: none;
}

.slide--letter.is-center .slide__copy {
    top: var(--copy-top, 23%);
    bottom: auto;
    justify-content: flex-start;
}

.slide--letter .kicker {
    margin-bottom: 0;
    font-size: clamp(12px, 1.55dvh, 15px);
    text-align: center;
}

.slide--letter .parents {
    max-width: 280px;
    margin-top: 0;
    font-size: clamp(10.5px, 1.3dvh, 12.5px);
    line-height: 1.2;
    text-align: center;
}

.slide--letter .amp {
    margin: 0;
    font-size: clamp(18px, 2.3dvh, 24px);
    line-height: .9;
}

.script {
    margin: 0;
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(46px, 12vw, 64px);
    line-height: .95;
    color: var(--title, #7a4b28);
}

.script.is-long {
    font-size: clamp(30px, 7.6vw, 40px);
    line-height: 1.08;
}

.slide--letter .script {
    font-size: clamp(26px, 3.5dvh, 36px);
    line-height: 1.02;
    margin-top: 0;
    padding-top: .06em;
    text-align: center;
}

.kicker, .parents, .prose { color: var(--body, #5a4634); }

.kicker {
    margin: 0 0 2px;
    font-style: italic;
    font-size: 17px;
}

.parents {
    margin: 1px 0 0;
    font-size: 13px;
    font-style: italic;
    line-height: 1.25;
}

.amp {
    margin: 0;
    font-family: "Great Vibes", cursive;
    font-size: 30px;
    line-height: 1;
    color: var(--title, #7a4b28);
}

.date-line {
    margin: 8px 0 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--date, #4c6846);
}

.prose p { margin: 0; font-size: 17.5px; line-height: 1.28; }
.prose .label {
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--label, #9d3d52);
}
.prose .gap { height: 8px; }
.prose--letter { max-width: 230px; }
.prose--letter p { font-size: clamp(11px, 1.35dvh, 13px); line-height: 1.1; }
.slide--letter .prose .gap { height: 2px; }

#page-pellikuthuru .slide__copy {
    left: 20%;
    right: 20%;
    top: 14%;
}

#page-pellikuthuru .script {
    display: block;
    max-width: 7.6em;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(28px, 7vw, 34px);
    line-height: 1.05;
}

#page-pellikuthuru .date-line {
    margin: 6px 0 2px;
    font-size: 12px;
    letter-spacing: .06em;
}

#page-pellikuthuru .prose {
    max-width: 230px;
    margin-left: auto;
    margin-right: auto;
}

#page-pellikuthuru .prose p {
    font-size: 14px;
    line-height: 1.2;
}

#page-pellikuthuru .prose .gap { height: 5px; }

#page-mehendi .slide__copy {
    left: 20%;
    right: 20%;
    top: 17%;
}

#page-mehendi .script {
    font-size: clamp(28px, 7vw, 36px);
    line-height: 1.22;
}

#page-mehendi .date-line {
    margin: 2px 0;
    font-size: 12px;
    letter-spacing: .08em;
}

#page-mehendi .prose p {
    font-size: 13.5px;
    line-height: 1.16;
}

#page-mehendi .prose .label {
    margin-top: 4px;
    font-size: 14px;
}

#page-mehendi .prose .gap { height: 3px; }

#page-wedding .slide__copy {
    left: 18%;
    right: 18%;
    top: 14%;
    max-height: 52%;
    overflow: hidden;
}

#page-wedding .script {
    font-size: clamp(40px, 10vw, 52px);
}

#page-wedding .date-line {
    margin: 2px 0 2px;
    font-size: 12px;
    letter-spacing: .08em;
}

#page-wedding .prose p {
    font-size: 12px;
    line-height: 1.12;
}

#page-wedding .prose .label {
    margin-top: 5px;
    font-size: 13px;
}

#page-wedding .prose .gap { height: 3px; }

#page-wedding .map-pill.is-inline {
    margin-top: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
}

#page-wedding .cue { display: none; }

.slide.is-active .slide__copy,
.slide.is-active .rsvp-card {
    animation: rise .9s cubic-bezier(.2, .7, .2, 1);
}

.cue {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 18px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-right: 1.5px solid rgba(72, 48, 28, .62);
    border-bottom: 1.5px solid rgba(72, 48, 28, .62);
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .8));
    animation: bob 1.5s ease-in-out infinite;
}

.slide:has(> .map-pill) .cue { bottom: 84px; }

.map-pill {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 190px;
    padding: 8px 18px 7px;
    text-decoration: none;
    color: #6d2e2a;
    background: rgba(255, 249, 241, .94);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(60, 32, 18, .18);
}

.map-pill strong {
    font-family: Outfit, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.map-pill span {
    font-family: Outfit, sans-serif;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8d7048;
}

.map-pill.is-inline {
    position: static;
    transform: none;
    margin: 12px auto 0;
    box-shadow: none;
    background: #fff;
}

#page-rsvp .map-pill.is-inline {
    margin-top: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    min-width: 0;
}

.gate {
    position: absolute;
    inset: 0;
    z-index: 8;
    background: #f7f3ec;
    cursor: pointer;
}

.gate video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f7f3ec;
}

.gate.is-leaving { animation: gate-out .7s ease forwards; pointer-events: none; }

.gate__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8%;
    text-align: center;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .42em;
    text-transform: uppercase;
    text-indent: .42em;
    color: rgba(92, 72, 46, .78);
}

.sparkles i {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e6cb86;
    box-shadow: 0 0 8px #f3e2ae;
    animation: twinkle 2.8s ease-in-out infinite;
}

.sparkles i:nth-child(1) { top: 38%; left: 28%; }
.sparkles i:nth-child(2) { top: 33%; left: 68%; animation-delay: .4s; }
.sparkles i:nth-child(3) { top: 48%; left: 22%; animation-delay: .8s; }
.sparkles i:nth-child(4) { top: 46%; left: 74%; animation-delay: 1.1s; }
.sparkles i:nth-child(5) { top: 30%; left: 48%; animation-delay: 1.5s; width: 3px; height: 3px; }
.sparkles i:nth-child(6) { top: 52%; left: 52%; animation-delay: .2s; width: 3px; height: 3px; }

.dots {
    position: absolute;
    z-index: 6;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 0 1px rgba(70, 48, 28, .28);
    cursor: pointer;
}

.dots button.is-on {
    background: #7c3b32;
    transform: scale(1.25);
}

.phone:has(.gate) .dots,
.phone:has(.gate) .music,
.phone:has(.gate) .petals {
    opacity: 0;
    pointer-events: none;
}

.music {
    position: absolute;
    z-index: 7;
    top: max(12px, env(safe-area-inset-top));
    right: 28px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 249, 241, .9);
    color: #6d2e2a;
    cursor: pointer;
}

.music.is-on { background: #7c3b32; color: #fff8ef; }

.venue-card {
    position: absolute;
    z-index: 2;
    left: 30%;
    right: 12%;
    top: 7%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #3a2c22;
}

.venue-card__title {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.12;
    text-shadow: 0 1px 0 rgba(255, 252, 247, .9);
}

.venue-card__link {
    display: inline-block;
    margin: 12px 0 0;
    color: #6d2e2a;
    font-family: Outfit, sans-serif;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-rsvp {
    margin-top: 14px;
    padding: 11px 28px;
    border: 0;
    border-radius: 999px;
    background: #7c2f2f;
    color: #fffaf4;
    font-family: Outfit, sans-serif;
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
}

.rsvp-sheet {
    position: absolute;
    inset: 0;
    z-index: 8;
    overflow: auto;
    background: #f6f1e7;
    -webkit-overflow-scrolling: touch;
}

.rsvp-sheet[hidden] { display: none; }

.rsvp-sheet .rsvp-card {
    position: relative;
    margin: 0;
    padding: 16px 18px 32px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.rsvp-close {
    display: block;
    margin: 0 0 8px auto;
    padding: 6px 12px;
    border: 1px solid rgba(90, 55, 35, .35);
    border-radius: 999px;
    background: transparent;
    color: #6d2e2a;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
}

.rsvp-card {
    padding: 14px 20px 14px;
    background: rgba(255, 249, 242, .78);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(60, 32, 18, .12);
    backdrop-filter: blur(5px);
    text-align: center;
}

.rsvp-card .script {
    font-size: 26px;
    line-height: 1.35;
    padding: 2px 8px 0;
}
.rsvp-card .prose p { font-size: 14px; line-height: 1.15; }
.rsvp-card .prose .gap { height: 2px; }

.rsvp-success {
    margin: 0 0 8px;
    font-family: Outfit, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #3f5c45;
}

.form-errors {
    margin: 8px 0;
    color: #8d2f2a;
    font-family: Outfit, sans-serif;
    font-size: 12px;
}

.form-errors p { margin: 0; }

.field {
    display: block;
    margin-top: 5px;
    text-align: left;
}

.field span, .events legend {
    display: block;
    margin-bottom: 2px;
    font-family: Outfit, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7d6754;
}

.field input, .field textarea {
    width: 100%;
    padding: 4px 2px;
    border: 0;
    border-bottom: 1px solid rgba(60, 42, 28, .45);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: Outfit, sans-serif;
    font-size: 16px;
    text-shadow: none;
}

.choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.choice label {
    position: relative;
    padding: 8px 6px;
    border: 1px solid rgba(90, 55, 35, .4);
    border-radius: 999px;
    background: transparent;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    letter-spacing: .01em;
    cursor: pointer;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice label:has(input:checked) {
    background: #7c2f2f;
    border-color: #7c2f2f;
    color: #fffaf4;
}

.events {
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    text-align: left;
}

.events label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 1px;
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
}

.events strong, .events small { display: block; }
.events strong {
    font-family: Outfit, sans-serif;
    font-size: 12px;
    font-weight: 500;
}
.events small {
    font-family: Outfit, sans-serif;
    font-size: 10px;
    color: #5c4a38;
}

.rsvp-card[data-attending="no"] .only-yes { display: none; }

.btn-send {
    width: 100%;
    margin-top: 8px;
    padding: 11px 16px;
    border: 0;
    border-radius: 999px;
    background: #7c2f2f;
    color: #fffaf4;
    font-family: Outfit, sans-serif;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
}

.fine {
    margin: 8px 0 0;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #7d6754;
}

.hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes ken {
    from { transform: scale(1); }
    to { transform: scale(1.03); }
}

@keyframes bob {
    50% { transform: translateY(6px) rotate(45deg); }
    0%, 100% { transform: rotate(45deg); }
}

@keyframes twinkle {
    0%, 100% { opacity: .2; transform: scale(.6); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes gate-out {
    to { opacity: 0; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .slide__bg, .cue, .sparkles i, .slide__copy, .rsvp-card, .petals span, .frame-track { animation: none; }
    .petals { display: none; }
}

.petals {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.petals span {
    position: absolute;
    top: -14%;
    width: 11px;
    height: 16px;
    border-radius: 80% 0 80% 0;
    background: #e7a0ab;
    opacity: .85;
    animation: petal-fall linear infinite;
}

.petals span:nth-child(odd) { border-radius: 0 80% 0 80%; background: #f3c7b4; }
.petals span:nth-child(3n) { background: #f4e4bf; width: 9px; height: 13px; }
.petals span:nth-child(4n) { background: #c45c68; }

.petals span:nth-child(1) { left: 8%; animation-duration: 11s; animation-delay: -2s; --drift: 18px; --spin: 200deg; }
.petals span:nth-child(2) { left: 18%; animation-duration: 13s; animation-delay: -7s; --drift: -16px; --spin: -240deg; }
.petals span:nth-child(3) { left: 28%; animation-duration: 10s; animation-delay: -4s; --drift: 26px; --spin: 280deg; }
.petals span:nth-child(4) { left: 38%; animation-duration: 14s; animation-delay: -9s; --drift: -10px; --spin: -180deg; }
.petals span:nth-child(5) { left: 48%; animation-duration: 12s; animation-delay: -1s; --drift: 14px; --spin: 220deg; }
.petals span:nth-child(6) { left: 58%; animation-duration: 15s; animation-delay: -6s; --drift: -22px; --spin: -260deg; }
.petals span:nth-child(7) { left: 68%; animation-duration: 11.5s; animation-delay: -3s; --drift: 20px; --spin: 190deg; }
.petals span:nth-child(8) { left: 78%; animation-duration: 13.5s; animation-delay: -8s; --drift: -14px; --spin: -210deg; }
.petals span:nth-child(9) { left: 14%; animation-duration: 16s; animation-delay: -11s; --drift: 12px; --spin: 160deg; width: 8px; height: 12px; }
.petals span:nth-child(10) { left: 44%; animation-duration: 12.5s; animation-delay: -5s; --drift: -18px; --spin: -300deg; }
.petals span:nth-child(11) { left: 62%; animation-duration: 14.5s; animation-delay: -10s; --drift: 16px; --spin: 240deg; width: 8px; height: 11px; }
.petals span:nth-child(12) { left: 86%; animation-duration: 10.5s; animation-delay: -2.5s; --drift: -12px; --spin: -170deg; }
.petals span:nth-child(13) { left: 24%; animation-duration: 17s; animation-delay: -13s; --drift: 10px; --spin: 150deg; }
.petals span:nth-child(14) { left: 72%; animation-duration: 13s; animation-delay: -6.5s; --drift: -8px; --spin: -190deg; }

.yt-host {
    position: fixed;
    left: -2000px;
    top: 0;
    width: 240px;
    height: 135px;
    opacity: 0.02;
    pointer-events: none;
}

.yt-host iframe {
    width: 240px;
    height: 135px;
}

@keyframes petal-fall {
    0% { transform: translate3d(0, -12vh, 0) rotate(0deg); opacity: 0; }
    12% { opacity: .8; }
    100% { transform: translate3d(var(--drift, 16px), 118vh, 0) rotate(var(--spin, 220deg)); opacity: .45; }
}
