/* ────────────────────────────────────────────────────
   CSS Custom Properties
   Line 28 colour fix: replaced `lightsalmon` with --terracotta,
   a warmer, more refined tone that pairs with the gold palette.
   Also added missing --blush, --sage, --rosybrown as proper tokens.
──────────────────────────────────────────────────── */
:root {
    --ivory:      #faf7f2;
    --gold:       #c9a96e;
    --charcoal:   #222222;
    --rose:       #c9a0a0;

    /* Previously missing variables (were being referenced but never defined) */
    --blush:      #f5ede8;
    --sage:       #7a8c74;

    /* Replaces the named colour `rosybrown` and `lightsalmon` throughout */
    --rosybrown:  #b5837a;
    --terracotta: #c1785a; /* ← line 28 fix: hero-location colour */
}


/* ────────────────────────────────────────────────────
   Reset & Base
──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin:     0;
    padding:    0;
    box-sizing: border-box;
}

body {
    font-family: Jost, sans-serif;
    background:  var(--ivory);
    color:       #333;
    line-height: 1.7;
}


/* ────────────────────────────────────────────────────
   Navigation
──────────────────────────────────────────────────── */
nav {
    position:        fixed;
    top:             0;
    width:           100%;
    background:      rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    padding:         14px 1rem;
    text-align:      center;
    z-index:         100;
    display:         flex;
    flex-wrap:       wrap;
    justify-content: center;
    gap:             0.2rem 0;
}

nav a {
    display:        inline-block;
    padding:        4px 14px;
    text-decoration: none;
    color:          #333;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size:      0.75rem;
}


/* ────────────────────────────────────────────────────
   Shared Section Utilities
──────────────────────────────────────────────────── */
section {
    padding: 6rem 2rem;
}

.section-label {
    display:        block;
    font-size:      0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color:          var(--rosybrown);
    margin-bottom:  0.5rem;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size:   clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 300;
    line-height: 1.15;
}

.thin-rule {
    width:      40px;
    height:     1px;
    background: var(--gold);
    margin:     1.6rem auto;
}


/* ────────────────────────────────────────────────────
   Hero
──────────────────────────────────────────────────── */
@font-face {
    font-family: 'Amsterdam Signature Italic';
    src: url("Amsterdam Signature Italic.woff2") format('woff2'),
         url("Amsterdam Signature Italic.woff") format('woff');
    font-weight: normal;
    font-style: normal;
}
#hero {
    height:          100vh;
    min-height:      600px;
    background:
        linear-gradient(rgba(250, 247, 242, 0.45), rgba(250, 247, 242, 0.8)),
        url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1800') 30% center / cover no-repeat;
    display:         flex;
    flex-direction:  column;
    justify-content: center;
    align-items:     center;
    text-align:      center;
    padding:         6rem 2rem 4rem;
}

.hero-head {
    font-size:      0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom:  2.2rem;
}

.hero-names {
    font-family: 'Amsterdam Signature Italic', cursive;
    font-size:   clamp(3.8rem, 10vw, 8.5rem);
    font-weight: 300;
    line-height: 1;
    color:       var(--charcoal);
}

.hero-names .amp {
    display:    block;
    font-style: italic;
    font-size:  0.55em;
    line-height: 1.6;
}

.hero-date {
    font-size:      0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top:     2.2rem;
}

/* ── Line 28 fix: replaced `lightsalmon` with --terracotta ── */
.hero-location {
    font-family: 'Cormorant Garamond', serif;
    font-style:  italic;
    font-size:   1.15rem;
    color:       var(--terracotta);
    margin-top:  0.4rem;
}

/* Countdown timer */
.countdown {
    display:         flex;
    gap:             2.5rem;
    justify-content: center;
    margin-top:      3rem;
}

.cd-block {
    text-align: center;
}

.cd-num {
    display:     block;
    font-family: 'Cormorant Garamond', serif;
    font-size:   3rem;
    font-weight: 300;
    line-height: 1;
    color:       var(--charcoal);
}

.cd-lbl {
    font-size:      0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Used by the JS "today" message */
.countdown-today {
    font-family: 'Cormorant Garamond', serif;
    font-style:  italic;
    font-size:   1.4rem;
    color:       var(--rose);
}


/* ────────────────────────────────────────────────────
   Story / Timeline
──────────────────────────────────────────────────── */
#story {
    background: var(--ivory);
}

.story-inner {
    max-width:  760px;
    margin:     0 auto;
    text-align: center; /* centres label + heading */
}

.story-inner .section-heading {
    text-align: center;
}

.story-inner .thin-rule {
    margin: 1.6rem auto 3.4rem;
}

.timeline {
    position:   relative;
    padding-left: 2px;
    text-align: left;
}

