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

:root {
    --dark-navy:   #08324e;
    --mid-blue:    #224f6e;
    --light-blue:  #dff4ff;
    --font-serif:  'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --col: 402px;
}

html { scroll-behavior: smooth; }

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-serif);
    background: #fff;
    color: var(--dark-navy);
    position: relative;
}

img { display: block; }
a   { text-decoration: none; }
p   { margin: 0; }

.inner {
    max-width: var(--col);
    margin: 0 auto;
    padding: 0 38px;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 400;
    color: var(--mid-blue);
    line-height: 1.2;
    margin-bottom: 24px;
}

.section-heading small {
    font-size: 0.72em;
    display: block;
}

.section-sub-heading {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--dark-navy);
    line-height: 1.35;
    margin-bottom: 18px;
}

.first-heading {
    text-align: left;
    padding-left: 80px;
}

.body-text {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
    color: var(--dark-navy);
    line-height: 1.7;
    margin-bottom: 14px;
}

.body-text.no-mb { margin-bottom: 0; }
strong { font-weight: 700; }

.btn-primary,
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 315px;
    height: 69px;
    border-radius: 39px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s, transform 0.15s, background 0.3s ease, color 0.3s ease;
    text-decoration: none;
    margin: 0 auto;
    border: none;
}

.btn-primary  { background: var(--dark-navy); color: #fff; }
.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--dark-navy);
    color: var(--dark-navy);
}

.btn-primary:hover  { opacity: 0.85; transform: translateY(-2px); }
.btn-secondary:hover { background: var(--dark-navy); color: #fff; transform: translateY(-2px); }

.gate-screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(200,230,244,0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(200,230,244,0.3) 0%, transparent 50%),
        #f3f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 200;
}

.gate-flower {
    position: absolute;
    width: 260px;
    opacity: 0.25;
    pointer-events: none;
}

.gate-flower--tl { top: -50px; right: -50px; transform: rotate(200deg); }
.gate-flower--br { bottom: -50px; left: -50px; transform: rotate(20deg); }

.gate-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 32px;
    width: 90%;
    max-width: var(--col);
    background: #fff;
    border-radius: 28px;
    box-shadow:
        0 20px 80px rgba(8, 50, 78, 0.07),
        0 2px 6px rgba(8, 50, 78, 0.03);
    animation: fadeInUp 0.9s ease both;
}

.gate-subtitle {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--mid-blue);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.gate-names {
    font-family: var(--font-script);
    font-size: 3.7rem;
    font-weight: 400;
    color: var(--dark-navy);
    line-height: 1;
    padding: 3rem 0;
}

.gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.input-wrapper { width: 100%; max-width: 315px; }

.input-wrapper input {
    width: 100%;
    height: 60px;
    border: 1.5px solid var(--mid-blue);
    border-radius: 39px;
    padding: 0 26px;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--dark-navy);
    background: rgba(255,255,255,0.75);
    outline: none;
    text-align: center;
    letter-spacing: 0.08em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
    border-color: var(--dark-navy);
    box-shadow: 0 0 0 3px rgba(8,50,78,0.12);
}

.input-wrapper input::placeholder {
    color: rgba(8,50,78,0.4);
    letter-spacing: 0.04em;
}

.gate-error {
    font-size: 14px;
    color: #b03030;
    text-align: center;
    animation: shake 0.4s ease;
}

.gate-btn { margin-top: 6px; }

body.gate-active {
    overflow: hidden;
    height: 100vh;
}

.main-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.main-content.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.gate-screen {
    transition: opacity 0.8s ease;
}

.gate-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 600px;
    max-height: 960px;
    overflow: visible;
}

.hero-bg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    top: 0;
    height: 100%;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-tint {
    position: absolute;
    inset: 0;
}

.hero-flower {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.hero-flower--tr {
    width: clamp(180px, 65%, 280px);
    top: -100px;
    right: -110px;
    transform: rotate(-145deg);
    opacity: 0.9;
}

.hero-flower--bl {
    width: clamp(180px, 70%, 280px);
    bottom: 0;
    left: -80px;
    transform: translateY(50%) rotate(-130deg) scaleY(-1);
    opacity: 0.92;
    z-index: 10;
}

.hero-text {
    position: absolute;
    top: 9%;
    left: 8%;
    z-index: 4;
    color: var(--dark-navy);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 10vw, 40px);
    font-weight: 400;
    line-height: 1.25;
    max-width: 273px;
    margin-top: 2rem;
}

.hero-names {
    font-family: var(--font-script);
    font-size: clamp(38px, 12vw, 40px);
    color: var(--dark-navy);
    text-align: right;
    margin-top: 2rem;
    margin-left: 8rem;
}

.hero-date-block {
    position: absolute;
    top: 52%;
    left: 0;
    right: 0;
    z-index: 4;
    text-align: center;
    color: var(--dark-navy);
}

.hero-date-big {
    font-family: var(--font-script);
    font-size: clamp(38px, 13vw, 50px);
    line-height: 1.4;
}

.hero-city {
    font-family: var(--font-serif);
    font-size: clamp(18px, 6vw, 24px);
    margin-top: 2px;
}

