@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;1,6..96,400&family=Manrope:wght@300;400;500;600&family=Amiri&display=swap');

/* =========================================================
   «ZAMONAVIY» DIZAYNI — jurnal uslubi, to'q fon, bitta aksent rang
========================================================= */

:root {
    --accent: #c8a97e;
    --bg: #14120f;
    --bg-2: #1c1915;
    --paper: #f2ede5;
    --ink: #1b1814;
    --light: #efe9df;
    --muted-dark: rgba(239, 233, 223, 0.62);
    --muted-light: rgba(27, 24, 20, 0.62);
    --line-dark: rgba(239, 233, 223, 0.16);
    --line-light: rgba(27, 24, 20, 0.14);
    --display: "Bodoni Moda", "Didot", Georgia, serif;
    --sans: "Manrope", system-ui, sans-serif;
    --arabic: "Amiri", serif;
}

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

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--light);
    font-family: var(--sans);
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font-family: inherit;
}

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

/* ---------- umumiy ---------- */

#app section {
    position: relative;
    overflow: hidden;
}

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

.light {
    background: var(--paper);
    color: var(--ink);
}

.invite,
.cal-section,
.quote-section,
.program-section,
.count-section,
.venue-section,
.rsvp-section {
    padding: 88px 24px;
}

.invite > *,
.cal-section > *,
.quote-section > *,
.program-section > *,
.count-section > *,
.venue-section > *,
.rsvp-section > * {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.kicker {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-dark);
}

.light .section-head {
    border-bottom-color: var(--line-light);
}

.light .kicker {
    color: color-mix(in srgb, var(--accent) 70%, var(--ink));
}

.section-no {
    font-family: var(--display);
    font-style: italic;
    font-size: 15px;
    color: var(--muted-dark);
}

.light .section-no {
    color: var(--muted-light);
}

.display {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(38px, 10vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.01em;
}

.state-msg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 30px;
    text-align: center;
    color: var(--muted-dark);
}

/* =========================================================
   TIL VA VINIL MUSIQA TUGMASI
========================================================= */

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 50;
    display: flex;
    gap: 2px;
}

.lang-switch button {
    border: none;
    background: transparent;
    color: var(--muted-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    padding: 6px 7px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.lang-switch button.active {
    color: var(--light);
    border-bottom-color: var(--accent);
}

.vinyl {
    position: fixed;
    left: 16px;
    top: 14px;
    z-index: 90;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.vinyl-disc {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle, var(--accent) 0 17%, #111 18% 20%, transparent 21%),
        repeating-radial-gradient(circle, #1a1a1a 0 2px, #262626 2px 3px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: spin 3.2s linear infinite;
    animation-play-state: paused;
}

.vinyl-disc::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 45%);
}

.vinyl.playing .vinyl-disc {
    animation-play-state: running;
}

/* to'xtab turganda kichik «play» belgisi */
.vinyl:not(.playing)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent var(--ink);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   OCHILISH — ikki qanotli eshik
========================================================= */

html.env-lock,
html.env-lock body {
    overflow: hidden;
}

.doors {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.door {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50.5%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--bg);
    transition: transform 1.25s cubic-bezier(.7, 0, .2, 1);
}

.door-left {
    left: 0;
    border-right: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.door-right {
    right: 0;
    border-left: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

/* ichki ingichka ramka */
.door::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: 22px;
    border: 1px solid var(--line-dark);
}

.door-left::before { left: 22px; right: 14px; border-right: none; }
.door-right::before { right: 22px; left: 14px; border-left: none; }

.door-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    transition: opacity .5s ease, transform .6s ease;
}

.door-kicker,
.door-date {
    padding: 4px 12px;
    background: var(--bg); /* eshik chizig'i yozuv ustidan o'tmasin */
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.34em;
    color: var(--muted-dark);
}

.door-date {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--light);
}

.door-btn {
    position: relative;
    width: 190px;
    height: 190px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.door-btn::before {
    content: "";
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: var(--accent);
    transition: transform .4s ease;
}

.door-btn:hover::before,
.door-btn:focus-visible::before {
    transform: scale(1.06);
}

.door-btn:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 6px;
}

.door-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: spin 16s linear infinite;
}

.door-ring text {
    font-family: var(--sans);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    fill: var(--light);
}

.door-initials {
    position: relative;
    z-index: 2;
    font-family: var(--display);
    font-size: 44px;
    line-height: 1;
    color: var(--ink);
}