.timeline::before {
    content:    '';
    position:   absolute;
    left:       0;
    top:        0;
    bottom:     0;
    width:      1px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--rose) 15%,
        var(--rose) 85%,
        transparent
    );
}

.t-item {
    position:   relative;
    padding:    0 0 3rem 2.6rem;
    opacity:    0;
    transform:  translateY(24px);
    transition: opacity 1s ease, transform 1s ease;
}

.t-item.visible {
    opacity:   1;
    transform: none;
}

.t-item::before {
    content:       '';
    position:      absolute;
    left:          -4px;
    top:           6px;
    width:         9px;
    height:        9px;
    border-radius: 50%;
    background:    var(--ivory);
    border:        1.5px solid var(--gold);
}

.t-year {
    font-size:      0.68rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color:          var(--rosybrown);
    margin-bottom:  0.5rem;
}

.t-title {
    font-family:   'Cormorant Garamond', serif;
    font-size:     1.45rem;
    font-weight:   400;
    margin-bottom: 0.5rem;
}

.t-body {
    font-size:   0.9rem;
    line-height: 1.75;
    color:       #555;
}


/* ────────────────────────────────────────────────────
   Couple
──────────────────────────────────────────────────── */
#couple {
    background: var(--blush);
}

.couple-header {
    max-width:     1100px;
    margin:        0 auto 3rem;
    text-align:    center;
}

.couple-grid {
    max-width: 1100px;
    margin:    0 auto;
    display:   grid;
    grid-template-columns: 1fr 1fr;
    gap:       4rem;
}

.person-card {
    display:        flex;
    flex-direction: column;
}

.person-photo {
    width:         100%;
    aspect-ratio:  4 / 5;
    object-fit:    cover;
    margin-bottom: 1rem;
    display:       block;
}

.person-name {
    font-family:   'Cormorant Garamond', serif;
    font-size:     2rem;
    font-weight:   300;
    margin-bottom: 0.3rem;
}

.person-tag {
    font-size:      0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color:          var(--sage);
    margin-bottom:  1.2rem;
}

.person-bio {
    font-size:   0.9rem;
    line-height: 1.8;
    color:       #555;
}


/* ────────────────────────────────────────────────────
   Gallery
──────────────────────────────────────────────────── */
#gallery {
    background: var(--ivory);
}

.gallery-header {
    max-width:     1100px;
    margin:        0 auto 3rem;
    text-align:    center;
}

.gallery-grid {
    max-width:             1100px;
    margin:                0 auto;
    display:               grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows:    auto auto;
    gap:                   12px;
}

.g-item {
    overflow: hidden;
    position: relative;
}

/* First item spans two rows to create the tall-left layout */
.g-item:first-child {
    grid-row:   span 2;
    min-height: 320px;
}

.g-item:not(:first-child) {
    aspect-ratio: 1 / 1;
}

.g-item img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 1s ease;
}

.g-item:hover img {
    transform: scale(1.04);
}

.g-item::after {
    content:        '';
    position:       absolute;
    inset:          0;
    background:     linear-gradient(to top, rgba(44, 44, 44, 0.12), transparent);
    pointer-events: none;
}


/* ────────────────────────────────────────────────────
   Details / Wedding Day
──────────────────────────────────────────────────── */
#details {
    background: var(--charcoal);
    color:      var(--ivory);
}

#details .section-label {
    color: var(--rosybrown);
}

#details .section-heading {
    color: var(--ivory);
}

.details-header {
    max-width:     1100px;
    margin:        0 auto 3.5rem;
    text-align:    center;
}

.details-grid {
    max-width:             1100px;
    margin:                0 auto;
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   2px;
}

.d-card {
    padding:    3.4rem 2.4rem;
    border:     1px solid rgba(201, 169, 110, 0.18);
    text-align: center;
    transition: background 0.3s;
}

.d-card:hover {
    background: rgba(201, 169, 110, 0.06);
}

.d-icon {
    font-size:     1.6rem;
    margin-bottom: 1.2rem;
    opacity:       0.7;
}

.d-label {
    font-size:      0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color:          rosybrown;
    margin-bottom:  0.8rem;
}

.d-main {
    font-family:   'Cormorant Garamond', serif;
    font-size:     1.55rem;
    font-weight:   300;
    color:         var(--ivory);
    margin-bottom: 0.4rem;
}

/* Fixed: was `font-size: 0.82` (missing unit) and `line-height: 1,6` (comma) */
.d-sub {
    font-size:   0.82rem;
    color:       rgba(250, 247, 242, 0.5);
    line-height: 1.6;
}


/* ────────────────────────────────────────────────────
   Stay / Accommodation
──────────────────────────────────────────────────── */
#stay {
    background: var(--ivory);
}

