:root {
    --cream: #fbf7f1;
    --cream-2: #f4eee6;
    --terracotta: #a97863;
    --terracotta-dark: #8f604f;
    --brown: #6d5045;
    --brown-light: #947568;
    --gold: #b99a69;
    --ink: #4c403b;
    --white: #fffdf9;
    --shadow: 0 25px 60px rgba(92, 64, 53, .13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(185,154,105,.10), transparent 22%),
        radial-gradient(circle at 90% 80%, rgba(169,120,99,.10), transparent 25%),
        #e9e3dc;
    color: var(--ink);
    font-family: 'Montserrat', sans-serif;
}

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

.page-shell {
    width: 100%;
    padding: 30px 20px 100px;
}

.invitation-page {
    position: relative;
    width: min(100%, 620px);
    min-height: 1050px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--cream);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.invitation-page::before,
.invitation-page::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.invitation-page::before {
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255,255,255,.78), transparent 25%),
        radial-gradient(ellipse at 80% 0%, rgba(255,255,255,.9), transparent 30%);
}

.eyebrow,
.title-small {
    text-align: center;
    letter-spacing: .24em;
    font-size: 11px;
    color: var(--brown-light);
    font-weight: 500;
}

.eyebrow {
    padding-top: 52px;
}

.title-small {
    margin-top: 35px;
}

.script-title,
.panel-script,
.script-heading {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
}

.script-title {
    margin: 12px 25px 0;
    text-align: center;
    font-size: clamp(64px, 13vw, 100px);
    line-height: .9;
    color: var(--brown);
}

.instruction {
    text-align: center;
    margin: 22px 0 10px;
    font-size: 13px;
    color: #806a61;
}

.age-badge {
    width: 94px;
    height: 94px;
    margin: 0 auto 22px;
    border: 1px solid rgba(169,120,99,.5);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.55);
}

.age-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    line-height: .8;
}

.age-text {
    margin-top: 8px;
    font-size: 8px;
    letter-spacing: .2em;
}

.photo-placeholder {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,.72), rgba(225,211,199,.6)),
        repeating-linear-gradient(-45deg, rgba(169,120,99,.05) 0 10px, transparent 10px 20px);
    border: 1px solid rgba(169,120,99,.20);
    color: var(--brown-light);
}

.photo-placeholder::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(169,120,99,.18);
    border-radius: 50%;
}

.photo-placeholder span {
    z-index: 1;
    font-size: 10px;
    letter-spacing: .18em;
    font-weight: 600;
}

.photo-placeholder small {
    z-index: 1;
    margin-top: 8px;
    font-size: 9px;
    opacity: .8;
}

.placeholder-icon {
    z-index: 1;
    margin-bottom: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
}

.photo-placeholder.large {
    width: calc(100% - 72px);
    margin: 0 auto;
    min-height: 370px;
}

.terracotta-panel {
    margin-top: -1px;
    padding: 38px 35px 34px;
    background: var(--terracotta);
    color: var(--white);
    text-align: center;
}

.panel-label {
    font-size: 9px;
    letter-spacing: .2em;
}

.panel-script {
    margin-top: 12px;
    font-size: 48px;
    line-height: .95;
}

.date-display {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.date-display > span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 76px;
    line-height: .8;
}

.date-display small {
    text-align: left;
    font-size: 11px;
    letter-spacing: .18em;
    line-height: 1.5;
}

.divider-line {
    margin: 25px auto 15px;
    max-width: 260px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.8);
    font-size: 9px;
    letter-spacing: .25em;
}

.divider-line::before,
.divider-line::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,.55);
}

.time-display {
    font-size: 12px;
    letter-spacing: .25em;
}

.scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 25px 0;
    font-size: 9px;
    letter-spacing: .18em;
    color: var(--brown-light);
}

.scroll-cue span {
    font-size: 22px;
}

.section-title {
    margin: 14px 30px 12px;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 500;
    color: var(--brown);
}

.intro-copy {
    width: min(88%, 500px);
    margin: 0 auto;
    text-align: center;
    color: #7e6c64;
    font-size: 12px;
    line-height: 1.75;
}

.mini-photo-grid {
    width: calc(100% - 70px);
    margin: 35px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.mini-photo-grid .photo-placeholder {
    min-height: 235px;
}

.mini-photo-grid .offset {
    margin-top: 30px;
}

.terracotta-details {
    margin-top: 25px;
    padding: 40px 35px 35px;
    background: var(--terracotta);
    color: var(--white);
}

.script-heading {
    text-align: center;
    font-size: 64px;
    line-height: .75;
}

.detail-subtitle {
    max-width: 330px;
    margin: 18px auto 25px;
    text-align: center;
    font-size: 11px;
    line-height: 1.6;
    opacity: .9;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.25);
}

.detail-icon {
    width: 35px;
    height: 35px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
}

.detail-item small,
.location-card small,
.dress-title {
    display: block;
    font-size: 8px;
    letter-spacing: .2em;
    opacity: .75;
}

.detail-item strong {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

.dress-code {
    margin-top: 22px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,.35);
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
}

.dress-title {
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 8px;
}