.door-initials em {
    font-size: .6em;
    margin: 0 3px;
}

.doors.open .door-left { transform: translateX(-101%); }
.doors.open .door-right { transform: translateX(101%); }
.doors.open .door-center { opacity: 0; transform: scale(.9); }

/* =========================================================
   BOSH QISM
========================================================= */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 90px 24px 120px;
}

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

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05) brightness(.5);
}

/* aksent rangdagi duoton */
.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    mix-blend-mode: color;
    opacity: .45;
}

.hero-frame {
    position: absolute;
    inset: 16px 16px 70px;
    border: 1px solid var(--line-dark);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.names {
    display: flex;
    flex-direction: column;
    margin-top: 26px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(64px, 19vw, 150px);
    line-height: .92;
    letter-spacing: -0.02em;
    color: var(--light);
    word-break: break-word;
}

.names .n2 {
    align-self: flex-end;
    text-align: right;
}

.names .amp {
    align-self: center;
    margin: 4px 0;
    font-style: italic;
    font-size: .55em;
    color: var(--accent);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--line-dark);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--muted-dark);
}

.hero-meta .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.marquee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    overflow: hidden;
    background: var(--accent);
    color: var(--ink);
    padding: 13px 0;
}

.marquee-track {
    flex: 0 0 auto;
    padding-right: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    white-space: nowrap;
    animation: marquee 38s linear infinite;
}

@keyframes marquee {
    to { transform: translateX(-100%); }
}

/* =========================================================
   TAKLIF
========================================================= */

.invite .display {
    font-style: italic;
}

.lead {
    margin-top: 34px;
    font-size: 18px;
    line-height: 1.75;
    color: var(--muted-light);
}

.lead::first-letter {
    float: left;
    margin: 6px 12px 0 0;
    font-family: var(--display);
    font-size: 66px;
    line-height: .8;
    color: var(--ink);
}

.sign {
    margin-top: 30px;
    font-family: var(--display);
    font-style: italic;
    font-size: 22px;
}

/* =========================================================
   KALENDAR
========================================================= */

.calendar {
    margin-top: 40px;
    padding: 26px 20px 22px;
    border: 1px solid var(--line-dark);
}

.cal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    font-family: var(--display);
    font-size: 24px;
}

.cal-head span:last-child {
    font-size: 15px;
    font-family: var(--sans);
    letter-spacing: 0.3em;
    color: var(--muted-dark);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px 0;
    text-align: center;
}

.cal-week {
    padding-bottom: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

.cal-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    font-size: 15px;
    color: var(--muted-dark);
}

.cal-cell.is-day b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    font-weight: 600;
}

.cal-cell.is-day i {
    position: absolute;
    top: -6px;
    right: calc(50% - 26px);
    font-style: normal;
    font-size: 13px;
    color: var(--accent);
    animation: beat 1.6s ease-in-out infinite;
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.cal-time {
    margin-top: 22px;
    font-family: var(--display);
    font-style: italic;
    font-size: 20px;
    color: var(--light);
}

/* =========================================================
   IQTIBOS
========================================================= */

.quote-section {
    text-align: center;
}

.quote-section .section-head {
    text-align: left;
}

.quote-mark {
    display: block;
    height: 70px;
    font-family: var(--display);
    font-size: 130px;
    line-height: 1;
    color: var(--accent);
}

.quote-arabic {
    margin-bottom: 16px;
    font-family: var(--arabic);
    font-size: 30px;
}

.quote {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(24px, 6vw, 36px);
    line-height: 1.35;
}

.quote-source {
    margin-top: 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-light);
}

/* =========================================================
   KUN TARTIBI — jurnal jadvali
========================================================= */

.program {
    list-style: none;
}

.program-row {
    display: grid;
    grid-template-columns: 34px 78px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 22px 0;
    border-top: 1px solid var(--line-light);
}

.program-row:last-child {
    border-bottom: 1px solid var(--line-light);
}

.program-num {
    font-family: var(--display);
    font-style: italic;
    font-size: 15px;
    color: var(--muted-light);
}

.program-time {
    font-family: var(--display);
    font-size: 26px;
    color: color-mix(in srgb, var(--accent) 70%, var(--ink));
}

.program-body h3 {
    font-family: var(--display);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.2;
}

.program-body p {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted-light);
}

/* =========================================================
   SANOQ
========================================================= */

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
}

.count-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 4px 24px;
}

.count-cell + .count-cell {
    border-left: 1px solid var(--line-dark);
}

