/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.site-header__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translate3d(0, 0, 0);
    will-change: transform;
    z-index: -1;
}

.site-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5vw;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header__logo {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: -0.02em;
    font-size: 1rem;
}

.site-header__divider {
    width: 1px;
    height: 1rem;
    background-color: var(--color-border);
}

.site-header__heritage {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-text-dim);
    font-size: 1.125rem;
}

/* Button */
.btn-prenota {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid #f5f5ef;
    border-radius: 999px;
    background-color: #f5f5ef;
    color: #0d0d0d;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-prenota:hover {
    background-color: transparent;
    color: #f5f5ef;
}

.btn-prenota__text {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

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

/* Hero — fixed для плавного перехода к футеру */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2; /* над footer (z:1), под audit-intro (z:200) */
    background: var(--color-bg);
    will-change: transform;
}

.hero__content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 0 5vw;
}

/* Hero Title — оригинальные размеры */
.hero-title {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
    margin-top: 12vh; /* desktop: немного ниже центра */
}

.hero-title__line {
    display: block;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.hero-title__line--1 {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: clamp(3rem, 8vw, 10rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.hero-title__line--2 {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: clamp(3rem, 8vw, 10rem);
    font-weight: 500;
    margin-left: 10vw;
    letter-spacing: -0.02em;
}

.hero-title__line--3 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(4.5rem, 11vw, 13rem);
    color: var(--color-text-bone);
    font-weight: 400;
}

/* Subheading */
.hero-sub {
    position: absolute;
    bottom: 5vw;
    right: 5vw;
    max-width: 40ch;
    font-family: var(--font-sans);
    font-size: clamp(0.875rem, 1vw, 1.125rem);
    color: var(--color-text-dim);
    line-height: 1.5;
    margin: 0;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 5vw;
    left: 50%;
    transform: translateX(-50%) translate3d(0, 0, 0);
    width: 1px;
    height: 100px;
    background-color: rgba(245, 245, 239, 0.2);
    backface-visibility: hidden;
}

.scroll-indicator__line {
    width: 100%;
    height: 100%;
    background-color: var(--color-text-bone);
    transform-origin: top;
    transform: scaleY(0) translate3d(0, 0, 0);
    will-change: transform;
}

/* ============================================
   SCROLL SPACERS
   ============================================ */

/* Scroll-spazio для audit-intro (100vh) — snap точка #1 */
#audit-intro-spacer {
    height: 100vh;
    pointer-events: none;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Scroll-spazio для hero → footer (100vh) — без snap (переходное состояние) */
#hero-spacer {
    height: 100vh;
    pointer-events: none;
    background: transparent;
}

/* Pausa: hero стоит на месте пока юзер читает — snap точка #2 */
#hero-dwell {
    height: 100vh;
    pointer-events: none;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Scroll-spazio extra для третьей секции — snap точка #3 */
#footer-spacer {
    height: 100vh;
    pointer-events: none;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* ============================================
   AUDIT INTRO — Стартовый экран-шлюз
   ============================================ */

#audit-intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: #000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.2rem, 2.5vh, 2rem);

    padding: 2rem 5vw;
    overflow: hidden;

    transform-origin: center top;
    will-change: transform, opacity;
}

.audit-intro__eyebrow {
    font-family: var(--font-sans);
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    text-align: center;
}

.audit-intro__headline {
    font-family: var(--font-sans);
    font-size: clamp(1.4rem, 3.2vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text-bone);
    text-align: center;
    max-width: 22ch;
    margin: 0;
}

.phone-mockup {
    flex-shrink: 0;
}

.phone-mockup__frame {
    position: relative;
    width: clamp(130px, 20vw, 220px);
    aspect-ratio: 9 / 19.5;
    border-radius: clamp(18px, 3.2vw, 32px);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    background-color: #111;
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset,
        0 30px 80px rgba(0, 0, 0, 0.95),
        0 4px 20px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.phone-mockup__notch {
    position: absolute;
    top: clamp(8px, 1.5%, 13px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(54px, 22%, 72px);
    height: clamp(18px, 3.5%, 24px);
    background-color: #000;
    border-radius: 999px;
    z-index: 2;
}

.phone-mockup__screen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
}

.phone-mockup__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.audit-intro__scroll-hint {
    font-family: var(--font-sans);
    font-size: clamp(0.6rem, 1vw, 0.7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    animation: audit-pulse 2.5s ease-in-out infinite;
}

@keyframes audit-pulse {
    0%, 100% { opacity: 0.25; }
    50%       { opacity: 0.75; }
}

/* ============================================
   FOOTER — Section 3, fixed под hero
   ============================================ */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1; /* под hero, открывается когда hero уезжает */
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 10vh 6% clamp(60px, 8vh, 100px);
    overflow: hidden;
}

.footer-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: auto 0;
}