.pill-button {
    display: block;
    width: fit-content;
    margin: 25px auto 35px;
    padding: 13px 22px;
    border-radius: 30px;
    background: var(--white);
    color: var(--terracotta-dark);
    font-size: 9px;
    letter-spacing: .13em;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.countdown-heading {
    margin: 22px 25px 20px;
    text-align: center;
    color: var(--brown);
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 8vw, 54px);
    line-height: .92;
    font-weight: 500;
}

.countdown {
    width: calc(100% - 55px);
    margin: 0 auto 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(5px, 2vw, 14px);
}

.countdown > div {
    text-align: center;
    min-width: 65px;
}

.countdown strong {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(30px, 7vw, 50px);
    font-weight: 500;
    color: var(--terracotta-dark);
}

.countdown span {
    display: block;
    margin-top: 2px;
    font-size: 7px;
    letter-spacing: .14em;
    color: var(--brown-light);
}

.countdown i {
    font-family: 'Cormorant Garamond', serif;
    font-style: normal;
    font-size: 28px;
    color: var(--terracotta);
}

.photo-placeholder.wide {
    width: calc(100% - 72px);
    margin: 0 auto;
    min-height: 310px;
}

.terracotta-rsvp {
    position: relative;
    margin-top: -1px;
    padding: 38px 35px 42px;
    background: var(--terracotta);
    color: var(--white);
    text-align: center;
}

.initials {
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    line-height: .8;
    font-weight: 600;
}

.initials span {
    font-family: 'Great Vibes', cursive;
    font-size: 42px;
    font-weight: 400;
    margin: 0 5px;
}

.rsvp-note {
    margin: 25px 0 7px;
    font-size: 10px;
    letter-spacing: .13em;
}

.terracotta-rsvp h3 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    font-weight: 500;
}

.phone {
    display: inline-block;
    margin-top: 5px;
    font-size: 13px;
    letter-spacing: .08em;
}

.location-card {
    max-width: 360px;
    margin: 25px auto 0;
    padding: 17px;
    border: 1px solid rgba(255,255,255,.3);
}

.location-card strong,
.location-card span {
    display: block;
}

.location-card strong {
    margin-top: 6px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
}

.location-card span {
    margin-top: 3px;
    font-size: 10px;
    opacity: .9;
}

.pill-button.light {
    color: var(--terracotta-dark);
    margin-bottom: 0;
}

.floral {
    position: absolute;
    width: 150px;
    height: 170px;
    opacity: .58;
    z-index: 0;
    pointer-events: none;
}

.floral::before,
.floral::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 180px;
    border-radius: 80% 10% 80% 10%;
    background:
        radial-gradient(circle at 35% 30%, #fffdf9 0 8%, transparent 9%),
        radial-gradient(circle at 65% 30%, #e7d8cc 0 10%, transparent 11%),
        radial-gradient(circle at 45% 58%, #c9ad9d 0 9%, transparent 10%),
        linear-gradient(120deg, transparent 45%, #a78d70 46% 48%, transparent 49%);
    transform: rotate(-28deg);
}

.floral::after {
    transform: rotate(25deg) scale(.65);
    transform-origin: 75% 65%;
    opacity: .75;
}

.floral-top-left {
    top: -35px;
    left: -35px;
    transform: rotate(12deg);
}

.floral-top-right {
    top: -25px;
    right: -35px;
    transform: scaleX(-1) rotate(5deg);
}

.floral-mid-left {
    top: 390px;
    left: -55px;
    transform: rotate(-22deg);
}

.floral-mid-right {
    top: 430px;
    right: -55px;
    transform: scaleX(-1) rotate(-22deg);
}

.floral-bottom-right {
    bottom: -40px;
    right: -30px;
    transform: scaleX(-1) rotate(30deg);
}

.bottom-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 5px;
    border-radius: 40px;
    background: rgba(255,253,249,.93);
    box-shadow: 0 12px 35px rgba(64,45,38,.18);
    backdrop-filter: blur(12px);
}

.bottom-nav a {
    padding: 10px 17px;
    border-radius: 30px;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brown-light);
    white-space: nowrap;
}

.bottom-nav a.active {
    background: var(--terracotta);
    color: white;
}

@media (max-width: 600px) {
    .page-shell {
        padding: 0 0 88px;
    }

    .invitation-page {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
    }

    .photo-placeholder.large {
        width: calc(100% - 45px);
        min-height: 330px;
    }

    .photo-placeholder.wide {
        width: calc(100% - 45px);
    }

    .mini-photo-grid {
        width: calc(100% - 45px);
    }

    .terracotta-panel,
    .terracotta-details,
    .terracotta-rsvp {
        padding-left: 25px;
        padding-right: 25px;
    }

    .bottom-nav {
        bottom: 10px;
        width: max-content;
        max-width: calc(100% - 20px);
    }

    .bottom-nav a {
        padding: 10px 12px;
        font-size: 8px;
    }
}

@media (max-width: 390px) {
    .mini-photo-grid {
        grid-template-columns: 1fr;
    }

    .mini-photo-grid .offset {
        margin-top: 0;
    }

    .countdown {
        gap: 3px;
    }

    .countdown > div {
        min-width: 55px;
    }

    .countdown i {
        font-size: 20px;
    }
}