.count-cell strong {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(38px, 11vw, 72px);
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}

.count-cell span {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent);
}

/* =========================================================
   MANZIL
========================================================= */

.venue-grid {
    display: grid;
    gap: 30px;
}

.venue-photo {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    max-height: 520px;
}

.venue-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.85);
    transition: transform 1.2s ease;
}

.venue-section.visible .venue-photo img {
    transform: scale(1.04);
}

.venue-city {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    color: var(--muted-light);
}

.venue-address {
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted-light);
}

.venue-when {
    margin-top: 16px;
    font-family: var(--display);
    font-style: italic;
    font-size: 21px;
}

.pill-link,
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding: 14px 24px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.pill-link:hover,
.pill-btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.dark .pill-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.pill-btn:disabled {
    opacity: .5;
    cursor: default;
}

.map-box {
    height: 300px;
    margin-top: 40px;
    overflow: hidden;
    border: 1px solid var(--line-light);
}

.map-box iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(.3);
}

/* =========================================================
   RSVP VA TILAKLAR
========================================================= */

.rsvp-text {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted-dark);
}

.rsvp-form {
    margin-top: 34px;
}

.line-input {
    display: block;
    width: 100%;
    margin-bottom: 18px;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--line-dark);
    background: transparent;
    color: var(--light);
    font-size: 17px;
    outline: none;
    resize: none;
    transition: border-color .25s ease;
}

.line-input::placeholder {
    color: rgba(239, 233, 223, 0.4);
}

.line-input:focus {
    border-bottom-color: var(--accent);
}

.rsvp-question {
    margin: 44px 0 16px;
    font-family: var(--display);
    font-style: italic;
    font-size: 22px;
}

.rsvp-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice {
    min-height: 54px;
    padding: 12px;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    background: transparent;
    color: var(--light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

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

.choice.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.choice:disabled {
    cursor: default;
}

.rsvp-message {
    min-height: 22px;
    margin-top: 20px;
    font-size: 15px;
    color: var(--accent);
}

/* =========================================================
   YAKUNIY QISM — aksent rangli fon
========================================================= */

.final-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 90px 24px 110px;
    background: var(--accent);
    color: var(--ink);
    text-align: center;
}

.final-section .kicker {
    color: var(--ink);
    opacity: .7;
}

.final-names {
    display: flex;
    flex-direction: column;
    margin-top: 28px;
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(54px, 16vw, 120px);
    line-height: .95;
    word-break: break-word;
}

.final-names .amp {
    font-style: italic;
    font-size: .55em;
    margin: 8px 0;
}

.final-date {
    margin-top: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4em;
}

.credit {
    display: inline-block;
    margin-top: 60px;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: inherit;
    opacity: .75;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}

.credit-only {
    display: flex;
    justify-content: center;
    padding: 30px 20px 100px;
    color: var(--muted-dark);
}

.credit-only .credit {
    margin-top: 0;
}

/* =========================================================
   «NAMUNA» BELGISI
========================================================= */

.wm {
    position: fixed;
    inset: 0;
    z-index: 150;
    overflow: hidden;
    pointer-events: none;
}

.wm-words {
    position: absolute;
    inset: -60%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 70px 56px;
    transform: rotate(-30deg);
}

.wm-words span {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 34px;
    letter-spacing: 0.3em;
    color: rgba(200, 169, 126, 0.16);
    white-space: nowrap;
    user-select: none;
}

.wm-bar {
    position: fixed;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    pointer-events: auto;
    background: var(--light);
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 9px 16px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   PAYDO BO'LISH
========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s ease, transform .9s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

body.embed .hero {
    min-height: 760px;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track, .door-ring, .vinyl-disc, .cal-cell.is-day i { animation: none; }
    .door, .door-center { transition-duration: .01s; }
}

/* =========================================================
   KATTA EKRAN
========================================================= */

@media (min-width: 820px) {
    .venue-grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 44px;
    }

    .venue-grid.no-photo {
        grid-template-columns: 1fr;
    }

    .venue-section > * {
        max-width: 900px;
    }

    .hero {
        padding: 100px 60px 140px;
    }
}

@media (max-width: 380px) {
    .program-row {
        grid-template-columns: 28px 64px 1fr;
        gap: 8px;
    }

    .program-time {
        font-size: 22px;
    }

    .count-cell span {
        font-size: 8px;
        letter-spacing: 0.14em;
    }
}
