
/* =====================================================
   FISH CLUB WEDDING
   Vintage editorial / modern wedding invitation
   Complete stylesheet
===================================================== */

/* ================= ROOT ================= */

:root {
    --paper: #eee5d4;
    --cream: #f8f3e9;
    --cream-dark: #e4d7c1;

    --blue: #294653;
    --blue-dark: #203c48;
    --blue-light: #718894;

    --rust: #a65e46;
    --muted: #526b70;
    --ink: #302b25;

    --line: rgba(41, 70, 83, .18);

    --serif: "Playfair Display", Georgia, serif;
    --sans: "DM Sans", Arial, sans-serif;
    --mono: "DM Mono", monospace;

    --padding: clamp(20px, 5vw, 75px);

    --shadow: 0 15px 40px rgba(48,43,37,.12);
	/* Ширина центральной области */
    --background-width: 1300px;
}

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

* {
    box-sizing: border-box;
}

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

body {
    position: relative;
    isolation: isolate;

    margin: 0;
    min-height: 100vh;

    background: var(--paper);
    color: var(--blue);

    font-family: var(--sans);

    overflow-x: hidden;
}

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

button {
    color: inherit;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

/* ================= ORIGINAL FISH BACKGROUND ================= */

/*
   Важно:
   Фон теперь прокручивается вместе со страницей.
   Изображение всегда занимает всю ширину.
   На больших экранах не обрезается по бокам.
*/

body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-color: var(--paper);

    background-image:
        linear-gradient(
            rgba(238, 229, 212, .40),
            rgba(238, 229, 212, .40)
        ),
        var(--page-background, url("../assets/fish-background-original.png"));

    background-repeat:
        no-repeat,
        repeat-y;

    background-position:
        center,
        center top;

    background-size:
        100% 100%,
        min(100vw, var(--background-width)) auto;
}

/* ================= GRAIN ================= */

