@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Cormorant+SC:wght@500&family=Great+Vibes&display=swap');

/* =========================================================
   «OSMON» DIZAYNI — tungi osmon, shisha kartochkalar
========================================================= */

:root {
    --accent: #e2c27d;
    --night: #070a1c;
    --night-2: #0d1230;
    --text: #efeaf7;
    --muted: rgba(226, 222, 240, 0.66);
    --glass: rgba(255, 255, 255, 0.045);
    --glass-line: rgba(255, 255, 255, 0.12);
    --serif: "Cormorant Garamond", Georgia, serif;
    --caps: "Cormorant SC", "Cormorant Garamond", serif;
    --script: "Great Vibes", cursive;
}

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

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

body {
    min-height: 100vh;
    color: var(--text);
    font-family: var(--serif);
    font-size: 18px;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, #1a1f4d 0%, transparent 60%),
        linear-gradient(180deg, #0c1030 0%, #070a1c 45%, #05060f 100%) fixed;
    -webkit-font-smoothing: antialiased;
}

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

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

/* orqadagi osmon */
#sky {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#app {
    position: relative;
    z-index: 1;
}

.kicker {
    font-family: var(--caps);
    font-size: 14px;
    letter-spacing: 0.32em;
    color: var(--accent);
}

.title {
    margin-top: 12px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.15;
    color: var(--text);
}

.lead {
    max-width: 520px;
    margin: 14px auto 0;
    font-size: 19px;
    line-height: 1.6;
    color: var(--muted);
}

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

/* =========================================================
   TIL VA MUSIQA
========================================================= */

.lang-switch {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 60;
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(7, 10, 28, 0.6);
    border: 1px solid var(--glass-line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lang-switch button {
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--caps);
    font-size: 13px;
    letter-spacing: 0.12em;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.lang-switch button.active {
    background: var(--accent);
    color: var(--night);
}

.music-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 60;
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 50%;
    border: 1px solid var(--glass-line);
    background: rgba(7, 10, 28, 0.6);
    color: var(--accent);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.music-btn svg {
    width: 20px;
    height: 20px;
}

.music-btn .bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 6px;
}

.music-btn .bars i {
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.music-btn.playing .bars i {
    animation: bar .9s ease-in-out infinite;
}

.music-btn.playing .bars i:nth-child(2) { animation-delay: .25s; }
.music-btn.playing .bars i:nth-child(3) { animation-delay: .5s; }

@keyframes bar {
    0%, 100% { height: 2px; }
    50% { height: 6px; }
}

/* =========================================================
   OCHILISH — «Osmonni ochish»
========================================================= */

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

.opening {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, #121739 0%, #1c1f4f 40%, #3a2f67 70%, #7a4c73 86%, #c98a7e 100%);
    transition: opacity 1.4s ease, transform 1.6s cubic-bezier(.6, 0, .3, 1);
}

.opening::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 84% 38%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 28% 44%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 55% 28%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 40% 8%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 8% 60%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 92% 58%, #fff 50%, transparent 51%);
    opacity: .7;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: .45; }
    50% { opacity: .9; }
}

.op-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 26px 26vh;
    text-align: center;
    animation: rise 1.4s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

.op-star {
    margin-bottom: 30px;
    font-size: 24px;
    color: #f3e3bb;
    text-shadow: 0 0 14px #f3e3bb;
}

.op-title {
    margin-top: 18px;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(36px, 11vw, 58px);
    line-height: 1.12;
}

.op-date {
    margin-top: 18px;
    font-family: var(--caps);
    font-size: 17px;
    letter-spacing: 0.3em;
    color: var(--muted);
}

.op-btn {
    margin-top: 44px;
    min-width: min(300px, 80vw);
    padding: 20px 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-family: var(--caps);
    font-size: 17px;
    letter-spacing: 0.28em;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
    animation: pulse 2.6s ease-in-out infinite;
    transition: background .3s ease;
}

.op-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
    50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.op-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-style: italic;
    font-size: 17px;
    color: var(--muted);
}

.op-hint svg {
    width: 18px;
    height: 18px;
}

