/* ===========================================================
   Тасе — стеклянный аврора
   Чисто статический сайт. Без внешних CDN/шрифтов (надёжно в РФ).
   =========================================================== */

:root {
    /* Базовые цвета фона */
    --bg-1: #0a0410;
    --bg-2: #14081f;
    --bg-3: #1d0a2e;

    /* Цвета авроры */
    --c-rose:   #ff5fa2;
    --c-violet: #a855f7;
    --c-indigo: #6366f1;
    --c-magenta:#ff3d81;

    /* Текст */
    --text:        #fff;
    --text-soft:   rgba(255, 255, 255, 0.72);
    --text-faint:  rgba(255, 255, 255, 0.45);

    /* Стекло */
    --glass-bg:    rgba(255, 255, 255, 0.06);
    --glass-brd:   rgba(255, 255, 255, 0.14);
    --glass-hi:    rgba(255, 255, 255, 0.5);

    /* Тени / свечения */
    --glow:        0 0 60px rgba(168, 85, 247, 0.35);
    --shadow:      0 30px 80px rgba(0, 0, 0, 0.55);

    /* Тайминги */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Сброс / база ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(120% 120% at 50% 0%, var(--bg-3) 0%, var(--bg-2) 45%, var(--bg-1) 100%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Aurora-фон ---------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    display: block;
    width: 55vmax;
    height: 55vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    mix-blend-mode: screen;
    will-change: transform;
}

.orb--1 { background: var(--c-rose);    top: -18vmax;  left: -10vmax; animation: drift1 22s var(--ease) infinite alternate; }
.orb--2 { background: var(--c-violet);  top: 10vmax;   right: -18vmax; animation: drift2 26s var(--ease) infinite alternate; }
.orb--3 { background: var(--c-indigo);  bottom: -22vmax; left: 5vmax;  animation: drift3 30s var(--ease) infinite alternate; }
.orb--4 { background: var(--c-magenta); bottom: -10vmax; right: 0;     animation: drift4 24s var(--ease) infinite alternate; opacity: 0.4; }

@keyframes drift1 { from { transform: translate(0, 0)        scale(1);   } to { transform: translate(12vmax, 10vmax)  scale(1.2); } }
@keyframes drift2 { from { transform: translate(0, 0)        scale(1.1); } to { transform: translate(-10vmax, 14vmax) scale(0.9); } }
@keyframes drift3 { from { transform: translate(0, 0)        scale(0.9); } to { transform: translate(14vmax, -12vmax) scale(1.25);} }
@keyframes drift4 { from { transform: translate(0, 0)        scale(1.2); } to { transform: translate(-8vmax, -10vmax) scale(0.95);} }

/* Лёгкое зерно, чтобы фон не выглядел «пластиковым» */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Сцена ---------- */
.stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
}

/* ---------- Стеклянная карточка ---------- */
.card {
    position: relative;
    width: 100%;
    max-width: 540px;
    padding: clamp(32px, 7vw, 56px) clamp(24px, 6vw, 48px);
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-brd);
    border-radius: 28px;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    box-shadow: var(--shadow), var(--glow);
    overflow: hidden;
}

/* Верхняя световая кромка стекла */
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-hi), transparent);
}

/* Лёгкое блик-пятно внутри карточки */
.card::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
    transform: rotate(-15deg);
    pointer-events: none;
}

/* ---------- Текст внутри ---------- */
.eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.title {
    margin: 0 0 30px;
    font-size: clamp(56px, 16vw, 104px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #fff 0%, #ffd9ea 30%, #d7b4ff 60%, #fff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 8s linear infinite;
}

@keyframes shimmer {
    from { background-position: 0% 0; }
    to   { background-position: 200% 0; }
}

/* ---------- Комплимент (typewriter) ---------- */
.compliment {
    min-height: 3em;
    margin: 0 0 36px;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-soft);
    word-break: break-word;
}

.compliment__text { white-space: pre-wrap; }

.compliment__cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--c-rose);
    font-weight: 400;
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---------- Кнопка ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    background: linear-gradient(120deg, var(--c-magenta), var(--c-violet));
    border: none;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 8px 30px rgba(255, 61, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow:
        0 12px 40px rgba(255, 61, 129, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.btn:active { transform: translateY(0) scale(0.98); }

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

.btn__arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.25s var(--ease);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

/* Счётчик под кнопкой */
.counter {
    margin: 22px 0 0;
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ---------- Появление при загрузке ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    animation: reveal 0.9s var(--ease) 0.15s forwards;
}

@keyframes reveal {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Блок галереи ---------- */
.gallery-block {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 920px;
    margin: 40px auto 0;
    padding: 0 8px;
    text-align: center;
    /* второй reveal чуть позже */
    animation-delay: 0.5s;
}

.gallery-title {
    margin: 0;
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #fff, #ffd9ea 40%, #d7b4ff 70%, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gallery-sub {
    margin: 8px 0 36px;
    font-size: 15px;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.gallery-empty {
    padding: 48px 16px;
    font-size: 17px;
    color: var(--text-faint);
}

/* ---------- Полароиды ---------- */
.polaroids {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 14px;
}

.polaroid {
    position: relative;
    width: 200px;
    background: #f7f3ee;
    padding: 12px 12px 44px;
    border-radius: 4px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), z-index 0s 0.45s;
    transform: rotate(var(--rot, 0deg));
    /* лёгкое появление */
    opacity: 0;
    animation: polIn 0.7s var(--ease) forwards;
}

@keyframes polIn {
    from { opacity: 0; transform: rotate(var(--rot, 0deg)) translateY(30px) scale(0.9); }
    to   { opacity: 1; transform: rotate(var(--rot, 0deg)) translateY(0) scale(1); }
}

.polaroid img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 2px;
    background: #1d0a2e;
}

/* При наведении карточка выпрямляется, поднимается наверх и увеличивается */
.polaroid:hover {
    z-index: 10;
    transform: rotate(0deg) scale(1.08) translateY(-6px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 95, 162, 0.4);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), z-index 0s 0s;
}

.polaroid:focus-visible {
    outline: 3px solid var(--c-rose);
    outline-offset: 4px;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 2, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    animation: fadeIn 0.3s ease forwards;
}

.lightbox[hidden] { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox__figure {
    margin: 0;
    max-width: 90vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.4s var(--ease) forwards;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.lightbox__img {
    max-width: 90vw;
    max-height: 86vh;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255, 95, 162, 0.4);
    transform: scale(1.1);
}

.lightbox__close { top: 20px; right: 24px; width: 44px; height: 44px; }
.lightbox__nav   { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 36px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.1); }

/* ---------- Адаптив полароидов ---------- */
@media (max-width: 520px) {
    .polaroid { width: 150px; padding: 9px 9px 38px; }
    .polaroid img { height: 150px; }
    .polaroid .caption { font-size: 12px; }
    .lightbox__nav { width: 42px; height: 42px; font-size: 28px; }
    .lightbox__close { width: 38px; height: 38px; font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .orb, .title, .reveal { animation: none !important; }
    .reveal { opacity: 1; transform: none; }
    .compliment__cursor { animation: none; opacity: 0.7; }
    .polaroid { animation: none; opacity: 1; }
    .lightbox, .lightbox__figure { animation: none; }
}