.grain {
    position: fixed;
    inset: 0;

    z-index: 80;
    pointer-events: none;

    opacity: .055;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= TYPOGRAPHY ================= */

.eyebrow,
.section-label,
.hero-top,
.hero-bottom,
.btn,
.nav-links,
.language-btn,
.music-btn {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 10px;
}

.section-label,
.eyebrow {
    color: var(--rust);
}

h1, h2, h3, h4, p {
    text-wrap: pretty;
}

.hero-content,
.story-text,
.section-heading,
.rsvp-intro,
.detail-card,
.map-sidebar,
.timeline {
    text-shadow: 0 1px 1px rgba(248,243,233,.35);
}

/* ================= PRELOADER ================= */

.preloader {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: grid;
    place-items: center;

    overflow: hidden;

    background: var(--paper);
    color: var(--blue);

    opacity: 1;
    visibility: visible;

    transition:
        opacity .9s cubic-bezier(.7,0,.2,1),
        visibility .9s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    width: min(520px, 90vw);
    text-align: center;
    position: relative;
}

.loader-topline {
    font: 9px var(--mono);
    letter-spacing: .3em;
    color: var(--muted);
    margin-bottom: 30px;
}

.fish-meeting {
    position: relative;

    height: 130px;

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

.loader-fish {
    position: absolute;

    width: min(205px, 39vw);

    overflow: visible;

    opacity: .9;
    color: var(--blue-light);
}

.fish-left {
    left: 50%;

    animation:
        fishSwimLeft 2.5s cubic-bezier(.2,.7,.2,1) forwards;
}

.fish-right {
    right: 50%;

    animation:
        fishSwimRight 2.5s cubic-bezier(.2,.7,.2,1) forwards;
}

.fish-tail {
    transform-box: view-box;
    transform-origin: 43px 60px;

    animation: tailWag .34s ease-in-out infinite alternate;
}

.fish-body {
    transform-box: fill-box;
    transform-origin: center;

    animation: bodyFloat 1.5s ease-in-out infinite alternate;
}

.loader-heart {
    position: absolute;
    left: 50%;
    top: 50%;

    color: var(--rust);
    font-size: 25px;

    opacity: 0;

    transform: translate(-50%,-50%) scale(.2);

    animation: heartAppear .7s ease 1.9s forwards;
}

.loader-logo {
    margin-top: 12px;

    font: 52px var(--serif);
    letter-spacing: -.04em;

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

.loader-logo span {
    color: var(--rust);
    font-style: italic;
}

.loader-caption {
    margin: 12px 0 35px;

    font: 9px var(--mono);
    letter-spacing: .2em;

    color: var(--muted);
}

.loader-progress {
    height: 2px;
    width: 180px;
    max-width: 65%;

    margin: auto;

    background: rgba(41,73,87,.15);
    overflow: hidden;
}

.loader-progress-fill {
    height: 100%;
    width: 0;

    background: var(--rust);

    animation: loaderProgress 2.5s ease forwards;
}

.loader-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-top: 16px;

    font: 8px var(--mono);
    letter-spacing: .1em;

    color: var(--muted);
}

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

.navbar {
    position: absolute;
    z-index: 100;

    top: 0;
    left: 0;

    width: 100%;
    min-height: 74px;

    padding: 0 var(--padding);

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

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

    background: rgba(238,229,212,.35);
    backdrop-filter: blur(5px);
}

.logo {
    flex: 0 0 auto;

    color: var(--blue-dark);

    font: 24px var(--serif);
    letter-spacing: .04em;

    text-decoration: none;
}

.logo span {
    color: var(--rust);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(12px,2.4vw,30px);
}

.nav-links a {
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;

    transition: color .2s;
}

.nav-links a:hover {
    color: var(--rust);
}

.nav-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
}

.language-btn {
    min-width: 39px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid rgba(41,73,87,.4);

    background: rgba(248,243,233,.45);
    color: var(--blue-dark);

    cursor: pointer;

    transition: .2s;
}

.language-btn:hover {
    background: var(--blue);
    color: var(--cream);
}

.music-btn {
    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: var(--blue);
    color: var(--cream);

    cursor: pointer;

    transition: .2s;
}

.music-btn:hover {
    transform: rotate(12deg) scale(1.05);
}

.music-btn.playing {
    background: var(--rust);
}

.music-btn[hidden] {
    display: none;
}

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

.hero {
    min-height: 100svh;

    display: grid;
    place-items: center;

    text-align: center;

    padding: 120px 20px 90px;

    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse at center,
            rgba(248,243,233,.96) 0%,
            rgba(248,243,233,.80) 38%,
            rgba(248,243,233,.30) 72%,
            transparent 100%
        );
}

.hero-top,
.hero-bottom {
    position: absolute;

    left: var(--padding);
    right: var(--padding);

    display: flex;
    justify-content: space-between;
    gap: 15px;

    color: var(--ink);
}

.hero-top {
    top: 98px;
}

.hero-bottom {
    bottom: 25px;
}

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

    padding: 20px;
}

.hero-names {
    display: flex;
    flex-direction: column;
    align-items: center;

    font: 400 clamp(75px,14vw,170px)/.78 var(--serif);
    letter-spacing: -.08em;

    margin: 35px 0;

    color: var(--blue-dark);

    text-shadow: 0 2px 8px rgba(248,243,233,.65);
}

.hero-names em {
    color: var(--rust);

    font: italic clamp(48px,7vw,90px) var(--serif);

    margin: 8px 0;
}

.hero-subtitle {
    font: italic clamp(20px,2.5vw,28px) var(--serif);
    color: var(--ink);
}

.hero-date {
    font: 12px var(--mono);
    letter-spacing: .25em;

    margin-top: 22px;
    color: var(--blue-dark);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 38px;
}

.hero-stamp {
    position: absolute;

    left: 8%;
    bottom: 18%;

    width: 78px;
    height: 78px;

    border: 1px solid var(--rust);
    border-radius: 50%;

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

    color: var(--rust);

    rotate: -12deg;
}

.hero-stamp small {
    font: 8px var(--mono);
}

.hero-stamp b {
    font: 22px var(--serif);
}

/* ================= BUTTONS ================= */