.hero-cta {
    position: absolute;
    top: 73%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: clamp(220px, 66%, 266px);
    white-space: nowrap;
}

.hero-cta:hover {
    transform: translateX(-50%) translateY(-2px);
}

.scroll-btn {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 84px;
    height: 84px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    animation: bounceDown 1.8s ease-in-out infinite;
}

.scroll-btn svg {
    width: 84px;
    height: 84px;
    display: block;
}

.section {
    width: 100%;
    padding: 56px 38px 52px;
    max-width: var(--col);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.colored-bg.section {
    max-width: 100%;
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.second-section.colored-bg {
    margin-top: 8rem;
}

.second-section.colored-bg { min-height: 882px; }
.fourth-section.colored-bg { min-height: 1010px; }

.colored-bg {
    max-width: 100%;
    position: relative;
    overflow: visible;
    z-index: 0;
    padding-left:  max(38px, calc(50% - 163px));
    padding-right: max(38px, calc(50% - 163px));
}

.colored-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 290%;
    aspect-ratio: 1 / 1;
    background: url('assets/full_size_blue_bg.png') center / contain no-repeat;
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 400px) {
    .colored-bg::before {
        width: 340%;
    }
}

.colored-bg > * {
    position: relative;
    z-index: 1;
}

.first-section {
    padding-top: 120px;
    padding-bottom: 60px;
    margin-bottom: 20px;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    background: var(--light-blue);
    border-radius: 0 50px 50px 0;
    padding: 14px 32px 14px 50px;
    margin-left: -50px;
    margin-top: 28px;
}

.date-chip-label,
.date-chip-value {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--dark-navy);
}

.second-section { padding-top: 85px; padding-bottom: 100px; }

.section-ornament {
    display: flex;
    justify-content: flex-end;
    margin-top: -60px;
    margin-bottom: 80px;
}

.section-ornament img {
    width: 400px;
    height: auto;
}

.venue-block { margin-bottom: 48px; }
.venue-block:last-child { margin-bottom: 0; }

.venue-heading-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 14px;
    position: relative;
    padding-bottom: 8px;
}

.venue-title {
    font-family: var(--font-script);
    font-size: 32px;
    font-weight: 400;
    color: var(--mid-blue);
    white-space: nowrap;
    flex-shrink: 0;
}

.venue-underline {
    position: absolute;
    bottom: 0;
    left: 90px;
    right: 0;
    height: 1px;
    background: var(--mid-blue);
    opacity: 0.6;
}

.address-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.map-link {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.map-link:hover { opacity: 1; }
.map-link svg { width: 18px; height: 18px; display: block; }

.section-divider {
    display: flex;
    justify-content: center;
    padding: 60px 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    position: relative;
    z-index: 2;
}

.section-divider.visible { opacity: 1; }

.section-divider img { width: 175px; height: auto; }

.third-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 72px;
}

.fourth-section { padding-top: 118px; padding-bottom: 140px; }

.dresscode-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 8px;
}

.dresscode-row .body-text { flex: 1; }

.dresscode-img {
    flex-shrink: 0;
    width: 120px;
    margin-top: 2px;
}

.dresscode-underline {
    width: 100%;
    height: 1.5px;
    background: var(--mid-blue);
    opacity: 0.5;
    margin: 20px 0;
}

.fourth-flower-br {
    position: absolute;
    right: -40px;
    width: 240px;
    opacity: 1;
    pointer-events: none;
    transform: rotate(-125deg) scale(1.2);
    z-index: 10;
}

.fifth-section { padding-top: 0; padding-bottom: 5rem; }

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 3rem;
    padding-left: 0;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 15px;
    bottom: 15px;
    width: 1.5px;
    background: var(--dark-navy);
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.timeline-dot {
    flex-shrink: 0;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid var(--mid-blue);
}

.timeline-dot--outline {
    background: #ffffff;
    border: 2.5px solid var(--mid-blue);
}

.timeline-text {
    font-family: var(--font-script);
    font-size: 24px;
    color: var(--mid-blue);
    margin-bottom: 0;
}

.divider-flower-left {
    width: 240px;
    margin-left: -30px;
    margin-top: -20px;
    pointer-events: none;
    position: relative;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.divider-flower-left.visible { opacity: 1 !important; }

.divider-flower-left img {
    width: 100%;
    transform: rotate(68deg) scale(1.2);
}

.sixth-section { margin-top: 2rem !important; padding-top: 0; padding-bottom: 120px; }

.sixth-bg-flower {
    position: absolute;
    right: -60px;
    top: 40px;
    width: 380px;
    opacity: 0.13;
    pointer-events: none;
}

.sharing-block { margin-bottom: 44px; }
.sharing-block:last-of-type { margin-bottom: 0; }
.sharing-block .btn-secondary { margin-top: 12px; }

.seventh-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 72px;
    margin-top: 10rem;
}

