/* AUTORIUM landing — custom styles (Tailwind CDN loads separately) */

html {
    scroll-padding-top: 5.25rem;
    scroll-padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
    html {
        scroll-padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    }
}

/* 고정 하단 바 높이만큼 푸터 배경(네이비)을 이어 올려 크림색 빈 여백 제거 */
.footer-with-fixed-clear {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
    .footer-with-fixed-clear {
        padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    }
}

/* 모바일: 단어 단위 줄바꿈·가독성·섹션 문단 여백 */
@media (max-width: 767px) {
    body {
        word-break: keep-all;
        overflow-wrap: break-word;
        line-height: 1.55;
    }

    section .max-w-container-max-width .text-center > h2,
    section .max-w-container-max-width .text-center > h1 {
        text-wrap: balance;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        margin-left: auto;
        margin-right: auto;
        max-width: 22rem;
    }

    section .max-w-container-max-width .text-center > p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        max-width: 22rem;
        padding-top: 0.5rem;
        padding-bottom: 0.85rem;
        line-height: 1.7;
    }

    /* text-center 안에 mb-* 래퍼가 있는 블록(프로모션 등) */
    section .max-w-container-max-width .text-center [class*="mb-"] > h2.font-headline-lg,
    section .max-w-container-max-width .text-center [class*="mb-"] > p.font-body-lg,
    section .max-w-container-max-width .text-center [class*="mb-"] > p.font-body-md {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        max-width: 22rem;
        line-height: 1.65;
    }

    section .max-w-container-max-width .text-center [class*="mb-"] > h2.font-headline-lg {
        padding-top: 0.25rem;
        padding-bottom: 0.35rem;
    }

    section .max-w-container-max-width .text-center [class*="mb-"] > p {
        padding-top: 0.45rem;
        padding-bottom: 0.75rem;
    }

    #hero .hero-copy .hero-lede {
        max-width: 19.5rem;
        padding-top: 0.2rem;
        padding-bottom: 0;
        margin-bottom: 0;
        line-height: 1.62;
    }

    /* 모바일 히어로: 이미지 하단 여백 제거 → 섹션 하단에 맞닿게 */
    #hero .hero-visual {
        line-height: 0;
    }

    #hero .hero-copy h1 > span.flex .hero-title-mobile {
        max-width: 18rem;
        margin-left: auto;
        margin-right: auto;
    }

    #hero .hero-copy h1 > span.hidden {
        max-width: none;
    }

    /* 모바일 히어로: 다중 텍스트 그림자로 대비·입체감 */
    .hero-mobile-headline-shade {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.98),
            0 2px 4px rgba(4, 22, 62, 0.14),
            0 4px 14px rgba(0, 88, 180, 0.18),
            0 8px 26px rgba(0, 122, 255, 0.09);
    }

    .hero-mobile-headline-shade--accent {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.88),
            0 2px 6px rgba(0, 55, 140, 0.32),
            0 5px 18px rgba(0, 122, 255, 0.26),
            0 10px 30px rgba(0, 90, 200, 0.11);
    }

    .hero-mobile-lede-shade {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.96),
            0 2px 5px rgba(30, 41, 59, 0.12),
            0 4px 12px rgba(15, 75, 140, 0.1);
    }

    .hero-mobile-badge-shade {
        box-shadow:
            0 2px 8px rgba(0, 85, 180, 0.2),
            0 6px 18px rgba(0, 122, 255, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.65);
    }
}

@media (min-width: 768px) {
    /* 데스크톱: 전역 .text-center > h1 max-width가 큰 히어로 제목을 막지 않도록 */
    #hero .hero-copy h1 {
        max-width: none;
    }

    /* PC: 리드 카피 한 줄 + 좁은 화면에서도 줄바꿈 없이 들어가도록 글자 크기 유연 조정 */
    #hero .hero-copy .hero-lede {
        white-space: nowrap;
        font-size: clamp(0.9375rem, 0.55vw + 0.78rem, 1.375rem);
        letter-spacing: -0.02em;
    }
}

/* 히어로 인물 이미지 — 텍스트와 겹치지 않도록 비율 유지·높이 제한 + 은은한 부유감 */
.hero-bg-img {
    max-height: min(46vh, 380px);
    animation: hero-bg-float 11s ease-in-out infinite;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-img {
        animation: none;
        will-change: auto;
    }
}