.btn {
    border: 1px solid var(--blue);

    padding: 15px 21px;

    display: inline-flex;
    gap: 15px;

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

    text-decoration: none;
    cursor: pointer;

    transition: .3s;
}

.btn-primary {
    background: var(--blue);
    color: var(--cream);
}

.btn-primary:hover {
    background: var(--rust);
    border-color: var(--rust);
    transform: translateY(-3px);
    box-shadow: 5px 5px rgba(41,73,87,.12);
}

.btn-outline {
    background: rgba(248,243,233,.6);
    color: var(--blue-dark);
}

.btn-outline:hover {
    background: var(--blue);
    color: white;
}

/* ================= TICKER ================= */

.ticker {
    position: relative;
    z-index: 2;

    background: var(--blue-dark);
    color: var(--cream);

    padding: 14px 0;

    overflow: hidden;
    white-space: nowrap;

    font: 11px var(--mono);
    letter-spacing: .15em;
}

.ticker div {
    width: max-content;
    animation: ticker 35s linear infinite;
}

/* ================= COMMON SECTIONS ================= */

.section {
    position: relative;

    width: min(1250px,calc(100% - var(--padding)*2));

    margin: auto;

    padding: clamp(44px,5vw,72px) 0;
}

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

    gap: 80px;

    align-items: center;
    margin-top: 35px;
}

.story-text h2,
.section-heading h2,
.rsvp-intro h2 {
    font: 400 clamp(48px,8vw,100px)/.95 var(--serif);
    letter-spacing: -.06em;

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

.story-text h2 em,
.section-heading h2 em,
.rsvp-intro h2 em {
    color: var(--rust);
}

.large-text {
    font: 28px/1.4 var(--serif);
    color: var(--ink);
}

.body-text {
    font-size: 13px;
    line-height: 1.9;
    color: #504b42;
}

.text-link {
    display: inline-block;

    margin-top: 22px;
    padding-bottom: 6px;

    text-decoration: none;
    border-bottom: 1px solid var(--blue);

    font: 10px var(--mono);
}

/* ================= PHOTOS ================= */

.photo-container {
    background: #d8c9ae;

    padding: 13px;

    transform: rotate(2deg);

    box-shadow: var(--shadow);

    position: relative;
}

.photo-container img {
    width: 100%;
    height: 460px;

    object-fit: cover;
    display: block;
}

.photo-container p {
    text-align: center;
    font: italic 18px var(--serif);
    color: var(--ink);
}

.photo-tape {
    position: absolute;

    top: -13px;
    left: 25%;

    background: #ddc9a8;

    padding: 7px 18px;

    rotate: -4deg;

    font: 8px var(--mono);
}

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

.countdown-section {
    position: relative;

    padding: 48px 20px;

    background: var(--blue-dark);
    color: var(--cream);

    text-align: center;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: clamp(10px,4vw,50px);

    margin: 28px 0;
}

.countdown strong {
    display: block;

    font: clamp(40px,8vw,90px) var(--serif);
    font-variant-numeric: tabular-nums;
}

.countdown small {
    display: block;

    font: 9px var(--mono);
    letter-spacing: .15em;

    color: #e0d5c5;
}

.countdown span {
    font: 35px var(--serif);
    color: var(--rust);
}

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

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    gap: 30px;
    margin-bottom: 45px;
}

.section-heading > p {
    max-width: 350px;

    color: #504b42;

    font-size: 13px;
    line-height: 1.8;
}

.gallery-grid {
    display: grid;

    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 230px 220px;

    gap: 12px;
}

.gallery-item {
    position: relative;

    border: 0;
    padding: 0;

    overflow: hidden;
    cursor: pointer;

    background: #cabb9e;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .7s;
}

.gallery-item:hover img {
    transform: scale(1.07);
}

.gallery-item span {
    position: absolute;

    bottom: 14px;
    left: 14px;

    color: white;

    font: 9px var(--mono);

    z-index: 1;
    text-shadow: 0 2px 5px #000;
}

.gallery-item::after {
    content: "";

    position: absolute;
    inset: 45% 0 0;

    background: linear-gradient(transparent,#102d3b88);
}

.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
    margin-top: 20px;
}