.stay-header {
    max-width:     1100px;
    margin:        0 auto 3rem;
    text-align:    center;
}

.accom {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap:                   20px;
    max-width:             1100px;
    margin:                0 auto;
}

.hotel {
    background:    white;
    border-radius: 16px;
    padding:       2rem;
    box-shadow:    0 10px 25px rgba(0, 0, 0, 0.08);
    font-family:   'Cormorant Garamond', serif;
}

.hotel h3 {
    font-size:     1.4rem;
    font-weight:   400;
    margin-bottom: 0.5rem;
}

.hotel p {
    font-family: Jost, sans-serif;
    font-size:   0.88rem;
    color:       #666;
}

.hotel-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hotel {
    cursor: pointer;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.hotel:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.12);
}

.venue-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(193,120,90,0.4);
    transition: 0.3s;
}

.venue-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* MODAL */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 9999;
}

.modal.show {
    display: block;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
}

.modal-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-link {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--charcoal);
    text-decoration: none;
    color: var(--charcoal);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.modal-link:hover {
    background: var(--charcoal);
    color: white;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}


/* ────────────────────────────────────────────────────
   RSVP
──────────────────────────────────────────────────── */
#rsvp {
    background:  var(--ivory);
    text-align:  center;
}

.rsvp-inner {
    max-width: 560px;
    margin:    0 auto;
}

.rsvp-inner .thin-rule {
    margin: 1.6rem auto 2rem;
}

.rsvp-body {
    font-size:     0.95rem;
    line-height:   1.8;
    color:         #666;
    margin-bottom: 2.6rem;
}

.rsvp-btn {
    display:         inline-block;
    padding:         1rem 3rem;
    background:      transparent;
    border:          1px solid var(--charcoal);
    color:           var(--charcoal);
    font-family:     'Jost', sans-serif;
    font-size:       0.72rem;
    letter-spacing:  0.25em;
    text-transform:  uppercase;
    text-decoration: none;
    cursor:          pointer;
    transition:      background 0.25s, color 0.25s;
}

.rsvp-btn:hover {
    background: var(--charcoal);
    color:      var(--ivory);
}

.rsvp-deadline {
    margin-top:     1.4rem;
    font-size:      0.72rem;
    letter-spacing: 0.1em;
    color:          #aaa;
}


/* ────────────────────────────────────────────────────
   Footer
──────────────────────────────────────────────────── */
footer {
    background:  var(--charcoal);
    color:       #ddd;
    text-align:  center;
    padding:     40px 2rem;
    font-size:   0.8rem;
    letter-spacing: 0.05em;
}


/* ────────────────────────────────────────────────────
   Responsive — Tablet (≤ 900px)
──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ────────────────────────────────────────────────────
   Responsive — Mobile (≤ 768px)
──────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Sections: reduce tall top/bottom padding */
    section {
        padding: 4rem 1.25rem;
    }

    /* Nav: tighter text, still flex-wraps */
    nav a {
        font-size:   0.65rem;
        padding:     4px 10px;
    }

    /* Hero */
    .hero-names {
        font-size: clamp(3rem, 14vw, 5.5rem);
    }

    .countdown {
        gap: 1.4rem;
    }

    .cd-num {
        font-size: 2rem;
    }

    /* Story */
    .story-inner {
        padding: 0 0.25rem;
    }

    /* Couple: stack to single column */
    .couple-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .person-photo {
        aspect-ratio: 4 / 4; /* squarer on mobile saves vertical space */
    }

    /* Gallery: two equal columns, no tall first item */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows:    auto;
    }

    .g-item:first-child {
        grid-column: span 2;
        grid-row:    span 1;
        min-height:  220px;
    }

    .g-item:not(:first-child) {
        aspect-ratio: 1 / 1;
    }

    /* Details: single column */
    .details-grid {
        grid-template-columns: 1fr;
    }

    .d-card {
        padding: 2rem 1.5rem;
    }

    /* RSVP */
    .rsvp-inner {
        padding: 0 0.5rem;
    }
}


/* ────────────────────────────────────────────────────
   Responsive — Small Mobile (≤ 480px)
──────────────────────────────────────────────────── */
@media (max-width: 480px) {

    /* Gallery: single column for very small screens */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .g-item:first-child {
        grid-column: span 1;
        min-height: 260px;
    }

    .g-item:not(:first-child) {
        aspect-ratio: 3 / 2;
    }

    /* Countdown: tighter */
    .countdown {
        gap: 1rem;
    }

    .cd-num {
        font-size: 1.7rem;
    }

    /* Nav: even smaller text */
    nav a {
        font-size:   0.6rem;
        padding:     4px 8px;
    }
}


/* ────────────────────────────────────────────────────
   Reduced Motion
──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .t-item     { transition: none; }
    .g-item img { transition: none; }
}

