:root {
    --ivory: #f8f0e3;
    --gold: #c6ac7d;
    --teal: #104e49;
    --ink: #624832;
    --navy: #101b30
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.8;
    text-align: center
}

h1,
h2,
h3,
p {
    margin: 0 0 1rem
}

h2,
h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.15
}

h2 {
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    font-style: italic
}

h3 {
    font-size: clamp(1.6rem, 4vw, 2.4rem)
}

p {
    font-size: clamp(.9rem, 2vw, 1rem)
}

button,
a {
    touch-action: manipulation
}

button {
    font: inherit;
    cursor: pointer
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #d49c50;
    outline-offset: 4px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .72rem;
    font-weight: 500
}

.subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.45rem
}

.ornament {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem
}

.section {
    padding: clamp(65px, 10vw, 125px) 20px
}

.section p {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto
}

.hero {
    min-height: 100vh;
    min-height: 100svh;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #233b32, #6c6048);
    color: var(--ivory);
    padding: 80px 20px
}

.hero-photo,
.hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.hero-photo img {
    animation: herozoom 22s ease-in-out infinite alternate
}

.hero:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, #0005 35%, #0009)
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: appear 1.5s ease both
}

.hero h1,
.signature {
    font-family: 'Great Vibes', Georgia, cursive;
    font-weight: 400;
    font-size: clamp(3.2rem, 9vw, 8rem);
    line-height: 1.2;
    text-shadow: 0 2px 15px #0003
}

.scroll-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    margin-top: 2rem;
    font-size: .8rem
}

.scroll-link span {
    display: block;
    font-size: 1.8rem
}

.music-toggle {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 10;
    border: 1px solid var(--gold);
    border-radius: 30px;
    padding: 10px 16px;
    background: #173b35ee;
    color: var(--ivory);
    font-size: .75rem
}

.details,
.invitation {
    background: radial-gradient(ellipse at top left, #e6c6bd66, transparent 35%), radial-gradient(ellipse at bottom right, #d5b78855, transparent 35%), var(--ivory)
}

.date-card {
    display: grid;
    gap: 8px;
    border-block: 1px solid var(--gold);
    max-width: 430px;
    margin: 35px auto;
    padding: 25px 10px
}

.date-card strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600
}

.gallery {
    background: var(--teal);
    color: var(--ivory)
}

.tv {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 3/2;
    margin: 30px auto;
    background: linear-gradient(135deg, #255b51, #173b34);
    overflow: hidden;
    border-radius: 8px
}

.tv-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill
}

.tv video {
    opacity: 0
}

.tv video.ready {
    opacity: 1
}

.tv-screen {
    position: absolute;
    left: 29.8%;
    top: 34.9%;
    width: 36.2%;
    height: 37.8%;
    border-radius: 14%/10%;
    overflow: hidden;
    background: #17382e;
    isolation: isolate
}

.tv-screen .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background: #172b24;
}

.tv-screen .slide.active {
    opacity: 1
}

.tv-title {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3%;
    background: radial-gradient(#41695b, #102b25);
    transition: opacity .6s;
    padding: 4%;
    color: #f5e6c9
}

.tv-title.hidden {
    opacity: 0;
    pointer-events: none
}

.tv-title strong {
    font: italic clamp(12px, 4vw, 46px)/1.1 'Cormorant Garamond', Georgia, serif
}

.tv-title small {
    font-size: clamp(7px, 1.5vw, 15px)
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent 0 3px, #0002 3px 4px);
    box-shadow: inset 0 0 18px #0007
}

.tv-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px auto
}

.tv-controls button {
    background: transparent;
    color: var(--ivory);
    border: 1px solid var(--gold);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: .8rem
}

.countdown {
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at bottom, #34475f, var(--navy) 65%, #080f20);
    color: #f1dcb3
}

.countdown-content {
    position: relative;
    z-index: 1
}

#stars {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.star {
    position: absolute;
    background: #ffe7b7;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate
}

.count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 600px;
    margin: 35px auto
}

.count-grid div {
    border: 1px solid #c6ac7d77;
    padding: 20px 2px;
    background: #ffffff06
}

.count-grid strong {
    display: block;
    font: clamp(1.8rem, 6vw, 3.5rem) Georgia, serif;
    font-variant-numeric: tabular-nums
}

.count-grid span {
    font-size: clamp(.55rem, 1.5vw, .75rem);
    text-transform: uppercase;
    letter-spacing: .08em
}

.portrait {
    display: block;
    width: min(230px, 65vw);
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 50% 50% 45% 45%;
    border: 3px solid var(--gold);
    margin: 0 auto 30px
}

.map-button {
    display: inline-block;
    background: var(--teal);
    color: var(--ivory);
    padding: 13px 28px;
    border-radius: 3px;
    text-decoration: none;
    margin: 12px 0 30px
}

.signature {
    font-size: clamp(2.8rem, 7vw, 5rem);
    text-shadow: none
}

footer {
    background: #173b35;
    color: var(--ivory);
    padding: 25px;
    font-size: .75rem
}

.reveal.pending {
    opacity: 0;
    transform: translateY(25px)
}

.reveal {
    transition: opacity .9s, transform .9s
}

@keyframes herozoom {
    from {
        transform: scale(1)
    }

    to {
        transform: scale(1.07)
    }
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(15px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@keyframes twinkle {
    from {
        opacity: .15
    }

    to {
        opacity: .95
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }

    .reveal.pending {
        opacity: 1;
        transform: none
    }
}
/* Television photograph correction */

.tv-screen .slide {
    object-fit: cover;
    object-position: center center;
}

/* Mobile hero optimisation */

@media screen and (max-width: 768px) {

    .hero {
        min-height: 100vh;
        min-height: 100svh;
        padding: 60px 15px;
    }

    .hero-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .hero-content {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
        line-height: 1.2;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .hero .eyebrow {
        font-size: 0.65rem;
    }
}