.gallery-footer p {
    font-size: 12px;
    color: var(--muted);
}

.gallery-footer input {
    display: none;
}

/* ================= DETAIL CARDS ================= */

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.detail-card {
    position: relative;

    min-height: 260px;
    padding: 40px;

    background: rgba(248,243,233,.88);
    border: 1px solid var(--line);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition: .3s;
}

.detail-card:hover {
    box-shadow: 7px 7px rgba(41,73,87,.12);
    background: var(--cream);
    transform: translateY(-3px);
}

.detail-label {
    font: 10px var(--mono);
    color: var(--rust);
    letter-spacing: .15em;
}

.detail-card h3 {
    font: 36px var(--serif);
    font-weight: 400;
    color: var(--blue-dark);
}

.detail-card p {
    font-size: 12px;
    color: #504b42;
    line-height: 1.7;
}

.detail-number {
    position: absolute;

    bottom: 0;
    right: 20px;

    font: 70px var(--serif);
    color: rgba(41,73,87,.08);
}

.color-palette {
    display: flex;
    gap: 9px;
}

.color-palette i {
    width: 27px;
    height: 27px;

    border-radius: 50%;
    border: 1px solid rgba(41,73,87,.2);
}

.color-palette i:nth-child(1) { background: #d6c7ad; }
.color-palette i:nth-child(2) { background: #a9b3a5; }
.color-palette i:nth-child(3) { background: #617d83; }
.color-palette i:nth-child(4) { background: #9b7763; }
.color-palette i:nth-child(5) { background: #f2eadb; }

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

.timeline {
    max-width: 820px;
    margin: 30px auto;
}

.timeline-event {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 9px minmax(0, 1fr) 12px;
    gap: 10px;
    align-items: center;
    padding: 12px 6px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    text-align: left;
    color: var(--blue-dark);
    cursor: default;
    transition: background .25s ease;
}

.timeline-event:last-child {
    border-bottom: 1px solid var(--line);
}

.timeline-event:hover {
    background: rgba(248,243,233,.9);
}

.timeline-event time {
    font: 10px var(--mono);
}

.timeline-event i {
    height: 10px;
    width: 10px;

    border-radius: 50%;
    background: var(--rust);
}

.timeline-event b {
    display: block;
    font: clamp(16px, 1.5vw, 20px) var(--serif);
    font-weight: 400;
}

.timeline-event small {
    display: block;

    margin-top: 5px;

    color: #504b42;
    font-size: 9px;
}

.timeline-arrow {
    color: var(--rust);
    font: 12px var(--mono);
    justify-self: end;
}

.timeline-panel {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.timeline-panel h2 {
    margin: 12px 0 8px;
    color: var(--blue-dark);
    font: 32px/1.05 var(--serif);
    font-weight: 400;
}

.timeline-panel h2 em {
    color: var(--rust);
}

.timeline-panel > p {
    margin: 0 0 16px;
    color: #504b42;
    font-size: 11px;
    line-height: 1.65;
}

.timeline {
    margin-top: 14px;
}

/* ================= MAP ================= */

.map-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 14px;
}

.map-container {
    position: relative;

    height: 520px;
    min-height: 520px;

    overflow: hidden;

    background: #e8dfcf;
    border: 1px solid var(--line);
}

#weddingMap {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    min-height: 100%;
}

#weddingMap iframe {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 100%;

    border: 0;
}

.map-sticker {
    position: absolute;

    top: 16px;
    left: 16px;

    z-index: 500;

    padding: 10px;

    background: var(--cream);

    font: 9px var(--mono);
}

.map-sidebar {
    padding: 28px;

    background: rgba(248,243,233,.94);
    border: 1px solid var(--line);
}

.map-sidebar h3 {
    font: 30px var(--serif);
    font-weight: 400;
    color: var(--blue-dark);
}

.map-sidebar > p {
    font-size: 12px;
    line-height: 1.7;
    color: #504b42;
}

.location-list {
    display: grid;
    gap: 9px;
    margin-top: 18px;
}

.location-card {
    padding: 13px;

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

    cursor: default;
    transition: .25s;
}

.location-card:hover,
.location-card.active {
    background: var(--paper);
    transform: translateX(3px);
}

.location-card h4 {
    font: 19px var(--serif);
    font-weight: 400;
    margin: 8px 0 4px;
}

.location-card p,
.location-card small {
    display: block;

    color: #504b42;

    font-size: 10px;
    line-height: 1.6;
}

.location-top {
    font: 9px var(--mono);
    color: var(--rust);
}

.location-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font: 8px var(--mono);
}

.location-actions button,
.location-actions a {
    padding: 0;

    border: 0;
    border-bottom: 1px solid var(--line);

    background: none;
    color: var(--blue-dark);

    text-decoration: none;
    cursor: pointer;
}

.map-warning {
    display: block;

    color: var(--rust);

    font: 8px/1.8 var(--mono);

    margin-top: 20px;
}

.map-status {
    position: absolute;

    z-index: 600;

    left: 16px;
    right: 16px;
    bottom: 16px;

    padding: 12px 15px;

    background: rgba(248,243,233,.97);
    border: 1px solid rgba(166,94,70,.45);

    color: var(--blue-dark);

    font: 10px/1.6 var(--mono);
}

.map-status[hidden] {
    display: none;
}

.map-pin {
    width: 34px;
    height: 40px;

    border: 2px solid white;
    border-radius: 50% 50% 50% 0;

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

    transform: rotate(-45deg);

    display: grid;
    place-items: center;

    font: 10px var(--mono);

    box-shadow: 0 4px 12px #0003;
    cursor: pointer;
}

.map-pin span {
    display: block;
    transform: rotate(45deg);
}

.map-event-indicator {
    position: absolute;

    z-index: 10;

    left: 16px;
    bottom: 16px;

    max-width: calc(100% - 32px);

    padding: 12px 16px;

    background: var(--cream);
    color: var(--blue-dark);

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

    font: 9px/1.5 var(--mono);
    letter-spacing: .12em;

    box-shadow: 0 5px 20px rgba(41,73,87,.1);

    overflow-wrap: anywhere;
}

.map-empty {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;
    min-height: 300px;

    padding: 30px;

    color: var(--muted);
    text-align: center;

    font: 12px/1.7 var(--mono);
}

.map-empty code {
    color: var(--rust);
}

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

.rsvp-panel {
    background: rgba(226,213,191,.96);
    border: 1px solid var(--line);

    padding: clamp(25px,6vw,75px);

    display: grid;
    grid-template-columns: .9fr 1fr;
    gap: 60px;
}

.rsvp-intro h2 {
    margin: 25px 0;
}

.rsvp-intro p {
    font-size: 13px;
    color: #504b42;
    line-height: 1.8;
}

.heart-decoration {
    font: 120px var(--serif);
    color: rgba(166,94,70,.33);
    rotate: -14deg;
}

.rsvp form label {
    display: block;

    margin: 15px 0 7px;

    font: 9px var(--mono);
    color: var(--blue-dark);
}

.rsvp input,
.rsvp select,
.rsvp textarea {
    width: 100%;

    padding: 14px;

    background: rgba(248,243,233,.92);
    border: 1px solid rgba(41,73,87,.35);

    color: var(--blue-dark);

    outline: none;
}

.rsvp textarea {
    resize: vertical;
}

.rsvp input:focus,
.rsvp select:focus,
.rsvp textarea:focus {
    border-color: var(--rust);
    background: var(--cream);
}

.rsvp form small {
    display: block;

    margin-top: 15px;

    color: #504b42;
    line-height: 1.6;
    font-size: 10px;
}

.submit-btn {
    width: 100%;
    margin-top: 20px;
}

.submit-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* RSVP NOTE */

.form-note {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 13px;

    margin-top: 25px;
    padding-top: 19px;

    border-top: 1px solid rgba(41,73,87,.25);
}

.form-note-icon {
    color: var(--rust);
    font: 25px var(--serif);
}

.form-note-title {
    display: block;

    font: 9px var(--mono);
    letter-spacing: .15em;

    color: var(--rust);
    margin-bottom: 8px;
}

.form-note-content p {
    margin: 0;

    max-width: 390px;

    font: 11px/1.85 var(--sans);
    color: #504b42;
}

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

footer {
    text-align: center;
    padding: 80px 20px 50px;
}

.footer-fish {
    width: 150px;
    opacity: .65;
}

.footer-names {
    font: italic clamp(45px,7vw,80px) var(--serif);
    color: var(--blue-dark);
}

.footer-names i {
    color: var(--rust);
}

footer p {
    font: 10px var(--mono);
    color: var(--muted);
    letter-spacing: .15em;
}

/* ================= LIGHTBOX ================= */

.lightbox {
    position: fixed;
    inset: 0;

    z-index: 150;

    background: rgba(16,43,56,.94);

    display: grid;
    place-items: center;

    padding: 25px;

    opacity: 0;
    visibility: hidden;

    transition: .3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;

    object-fit: contain;
}

.lightbox button {
    position: absolute;

    top: 20px;
    right: 25px;

    color: white;
    background: none;
    border: 0;

    font-size: 35px;
    cursor: pointer;
}

.lightbox-open {
    overflow: hidden;
}

/* ================= TOAST ================= */

.toast {
    position: fixed;

    z-index: 180;

    left: 50%;
    bottom: 20px;

    transform: translate(-50%,15px);

    padding: 14px 20px;

    background: var(--blue-dark);
    color: white;

    font: 10px var(--mono);

    opacity: 0;
    transition: .25s;

    pointer-events: none;
}

.toast.visible {
    opacity: 1;
    transform: translate(-50%,0);
}

/* ================= CURSOR ================= */

.custom-cursor {
    position: fixed;

    z-index: 190;

    left: -50px;
    top: -50px;

    width: 17px;
    height: 17px;

    border: 1px solid var(--rust);
    border-radius: 50%;

    pointer-events: none;

    transform: translate(-50%,-50%);
    mix-blend-mode: multiply;

    transition: width .2s, height .2s;
}

.custom-cursor.hover {
    width: 38px;
    height: 38px;
}

/* ================= ANIMATIONS ================= */

@keyframes loading {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes fishSwimLeft {
    0% {
        transform: translateX(-180%);
        opacity: 0;
    }

    20% {
        opacity: .9;
    }

    75%, 100% {
        transform: translateX(calc(-100% - 38px));
        opacity: .9;
    }
}

@keyframes fishSwimRight {
    0% {
        transform: translateX(180%) scaleX(-1);
        opacity: 0;
    }

    20% {
        opacity: .9;
    }

    75%, 100% {
        transform: translateX(calc(100% + 38px)) scaleX(-1);
        opacity: .9;
    }
}

@keyframes tailWag {
    from { transform: rotate(-14deg); }
    to { transform: rotate(14deg); }
}

@keyframes bodyFloat {
    from { transform: translateY(-1px); }
    to { transform: translateY(2px); }
}

@keyframes heartAppear {
    0% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(.2);
    }

    65% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1.35);
    }

    100% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1);
    }
}