@keyframes hero-bg-float {
    0%,
    100% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(7px, -9px);
    }

    40% {
        transform: translate(-8px, -6px);
    }

    60% {
        transform: translate(-6px, 8px);
    }

    80% {
        transform: translate(8px, 5px);
    }
}

@media (min-width: 768px) {
    /* PC: 이미지 하단 = 히어로 하단선 정렬(그리드 열 stretch + flex-end), 세로 높이 억제 */
    #hero .hero-visual {
        line-height: 0;
    }

    .hero-bg-img {
        max-height: min(38vh, 340px);
        object-position: center 58%;
    }
}

/* 컬러 배경 섹션 — 상·하단 흰색 페이드 (그라데이션 강도↑·어느 방향이든 밝은 섹션과 연결) */
.section-edge-fade-top,
.section-edge-fade-bottom {
    pointer-events: none;
    position: absolute;
    inset-inline: 0;
    z-index: 0;
    height: clamp(9rem, 30vmin, 16rem);
}

.section-edge-fade-top {
    top: 0;
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        rgba(255, 255, 255, 0.94) 18%,
        rgba(255, 255, 255, 0.72) 42%,
        rgba(255, 255, 255, 0.28) 78%,
        transparent 100%
    );
}

.section-edge-fade-bottom {
    bottom: 0;
    top: auto;
    background: linear-gradient(
        to top,
        #ffffff 0%,
        rgba(255, 255, 255, 0.94) 18%,
        rgba(255, 255, 255, 0.72) 42%,
        rgba(255, 255, 255, 0.28) 78%,
        transparent 100%
    );
}

@media (min-width: 768px) {
    .section-edge-fade-top,
    .section-edge-fade-bottom {
        height: clamp(11rem, 26vw, 19rem);
    }
}

@keyframes vertical-scroll-feed {
    0%, 8% { transform: translateY(0); }
    10%, 18% { transform: translateY(-580px); }
    20%, 28% { transform: translateY(-1160px); }
    30%, 38% { transform: translateY(-1740px); }
    40%, 48% { transform: translateY(-2320px); }
    50%, 58% { transform: translateY(-2900px); }
    60%, 68% { transform: translateY(-3480px); }
    70%, 78% { transform: translateY(-4060px); }
    80%, 88% { transform: translateY(-4640px); }
    90%, 98% { transform: translateY(-5220px); }
    100% { transform: translateY(-5800px); }
}

.animate-vertical-scroll {
    animation: vertical-scroll-feed 20s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scroll-snap {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5%); }
}

.animate-scroll {
    animation: scroll-snap 10s ease-in-out infinite;
    width: 100%;
    height: 100%;
}