.footer-gallery {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: clamp(48px, 7vw, 104px);
}

.footer-manifesto {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Цитата — КРУПНЕЕ */
.footer-manifesto-quote {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.5vw, 6rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-text-bone);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    max-width: 13ch;
}

.footer-manifesto-attribution {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-dim);
}

.footer-manifesto-attribution::before {
    content: '— ';
}

.footer-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-link-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 20px;
    margin: 0 -20px;
    text-decoration: none;
    color: var(--color-text-bone);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    will-change: transform;
    transition: transform 0.2s ease;
}

.footer-link-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-text-bone);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 0;
}

.footer-link-row:hover::before,
.footer-link-row:focus-visible::before {
    transform: scaleX(1);
}

.footer-link-row:focus-visible {
    outline: none;
}

.footer-link-row > * {
    position: relative;
    z-index: 1;
    transition: color 0.35s ease;
}

.footer-link-row:hover .footer-link-label,
.footer-link-row:hover .footer-link-arrow-wrap,
.footer-link-row:focus-visible .footer-link-label,
.footer-link-row:focus-visible .footer-link-arrow-wrap {
    color: #0d0d0d;
}

.footer-link-row:active {
    transform: scale(0.985);
}

.footer-link-label {
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 600;
    letter-spacing: 0.04em;
    flex: 1;
}

.footer-link-arrow-wrap {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--color-text-bone);
}

.footer-link-arrow {
    width: 16px;
    height: 16px;
}

@keyframes footer-arrow-swap {
    0%  { transform: translate(0, 0);        opacity: 1; }
    40% { transform: translate(12px, -12px); opacity: 0; }
    41% { transform: translate(-12px, 12px); opacity: 0; }
    100%{ transform: translate(0, 0);         opacity: 1; }
}

.footer-link-row:hover .footer-link-arrow,
.footer-link-row:focus-visible .footer-link-arrow {
    animation: footer-arrow-swap 0.55s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.footer-status-bar {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: clamp(48px, 8vh, 88px);
    margin-top: auto;
    font-size: 13px;
    color: var(--color-text-dim);
}

.footer-status-bar a {
    color: var(--color-text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-status-bar a:hover {
    color: var(--color-text-bone);
}

.footer-status-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-availability {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-avail-dot {
    width: 8px;
    height: 8px;
    background: #34D399;
    border-radius: 50%;
    animation: availPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes availPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.3);
        box-shadow: 0 0 12px 4px rgba(52, 211, 153, 0.2);
    }
}

/* ============================================
   MEDIA QUERIES — MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    .site-header__content {
        padding: 1rem 5vw;
    }
    .site-header__heritage,
    .site-header__divider {
        display: none;
    }

    /* Hero title */
    .hero-title {
        margin-top: -20vh; /* mobile: выше центра */
    }
    .hero-title__line--1,
    .hero-title__line--2 {
        font-size: 11.5vw;
    }
    .hero-title__line--2 {
        margin-left: 0;
        padding-left: 10vw;
    }
    .hero-title__line--3 {
        font-size: 16vw;
    }

    /* Subheading */
    .hero-sub {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 6vh;
        max-width: 100%;
        font-size: 1rem;
    }

    /* Scroll indicator */
    .scroll-indicator {
        bottom: 4vh;
        height: 60px;
    }

    /* Audit intro */
    #audit-intro {
        gap: 1rem;
        justify-content: space-evenly;
        padding: 4rem 6vw 2rem;
    }
    .audit-intro__headline {
        font-size: clamp(1.2rem, 5.2vw, 1.65rem);
        max-width: 28ch;
    }
    .phone-mockup__frame {
        width: clamp(110px, 40vw, 170px);
    }

    /* Footer */
    .site-footer {
        min-height: auto;
        padding: 64px 5% 32px;
    }
    .footer-gallery {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-manifesto-quote {
        max-width: none;
    }
    .footer-link-row {
        padding: 22px 16px;
        margin: 0 -16px;
    }
    .footer-status-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding-top: 40px;
    }
    .footer-status-left {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .audit-intro__headline {
        font-size: 5vw;
    }
}