@keyframes loaderProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* ================= ACCESSIBILITY ================= */

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

/* ================= TABLET ================= */

@media(max-width: 900px) {
    .nav-links {
        gap: 12px;
        font-size: 9px;
    }

    .story-grid {
        gap: 40px;
    }

    .map-grid {
        grid-template-columns: 1fr;
    }

    .map-sidebar {
        padding: 25px;
    }

    .rsvp-panel {
        gap: 30px;
    }
}

/* ================= MOBILE ================= */

@media(max-width: 650px) {
    :root {
        --padding: 20px;
    }

    .navbar {
        min-height: 65px;
    }

    .nav-links {
        display: none;
    }

    .logo {
        font-size: 22px;
    }

    .hero {
        min-height: 90svh;
        padding: 105px 15px 75px;
    }

    .hero-top {
        top: 82px;
    }

    .hero-top,
    .hero-bottom {
        font-size: 8px;
    }

    .hero-names {
        font-size: clamp(70px,18vw,115px);
    }

    .hero-stamp {
        width: 58px;
        height: 58px;
        left: 5%;
        bottom: 12%;
    }

    .hero-stamp b {
        font-size: 17px;
    }

    .hero-stamp small {
        font-size: 6px;
    }

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

    .photo-container img {
        height: 370px;
    }

    .section-heading {
        display: block;
    }

    .section-heading > p {
        margin-top: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 180px 180px;
    }

    .gallery-item.tall {
        grid-row: span 2;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-card {
        min-height: 230px;
        padding: 28px;
    }

    .timeline-event {
        grid-template-columns: 52px 10px 1fr 10px;
        gap: 12px;
        padding: 20px 7px;
    }

    .timeline-event b {
        font-size: 20px;
    }

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

    .map-container,
    #weddingMap {
        height: 390px;
        min-height: 390px;
    }

    #weddingMap iframe {
        min-height: 390px;
    }

    .rsvp-panel {
        grid-template-columns: 1fr;
        padding: 26px 20px;
        gap: 20px;
    }

    .heart-decoration {
        font-size: 75px;
    }

    .form-note {
        grid-template-columns: 24px 1fr;
        gap: 9px;
    }

    .form-note-content p {
        font-size: 10px;
    }

    .countdown {
        gap: 10px;
    }

    .countdown strong {
        font-size: clamp(32px,9vw,50px);
    }

    .countdown small {
        font-size: 7px;
    }

    .countdown span {
        font-size: 23px;
    }

    .loader-fish {
        width: 39vw;
    }

    .loader-logo {
        font-size: 44px;
    }

    .loader-bottom {
        font-size: 7px;
    }
}

