/* =========================================
   RESET
========================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--dark);
    background: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: white;
}

/* =========================================
   VARIABLES
========================================= */

:root {
    --cream: #faf7f2;
    --ivory: #fffdf9;

    --accent: #a94f2c;
    --accent-dark: #813b22;
    --accent-light: #f3e7e2;

    --dark: #403b37;
    --dark-soft: #5b544e;

    --muted: #77706a;

    --light: #e9e0d5;
    --border: #ded5ca;
    --border-dark: #c9beb3;

    --section-alt: #eee5db;

    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.12);

    --transition: 0.3s ease;
}

/* =========================================
   GENERAL
========================================= */

.container {
    width: min(1100px, 90%);
    margin-inline: auto;
}

.container.narrow,
.narrow {
    width: min(720px, 90%);
    margin-inline: auto;
}

.section {
    padding: 110px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 70px;
}

.section-heading h2 {
    margin-top: 8px;
}

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    line-height: 1.5;
    color: var(--accent);
}

h1,
h2,
h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
    line-height: 1.1;
}

h2 {
    font-size: clamp(42px, 6vw, 65px);
}

p {
    margin: 0;
}

.button {
    display: inline-block;

    border: none;
    padding: 15px 35px;

    background: var(--accent);
    color: white;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    line-height: 1.2;
    text-transform: uppercase;

    transition:
        background var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* =========================================
   STICKY NAVIGATION
========================================= */

.navbar {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;

    width: 100%;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 5%;

    color: var(--dark);

    background: rgba(255, 253, 249, 0.94);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(64, 59, 55, 0.08);

    transition:
        background var(--transition),
        box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.logo {
    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--dark);

    transition: color var(--transition);
}

.logo:hover {
    color: var(--accent);
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.navbar nav a {
    position: relative;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: var(--dark);

    transition: color var(--transition);
}

.navbar nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -7px;

    width: 0;
    height: 1px;

    background: var(--accent);

    transition: width var(--transition);
}

.navbar nav a:hover {
    color: var(--accent);
}

.navbar nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    border: none;
    background: transparent;

    color: var(--dark);

    font-size: 25px;
    line-height: 1;
}

/* =========================================
   HERO
========================================= */

.hero {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 100px 20px 80px;

    text-align: center;
    color: white;

    /*
       CSS file is inside /styles,
       while the image is inside /img.
    */
    background: url("../img/hero_bg.jpeg") center center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 32, 29, 0.48);
}

.hero-content {
    position: relative;
    z-index: 2;

    width: min(100%, 1000px);
}

.hero .eyebrow {
    color: #f2b39a;
}

.hero h1 {
    margin: 15px 0;

    font-size: clamp(70px, 13vw, 150px);
    line-height: 0.95;
}