.op-moon,
.hero-moon {
    position: absolute;
    left: 12%;
    bottom: 24vh;
    z-index: 1;
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 0 10px rgba(245, 236, 215, .6));
}

.crescent {
    width: 100%;
    height: 100%;
}

.skyline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 100%;
    height: 26vh;
    min-height: 150px;
}

.opening.opened {
    opacity: 0;
    transform: translateY(12%);
    pointer-events: none;
}

/* =========================================================
   BOSH QISM — yulduz turkumi
========================================================= */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 76px 16px calc(26vh + 20px);
    text-align: center;
    overflow: hidden;
}

.cons-wrap {
    width: 100%;
    max-width: 560px;
    margin-top: 10px;
}

#constellation {
    display: block;
    width: 100%;
    aspect-ratio: 900 / 860;
}

.hero-date {
    margin-top: 6px;
    font-family: var(--caps);
    font-size: clamp(28px, 8vw, 40px);
    letter-spacing: 0.12em;
    color: var(--accent);
}

.hero-sub {
    margin-top: 4px;
    font-family: var(--caps);
    font-size: 15px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero .hero-moon {
    bottom: calc(26vh - 10px);
}

/* =========================================================
   BLOKLAR VA SHISHA KARTOCHKALAR
========================================================= */

.block {
    position: relative;
    padding: 60px 16px;
    text-align: center;
}

.block > * {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.glass {
    position: relative;
    padding: 40px 24px;
    border-radius: 28px;
    background: var(--glass);
    border: 1px solid var(--glass-line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-star {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    color: #f3e3bb;
    text-shadow: 0 0 12px #f3e3bb;
}

.invite-text {
    margin-top: 20px;
    font-size: clamp(20px, 5.4vw, 25px);
    line-height: 1.55;
}

.names {
    margin-top: 28px;
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(44px, 13vw, 66px);
    line-height: 1.1;
    color: var(--text);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}

.names .amp {
    color: var(--accent);
    font-size: .7em;
}

.long-date {
    margin-top: 10px;
    font-family: var(--caps);
    font-size: 15px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.rule {
    width: 100%;
    height: 1px;
    margin: 28px auto 22px;
    background: linear-gradient(90deg, transparent, var(--glass-line), transparent);
}

.respect {
    font-style: italic;
    font-size: 19px;
    color: var(--muted);
}

.hosts {
    margin-top: 6px;
    font-size: clamp(22px, 6vw, 27px);
}

/* shu kechaning osmoni */
.sky-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
}

.sky-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 22px;
    border-radius: 22px;
    text-align: left;
}

.sky-icon {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-line);
    color: var(--accent);
    font-size: 22px;
}

.sky-icon.big {
    border: none;
}

.moon-phase {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 0 10px rgba(245, 236, 215, .35));
}

.card-kicker {
    font-family: var(--caps);
    font-size: 13px;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.card-title {
    margin-top: 4px;
    font-size: 21px;
    line-height: 1.3;
}

.card-sub {
    margin-top: 2px;
    font-style: italic;
    font-size: 16px;
    color: var(--muted);
}

/* sanoq */
.count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 28px;
}

.count-grid div {
    padding: 16px 4px 12px;
    border-radius: 18px;
    border: 1px solid var(--glass-line);
    background: rgba(255, 255, 255, 0.03);
}

.count-grid strong {
    display: block;
    font-weight: 500;
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}

.count-grid span {
    display: block;
    margin-top: 6px;
    font-style: italic;
    font-size: 15px;
    color: var(--muted);
}

.btn-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: min(290px, 80vw);
    padding: 16px 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: var(--caps);
    font-size: 15px;
    letter-spacing: 0.24em;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
}