.gold-gradient {
    background: linear-gradient(135deg, #F29600 0%, #D48400 100%);
}

.text-gold {
    color: #F29600;
}

.bg-gold {
    background-color: #F29600;
}

.mobile-mockup {
    position: relative;
    width: 320px;
    height: 650px;
    background: #000;
    border: 12px solid #1b1c1c;
    border-radius: 45px;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.mobile-mockup::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #1b1c1c;
    border-radius: 20px;
    z-index: 20;
}

.mobile-screen-content {
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
    position: relative;
}

/* Header — logo.png 실루엣 + 배경색으로 진한 네이비(#04163e) 고정 (밝은색·투명 배경 PNG에 적합) */
.site-logo-navy {
    display: block;
    flex-shrink: 0;
    height: 2.75rem;
    width: min(260px, 52vw);
    background-color: #04163e;
    -webkit-mask-image: url("logo.png");
    mask-image: url("logo.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left center;
    mask-position: left center;
}

@media (min-width: 768px) {
    .site-logo-navy {
        height: 3.25rem;
        width: min(300px, 52vw);
    }
}

@media (min-width: 1024px) {
    .site-logo-navy {
        height: 3.5rem;
        width: min(340px, 52vw);
    }
}

/* Footer — 동일 logo.png, 다크 배경용 화이트 실루엣 */
.footer-brand-logo {
    display: block;
    flex-shrink: 0;
    height: 2.5rem;
    width: min(240px, 72vw);
    background-color: #ffffff;
    -webkit-mask-image: url("logo.png");
    mask-image: url("logo.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center center;
    mask-position: center center;
}

@media (min-width: 768px) {
    .footer-brand-logo {
        height: 2.75rem;
        width: min(280px, 100%);
        -webkit-mask-position: left center;
        mask-position: left center;
    }
}

.partner-logo-img {
    display: block;
    height: 2.75rem;
    width: auto;
    max-width: min(220px, 46vw);
    object-fit: contain;
}

@media (min-width: 768px) {
    .partner-logo-img {
        height: 3.25rem;
        max-width: 240px;
    }
}

/* 헤더 네비 링크 가독성 */
.nav-item {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #45464e;
    white-space: nowrap;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
    color: #04163e;
    border-bottom-color: #0039e3;
}

@media (min-width: 1024px) {
    .nav-item {
        font-size: 0.875rem;
    }
}

/* 제휴사 무한 가로 마퀴 */
.partner-marquee-wrap {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
}

.partner-track {
    display: flex;
    width: max-content;
    animation: partner-marquee-x 42s linear infinite;
}

.partner-marquee-wrap:hover .partner-track {
    animation-play-state: paused;
}

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

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

/* 제휴 마퀴: 로고 이미지(SVG/PNG 등), 파일명만 바꿔 교체 가능 */
.partner-logo-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.partner-logo-slot .partner-logo-img {
    max-width: min(220px, 46vw);
}

@media (min-width: 768px) {
    .partner-logo-slot .partner-logo-img {
        max-width: 240px;
    }
}

/* 고정 하단 바 — 모바일 안전영역 */
.fixed-bar-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 스크롤 진입 시 섹션 등장 */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(2rem);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.is-inview {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .live-inquiry-track {
        animation: none !important;
    }
}

/* 실시간 상담문의 더미 — 아래→위 무한 스크롤 */
.live-inquiry-window {
    height: 280px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
        180deg,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        180deg,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
}

.live-inquiry-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
    animation: live-inquiry-rise 20s linear infinite;
}

@keyframes live-inquiry-rise {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%);
    }
}

.live-inquiry-list {
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.live-inquiry-window:hover .live-inquiry-track {
    animation-play-state: paused;
}

/* 렌트·리스 비교표 — 강조 레이아웃 */
.compare-matrix thead th {
    vertical-align: top;
}

.compare-matrix__head--label {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.compare-matrix__head--hero {
    background: linear-gradient(145deg, #007aff 0%, #0056c7 55%, #004cad 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.compare-matrix thead th.compare-matrix__head--hero + th.compare-matrix__head--hero {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.compare-matrix__head--muted {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-bottom: 1px solid #94a3b8;
}

.compare-matrix__head-spacer {
    height: 1.75rem;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .compare-matrix__head-spacer {
        height: 2rem;
    }
}

.compare-matrix__row-label {
    background: #fafbfc;
    width: 28%;
    min-width: 10.5rem;
    border-right: 1px solid #f1f5f9;
}

.compare-matrix__row:nth-child(even) .compare-matrix__row-label {
    background: #f8fafc;
}

.compare-matrix__cell--win {
    background: linear-gradient(180deg, rgba(0, 122, 255, 0.06) 0%, rgba(0, 122, 255, 0.03) 100%);
    border-left: 1px solid rgba(0, 122, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.compare-matrix__cell--dim {
    background: #f8fafc;
    color: #64748b;
}

.compare-matrix__check .material-symbols-outlined {
    color: #007aff;
}

.compare-matrix__row {
    transition: background-color 0.2s ease;
}

.compare-matrix__row:hover .compare-matrix__cell--win {
    background: linear-gradient(180deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 122, 255, 0.05) 100%);
}

.compare-matrix__row:hover .compare-matrix__cell--dim {
    background: #f1f5f9;
}

/* 계약후기: 모바일 가로 캐러셀 — 스크롤바 최소화 */
@media (max-width: 767px) {
    .reviews-carousel-track {
        scroll-padding-inline: 1.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .reviews-carousel-track::-webkit-scrollbar {
        display: none;
    }
}