.page-ending {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.page-ending.visible { opacity: 1; }

.ending-svg { width: 100%; height: auto; display: block; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes bounceDown {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%     { transform: translateX(-50%) translateY(9px); }
}

@media (max-width: 420px) {
    .btn-primary,
    .btn-secondary {
        width: calc(100% - 20px);
        max-width: 315px;
    }

    .gate-names { font-size: 3rem; }
}

@media (max-width: 390px) {
    .gate-content {
        padding: 2.5rem 24px 1.8rem;
    }

    .gate-names {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 28px;
        margin-top: 1rem;
    }

    .hero-names {
        font-size: 32px;
        margin-top: 1rem;
        margin-left: 5rem;
    }

    .hero-date-big {
        font-size: 34px;
    }

    .hero-city {
        font-size: 16px;
    }

    .hero-cta {
        width: clamp(180px, 60%, 240px);
        height: 56px;
        font-size: 17px;
    }

    .scroll-btn {
        width: 64px;
        height: 64px;
    }

    .scroll-btn svg {
        width: 64px;
        height: 64px;
    }

    .fifth-section {
        padding-top: 2rem !important;
    }
}

@media (min-width: 768px) {

    body {
        background:
            radial-gradient(ellipse at 20% 0%, rgba(200,230,244,0.4) 0%, transparent 60%),
            radial-gradient(ellipse at 80% 100%, rgba(200,230,244,0.3) 0%, transparent 50%),
            #f3f9fc;
        background-attachment: fixed;
    }

    .main-content {
        max-width: 560px;
        margin: 48px auto 72px;
        position: relative;
        background: #fff;
        border-radius: 28px;
        box-shadow:
            0 20px 80px rgba(8, 50, 78, 0.07),
            0 2px 6px rgba(8, 50, 78, 0.03);
        overflow: hidden;
    }

    .hero-section {
        height: 70vh;
        min-height: 520px;
        max-height: 780px;
    }

    .hero-bg {
        border-radius: 28px 28px 0 0;
    }

    .hero-title {
        font-size: 44px;
        max-width: 320px;
    }

    .hero-names {
        font-size: 52px;
        margin-left: 10rem;
    }

    .hero-date-big { font-size: 58px; }
    .hero-city { font-size: 26px; }

    .hero-cta {
        width: 270px;
        height: 66px;
        font-size: 20px;
    }

    .hero-cta:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    .scroll-btn {
        display: none;
    }

    .section {
        max-width: 100%;
        padding: 56px 52px;
    }

    .section-heading {
        font-size: 42px;
        margin-bottom: 26px;
    }

    .body-text {
        font-size: 17px;
        line-height: 1.8;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .hero-cta {
        width: 270px;
        left: 50%;
        transform: translateX(-50%);
    }

    .first-section {
        padding-top: 100px;
    }

    .first-heading {
        padding-left: 130px;
    }

    .section-sub-heading {
        font-size: 30px;
    }

    .date-chip {
        margin-left: -60px;
        padding-left: 60px;
        border-radius: 0 50px 50px 0;
    }

    .colored-bg.section {
        max-width: 100%;
        margin-top: 10rem;
        margin-bottom: 10rem;
    }

    .colored-bg::before {
        width: 200%;
    }

    .second-section.colored-bg { min-height: auto; }
    .fourth-section.colored-bg { min-height: auto; }

    .section-ornament img { width: 400px; }
    .venue-title { font-size: 34px; }

    .dresscode-img { width: 140px; }

    .fourth-flower-br {
        bottom: -160px;
    }

    .timeline {
        gap: 44px;
    }

    .timeline-dot {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .timeline-dot--outline {
        border-width: 3px;
    }

    .timeline-line {
        left: 19px;
        top: 20px;
        bottom: 20px;
        width: 2px;
    }

    .timeline-item {
        gap: 28px;
    }

    .timeline-text { font-size: 30px; }

    .fifth-section {
        padding-top: 0 !important;
    }

    .fifth-section .section-heading {
        font-size: 48px;
    }

    .section-divider { padding: 80px 0; }
    .section-divider img { width: 200px; }

    .third-section {
        padding-top: 80px;
        padding-bottom: 88px;
    }

    .fifth-section {
        padding-top: 72px;
        padding-bottom: 88px;
    }

    .seventh-section {
        margin-top: 6rem;
    }

    .page-ending {
        border-radius: 0 0 28px 28px;
        overflow: hidden;
    }

    .gate-content {
        padding: 64px 48px;
        max-width: 460px;
    }

    .gate-flower {
        width: 420px;
        opacity: 0.22;
    }

    .gate-flower--tl { top: -100px; right: -100px; }
    .gate-flower--br { bottom: -100px; left: -100px; }

    .gate-names { font-size: 4rem; }
}

@media (min-width: 1200px) {
    .main-content {
        max-width: 600px;
        margin-top: 64px;
        margin-bottom: 88px;
    }

    .hero-section {
        max-height: 820px;
    }

    .hero-title { font-size: 48px; max-width: 340px; }
    .hero-names { font-size: 46px; }

    .section {
        padding: 64px 60px;
    }

    .section-heading { font-size: 46px; }
    .body-text { font-size: 18px; }

    .gate-content {
        max-width: 500px;
        padding: 72px 56px;
    }

    .gate-names { font-size: 4.5rem; }
    .gate-flower { width: 500px; }
}