.hero h1 span {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

.hero-line {
    width: 70px;
    height: 1px;

    margin: 25px auto;

    background: rgba(255, 255, 255, 0.85);
}

.date {
    font-size: 15px;
    letter-spacing: 7px;
}

.location {
    margin: 8px 0 35px;

    font-size: 12px;
    letter-spacing: 2px;
}

.hero .button {
    background: var(--accent);
    color: white;
}

.hero .button:hover {
    background: var(--accent-dark);
}

.scroll-indicator {
    position: absolute;
    z-index: 2;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;

    color: white;

    font-size: 10px;
    letter-spacing: 2px;
    line-height: 1.4;
    text-transform: uppercase;

    opacity: 0.85;
}

/* =========================================
   INTRO
========================================= */

.intro {
    padding: 120px 0;

    text-align: center;

    background: var(--ivory);
}

.intro h2 {
    margin: 15px 0 30px;
}

.intro p {
    max-width: 600px;

    margin: 10px auto;

    color: var(--muted);
}

.intro p:first-of-type {
    font-family: "Cormorant Garamond", serif;
    font-size: 23px;
    line-height: 1.5;
    color: var(--dark);
}

.flourish {
    margin-top: 30px;

    color: var(--accent);

    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
}

/* =========================================
   COUNTDOWN
========================================= */

.countdown-section {
    padding: 100px 0;

    text-align: center;

    background: var(--section-alt);
}

.countdown-section h2 {
    margin: 10px 0 45px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 0;
}

.count-box {
    min-width: 120px;

    padding: 20px;

    border-right: 1px solid var(--border-dark);
}

.count-box:last-child {
    border-right: none;
}

.count-box span {
    display: block;

    font-family: "Cormorant Garamond", serif;
    font-size: 55px;
    line-height: 1;

    color: var(--accent);
}

.count-box small {
    display: block;

    margin-top: 8px;

    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: var(--dark-soft);
}

/* =========================================
   STORY
========================================= */

.story {
    background: var(--cream);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: center;
}

.story-image {
    height: 650px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.6s ease;
}

.story-image:hover img {
    transform: scale(1.02);
}

.story-text {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.story-item {
    display: grid;
    grid-template-columns: 20px 1fr;

    gap: 20px;
}
.story-name {
    color: var(--accent);
}
.story-number {
    color: var(--accent);

    font-family: "Cormorant Garamond", serif;
    font-size: 25px;
}

.story-item h3 {
    margin-bottom: 10px;

    font-size: 32px;
}

.story-item h3[style] {
    color: var(--accent) !important;
}

.story-item em {
    color: var(--accent) !important;
}

.story-item p {
    color: var(--muted);
    font-size: 14px;
}

/* =========================================
   DETAILS
========================================= */

.details {
    background: var(--ivory);
}

/* =========================================
   TIMELINE
========================================= */

.timeline {
    background: var(--section-alt);
}

.timeline-list {
    max-width: 750px;
    margin: auto;
}

.timeline-item {
    position: relative;

    display: grid;
    grid-template-columns: 100px 20px 1fr;

    gap: 25px;

    padding-bottom: 50px;
}

.timeline-item:not(:last-child)::after {
    content: "";

    position: absolute;

    left: 108px;
    top: 18px;
    bottom: 0;

    width: 1px;

    background: var(--border-dark);
}

.timeline-time {
    padding-top: 1px;

    text-align: right;

    color: var(--accent);

    font-size: 12px;
    letter-spacing: 1px;
}

.timeline-dot {
    position: relative;
    z-index: 2;

    width: 10px;
    height: 10px;

    margin-top: 4px;

    border: 2px solid var(--accent);
    border-radius: 50%;

    background: var(--cream);
}

.timeline-item h3 {
    margin-bottom: 8px;

    font-size: 30px;
}

.timeline-item p {
    font-size: 13px;
    color: var(--muted);
}

/* =========================================
   GALLERY
========================================= */

.gallery {
    background: var(--cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.gallery-grid img {
    width: 100%;
    height: 350px;

    object-fit: cover;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

.gallery-grid img:hover {
    transform: scale(1.02);
    filter: brightness(0.9);
}

/* =========================================
   VENUE
========================================= */

.venue {
    position: relative;

    min-height: 600px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 100px 20px;

    text-align: center;
    color: white;

    background:
        linear-gradient(rgba(45, 40, 35, 0.55), rgba(45, 40, 35, 0.55)),
        url("https://images.unsplash.com/photo-1519167758481-83f550bb49b3?auto=format&fit=crop&w=2000&q=85") center /
            cover no-repeat;
}

.venue-content {
    width: min(900px, 100%);
}

.venue-content > p {
    margin-bottom: 20px;
}

.venue-content > div {
    margin-top: 45px;
}

.venue h2 {
    margin: 15px 0;

    font-size: clamp(35px, 5vw, 55px);
}

.venue p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
}

.venue .button {
    margin-top: 20px;
}

.button-light {
    background: white;
    color: var(--dark);
}

.button-light:hover {
    background: var(--light);
    color: var(--dark);
}

/* =========================================
   RSVP
========================================= */

.rsvp {
    background: var(--ivory);
}

.rsvp .section-heading > p:last-child {
    max-width: 500px;

    margin: 20px auto;

    color: var(--muted);
}

#rsvpForm {
    margin-top: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group > label {
    display: block;

    margin-bottom: 8px;

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

input,
textarea,
select {
    width: 100%;

    border: 1px solid var(--border);

    border-radius: 0;

    background: var(--cream);

    padding: 15px;

    color: var(--dark);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: #a49b93;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);

    box-shadow: 0 0 0 2px rgba(169, 79, 44, 0.08);
}

textarea {
    resize: vertical;
    min-height: 130px;
}

select {
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio {
    flex: 1;

    margin: 0;

    cursor: pointer;
}

.radio input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.radio span {
    display: block;

    padding: 15px;

    text-align: center;

    border: 1px solid var(--border);

    background: var(--cream);

    font-size: 11px;

    transition:
        border-color var(--transition),
        background var(--transition),
        color var(--transition);
}

.radio:hover span {
    border-color: var(--accent);
}

.radio input:checked + span {
    border-color: var(--accent);

    background: var(--accent-light);

    color: var(--accent-dark);
}

.radio input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

#rsvpForm .button {
    width: 100%;
}

.form-message {
    min-height: 24px;

    margin-top: 25px;

    text-align: center;

    color: var(--accent-dark);

    font-size: 14px;
}

/* =========================================
   FOOTER
========================================= */

footer {
    padding: 80px 20px;

    text-align: center;

    background: var(--accent);
    color: white;
}

footer .flourish {
    margin-top: 0;

    color: white;
}

footer h2 {
    margin: 10px 0;

    font-size: 55px;
}

footer p {
    font-size: 13px;
}

.footer-note {
    margin-top: 30px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 11px;
    letter-spacing: 2px;
}

/* =========================================
   RESPONSIVE — TABLET
========================================= */

@media (max-width: 900px) {
    .navbar nav {
        gap: 22px;
    }

    .story-grid {
        gap: 45px;
    }

    .story-image {
        height: 550px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid img {
        height: 300px;
    }
}

/* =========================================
   RESPONSIVE — MOBILE NAVIGATION
========================================= */

@media (max-width: 800px) {
    .navbar {
        height: 70px;
    }

    .navbar nav {
        position: absolute;

        top: 70px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: center;

        gap: 0;

        padding: 15px 25px 25px;

        background: var(--cream);

        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }

    .navbar nav.active {
        display: flex;
    }

    .navbar nav a {
        width: 100%;

        padding: 14px;

        text-align: center;

        color: var(--dark);
    }

    .navbar nav a:hover {
        color: #f2b39a;
    }

    .navbar nav a::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .story-grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .story-image {
        height: 500px;
    }

    .timeline-list {
        width: 100%;
    }

    .countdown {
        flex-wrap: wrap;
    }

    .count-box {
        min-width: 100px;
    }
}

/* =========================================
   RESPONSIVE — SMALL MOBILE
========================================= */

@media (max-width: 600px) {
    .container,
    .container.narrow,
    .narrow {
        width: min(92%, 720px);
    }

    .section {
        padding: 80px 0;
    }

    .section-heading {
        margin-bottom: 50px;
    }

    .hero {
        padding: 100px 15px 80px;

        background-position: center;
    }

    .hero h1 {
        font-size: clamp(60px, 18vw, 85px);
    }

    .date {
        font-size: 12px;
        letter-spacing: 4px;
    }

    .location {
        font-size: 10px;
    }

    .scroll-indicator {
        bottom: 18px;
    }

    .intro {
        padding: 90px 0;
    }

    .intro p:first-of-type {
        font-size: 20px;
    }

    .countdown-section {
        padding: 80px 0;
    }

    .countdown {
        gap: 0;
    }

    .count-box {
        min-width: 25%;

        padding: 15px 5px;

        border-right: none;
    }

    .count-box span {
        font-size: 42px;
    }

    .count-box small {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .story-image {
        height: 400px;
    }

    .story-text {
        gap: 35px;
    }

    .story-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .story-item h3 {
        font-size: 29px;
    }

    .story-item p {
        font-size: 13px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .gallery-grid img {
        height: 400px;
    }

    .venue {
        min-height: 650px;

        padding: 80px 20px;
    }

    .venue-content > div {
        margin-top: 35px;
    }

    .venue h2 {
        font-size: 36px;
    }

    .radio-group {
        flex-direction: column;
    }

    .timeline-item {
        grid-template-columns: 65px 15px 1fr;

        gap: 15px;
    }

    .timeline-item:not(:last-child)::after {
        left: 72px;
    }

    .timeline-time {
        font-size: 10px;
    }

    .timeline-item h3 {
        font-size: 25px;
    }

    .timeline-item p {
        font-size: 12px;
    }

    footer {
        padding: 65px 20px;
    }

    footer h2 {
        font-size: 45px;
    }
}

/* =========================================
   VERY SMALL SCREENS
========================================= */

@media (max-width: 380px) {
    .hero h1 {
        font-size: 58px;
    }

    .date {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .count-box span {
        font-size: 35px;
    }

    .count-box small {
        font-size: 7px;
    }

    .story-image {
        height: 350px;
    }

    .gallery-grid img {
        height: 350px;
    }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