/* ================= SMALL MOBILE ================= */

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

    .hero-buttons .btn {
        width: 100%;
    }

    .gallery-grid {
        grid-template-rows: 180px 150px 150px;
    }

    .loader-bottom {
        letter-spacing: .04em;
    }
}

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

@media(prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}


/* FISH ANIMATION */

.fish-meeting {
    position: relative;
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.loader-fish {
    position: absolute;
    width: min(190px, 39vw);
    height: auto;
    overflow: visible;
    opacity: .8;
}

.fish-left {
    left: 50%;
    animation: fishSwimLeft 2.5s ease forwards;
}

.fish-right {
    right: 50%;
    transform: scaleX(-1);
    animation: fishSwimRight 2.5s ease forwards;
}

/* Хвост двигается отдельно от тела */
.fish-tail {
    transform-box: view-box;
    transform-origin: 49px 50px;
    animation: tailWag .4s ease-in-out infinite alternate;
}

@keyframes tailWag {
    from {
        transform: rotate(-12deg);
    }
    to {
        transform: rotate(12deg);
    }
}

@keyframes fishSwimLeft {
    from {
        transform: translateX(-180%);
        opacity: 0;
    }
    to {
        transform: translateX(calc(-100% - 24px));
        opacity: .85;
    }
}

@keyframes fishSwimRight {
    from {
        transform: translateX(180%) scaleX(-1);
        opacity: 0;
    }
    to {
        transform: translateX(calc(100% + 24px)) scaleX(-1);
        opacity: .85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fish-tail {
        animation: none;
    }
}


.fish-meeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loader-fish {
    width: 145px;
    height: auto;
    overflow: visible;
}

.fish-right {
    transform: scaleX(-1);
}

.fish-tail {
    transform-box: fill-box;
    transform-origin: right center;
    animation: fishTail 1.5s ease-in-out infinite alternate;
}

.fish-right .fish-tail {
    animation-delay: .3s;
}

@keyframes fishTail {
    from {
        transform: rotate(-7deg);
    }
    to {
        transform: rotate(7deg);
    }
}

.loader-heart {
    color: #a77c79;
    font-size: 17px;
    opacity: .7;
}


/* Embedded Google RSVP form */
.google-form-container {
    width: 100%;
    max-width: 680px;
	max-height: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.google-form-container iframe {
    display: block;
    width: 100%;
	height: 120%;
    border: 0;
    background: transparent;
}

@media (max-width: 650px) {
    .google-form-container iframe {
        height: 1000px;
    }
}