.btn-ghost svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.btn-ghost.gold {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* dastur — yulduzlar yo'li */
.path {
    list-style: none;
    margin-top: 28px;
    text-align: left;
}

.path li {
    position: relative;
    display: grid;
    grid-template-columns: 62px 24px 1fr;
    align-items: baseline;
    padding: 12px 0;
}

.path li::before {
    content: "";
    position: absolute;
    left: 73px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.path li:first-child::before { top: 50%; }
.path li:last-child::before { bottom: 50%; }

.p-time {
    font-size: 21px;
    color: var(--accent);
    font-variant-numeric: lining-nums tabular-nums;
}

.p-dot {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px #fff, 0 0 16px color-mix(in srgb, var(--accent) 70%, transparent);
}

.p-body b {
    display: block;
    font-weight: 500;
    font-size: 21px;
}

.p-body small {
    display: block;
    margin-top: 2px;
    font-style: italic;
    font-size: 16px;
    color: var(--muted);
}

/* manzil va dress-kod */
.address {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 19px;
    line-height: 1.45;
    color: var(--muted);
}

.address svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    color: var(--accent);
}

.map-box {
    height: 240px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--glass-line);
}

.map-box iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(.9) hue-rotate(180deg) saturate(.6);
}

.rule.wide {
    margin: 34px auto 26px;
}

.dress-text {
    margin-top: 14px;
    font-size: clamp(20px, 5.4vw, 24px);
    line-height: 1.5;
}

.dress-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.dress-dots span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* tilaklar osmoni */
.rsvp-form {
    margin-top: 28px;
    text-align: left;
}

.f-label {
    display: block;
    margin: 18px 0 10px;
    font-family: var(--caps);
    font-size: 13px;
    letter-spacing: 0.26em;
    color: var(--muted);
}

.f-label i {
    font-family: var(--serif);
    letter-spacing: 0;
}

.f-input {
    display: block;
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 19px;
    outline: none;
    resize: vertical;
    transition: border-color .25s ease;
}

.f-input::placeholder {
    font-style: italic;
    color: rgba(226, 222, 240, 0.35);
}

.f-input:focus {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.radio {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    padding: 15px 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-line);
    background: rgba(255, 255, 255, 0.03);
    font-size: 20px;
    cursor: pointer;
    transition: border-color .25s ease;
}

.radio input {
    position: absolute;
    opacity: 0;
}

.radio span {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.radio input:checked + span {
    background: radial-gradient(circle, var(--accent) 0 45%, transparent 50%);
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
}

.radio:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

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

.btn-gold {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 18px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #5a3d10));
    color: #1a1407;
    font-family: var(--caps);
    font-size: 16px;
    letter-spacing: 0.3em;
    cursor: pointer;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-gold:disabled {
    opacity: .6;
    cursor: default;
}

.rsvp-message {
    min-height: 24px;
    margin-top: 16px;
    text-align: center;
    font-style: italic;
    font-size: 18px;
    color: var(--accent);
}

/* fonar */
.lantern {
    position: fixed;
    z-index: 120;
    width: 28px;
    height: 36px;
    border-radius: 12px 12px 8px 8px;
    background: radial-gradient(ellipse at 50% 60%, #fff3c9 0%, #ffb65c 45%, #c8651c 100%);
    box-shadow: 0 0 20px #ffb65c, 0 0 50px rgba(255, 182, 92, .6);
    pointer-events: none;
    animation: lantern 5.5s cubic-bezier(.3, .1, .3, 1) forwards;
}

@keyframes lantern {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    8% { opacity: 1; }
    70% { transform: translate(30px, -75vh) scale(.55); opacity: 1; }
    100% { transform: translate(40px, -95vh) scale(.12); opacity: 0; border-radius: 50%; }
}

/* yakuniy */
.final {
    position: relative;
    padding: 80px 16px 110px;
    text-align: center;
}

.names.big {
    font-size: clamp(52px, 15vw, 84px);
}

.final .hero-date {
    font-size: 22px;
}

.credit {
    display: inline-block;
    margin-top: 44px;
    font-style: italic;
    font-size: 15px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.credit-only {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 30px 20px 100px;
}

/* =========================================================
   «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(--caps);
    font-size: 34px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    user-select: none;
}

.wm-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    pointer-events: auto;
    background: rgba(239, 234, 247, 0.92);
    color: var(--night);
    text-decoration: none;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s 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; }
    .op-btn, .opening::before, .music-btn.playing .bars i, .op-inner { animation: none; }
    .opening { transition-duration: .01s; }
}

@media (max-width: 360px) {
    .count-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
