:root {

    --primary: #20D08B;
    --yellow: #FFB819;
    --main-text: #203749;
    --primary-dark: #203749;
    --text-gray: #7B8184;
    --bg-gray: #F5F6F7;
    --border-gray: #D8DBDD;
}

html, body {
    margin: 0;
    padding: 0;
    background: #F5F6F7;
}

section {
    padding: 0;
    overflow: hidden;
}
/* ---------------- 1. 스냅 컨테이너 ---------------- */
.snap-container {
    overflow-y: scroll;
}
#slide1 {
    height: 100vh;
    min-height: 910px;
}
#slide10 {
 background: #F5F6F7;
}

.snap-slide-full {
    height: calc(100% + 60px);
    overflow-x: hidden;
    position: relative;
}

.snap-slide-auto {
    height: auto;
    background-color: #ffffff;
}

/* ---------------- 2. SLIDE 1 반응형 레이아웃 ---------------- */
.figma-canvas {
    position: relative;
    width: 100%;
    height: 100%;

    /* Grid를 사용해 정확히 1:1 (50%:50%) 분할 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center; /* 세로 중앙 정렬 */
}

/* 왼쪽 영역: 목업 슬라이더 컨테이너 */
.phone-slider-wrapper {
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: 0;
    width: 100%;
    max-width: 340px;     /* 목업 고정/최대 크기 */
}

/* 오른쪽 영역: 텍스트 컨테이너 */
.title-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    letter-spacing: -1px;
    padding-left: clamp(20px, 5vw, 80px);
}

/* 메인 타이틀 스타일 */
.title-right .title-text {
    margin: 0 0 24px 0; /* 제목과 버튼 사이 간격 */
    letter-spacing: -0.03em;
    color: #ABAFB8;
    font-size: 55px;
    font-weight: 600;
    line-height: 1.2;
}

.title-right .title-text .highlight {
    color: var(--main-text);
}

/* 버튼들을 감싸는 그룹 */
.store-btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* 버튼 사이 간격 */
    flex-wrap: wrap; /* 화면이 좁아질 때 자연스럽게 줄바꿈 */
}

/* 스토어 공통 버튼 스타일 */
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background-color: #ffffff;
    border-radius: 40px;
    box-shadow: 0 0 0.8px 0 rgba(0, 0, 0, 0.15);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 버튼 호버 애니메이션 효과 */
.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

/* 버튼 내부 아이콘 및 텍스트 */
.store-btn .store-icon {
    flex-shrink: 0;
}

.store-btn .store-text {
    color: #203749;
    font-size: 15px;
    font-family: Pretendard, sans-serif;
    font-weight: 500;
    text-transform: capitalize;
    line-height: 1;
    letter-spacing: 0px;
}



/* 중앙 Swipe 배지 */
.swipe-badge {
    width: 110px;
    height: 65px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #434343;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
}

/* Floating Images (퍼센트 및 vw 기반 반응형 배치) */
.floating-img {
    position: absolute;
    transition: all 0.3s ease;
    object-fit: contain;
    pointer-events: none;
}


/* 도넛: 휴대폰 좌측 상단 외부 */
.img-donut {
    width: 135px;
    left: -51%;
    top: -8%;
    transform: rotate(-14deg);
}

.img-calendar {
    width: 130px;
    right: -166%;
    top: 1%;
    transform: rotate(9deg);
}

/* 접시: 휴대폰 좌측 하단 외부 */
.img-dish {
    width: 213px;
    left: -141px;
    bottom: -97px;
    transform: rotate(-2deg);
    z-index: 10;
}

/* 다운 화살표/그래프: 휴대폰 우측 하단 외부 */
.img-down {
    width: 192px;
    right: -86%;
    bottom: -17%;
    transform: rotate(0deg);
}

/* 체중계: 휴대폰 좌측 중앙 */
.img-weight {
    width: 160px;
    left: -113%;
    top: 57%;
    transform: translateY(-50%);
}

/* 서류/종이: 휴대폰 우측 중앙 */
.img-paper {
    width: 169px;
    right: -203%;
    top: 61%;
    transform: rotate(7deg);
}

/* ============================================================
   모바일 반응형 (768px 이하)
   ============================================================ */
@media (max-width: 768px) {
    .figma-canvas {
        /* 2열 -> 1열(세로) 배치로 변경 */
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column; /* 세로 정렬 */
        justify-content: center;
        padding: 120px 20px 0 20px;
        box-sizing: border-box;
    }

    /* 1. 텍스트 영역을 위로 (order: 1) */
    .title-right {
        order: 1;
        width: 100%;
        align-items: center;    /* 모바일에서는 중앙 정렬 */
        text-align: center;      /* 텍스트 중앙 정렬 */
        padding-left: 0;         /* PC용 padding 제거 */
        margin-bottom: 40px;     /* 아래 목업과의 간격 */
    }


    .store-btn-group {
        justify-content: center; /* 버튼들도 중앙 정렬 */
    }

    /* 2. 핸드폰 목업 영역을 아래로 (order: 2) */
    .phone-slider-wrapper {
        order: 2;
        margin: 0 auto;          /* 가로 중앙 정렬 */
        max-width: 320px;        /* 모바일 화면에 맞춰 목업 크기 살짝 축소 */
    }
    .title-right .title-text{
        font-size: 45px;
    }

    /* Floating 이미지가 모바일화면 스마트폰을 너무 가리지 않게 모서리 배치 */
    .img-donut { display: none}
    .img-calendar { display: none }
    .img-dish { display: none }
    .img-down { display: none }
    .img-weight { display: none; } /* 공간이 부족하므로 모바일에서는 일부 데코 숨김 */
    .img-paper { display: none; }

    .store-btn-group {
        gap: 7px;
    }
    .store-btn {
        padding: 14px 20px;
    }

    .store-icon {
        width: auto;
        height: 15px;
    }
    .store-btn .store-text {
        font-size: 13px;
    }
}

/* ---------------- 3. Slide 3 내부 카드 및 기본 CSS ---------------- */
.hero {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 50px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 150px;
    margin-bottom: 110px;
    line-height: 1.27;
}
.hero p {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.6;
}

.features-grid {
    max-width: 1200px;
    display: grid;
    margin: 0 auto;
    padding: 0 20px;
    grid-template-columns: repeat(1, 1fr);
    justify-content: center;
    gap: 60px 20px;
    align-items: stretch; /* ⭐️ 핵심 1: 같은 행의 feature-card 높이를 자동으로 같게 맞춤 */
}

.feature-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 정확히 1:1 반반 분할 */
    width: 100%;
    height: 100%;
    background: var(--bg-gray);
    border-radius: 20px;
    gap: 100px;
}
.feature-card-reverse {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 정확히 1:1 반반 분할 */
    width: 100%;
    height: 100%;
    flex-direction: row-reverse;
    background: var(--bg-gray);
    border-radius: 20px;
    gap: 100px;
    /* 1:1 반반 비율 설정 */
    /* 영역 위치 지정: 왼쪽(content), 오른쪽(preview) */
    grid-template-areas: "content preview";
    align-items: center;
    /* ==========================================
       2. 모바일 스타일 (768px 이하: 원래 순서대로 세로 배치)
       ========================================== */

}
.card-preview {
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 0 0 0 100px;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;

    flex: 1;
}
/* 자식 요소에 영역 이름 매핑 */
.feature-card-reverse > .card-preview {
    grid-area: preview;
    min-width: 0;
    padding: 0 100px 0 0;
}
.feature-card-reverse > .card-content {
    grid-area: content;
    min-width: 0;
    margin-left: 140px;
}

@media (max-width: 768px) {
}


.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    gap: 20px;
    margin-left: 10px;
}
/* 4. card-preview 내부 자식 요소들 (수평 배치되는 개별 UI 카드들) */
/* .card-preview 바로 밑의 자식 요소들이 높이를 100% 채우도록 함 */
.card-preview > * {
    /* 만약 자식 요소들(예: schedule-card-ui, time-setting-card-ui 등)도
       높이가 서로 똑같이 늘어나길 원한다면 설정합니다. */
    align-self: stretch;
}
.card-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 선택사항: 수평으로 쪼개지는 자식 카드 내부도 동일 높이 flex 처리 */
.card-preview.row {
    align-items: stretch; /* 수평 배열 시 자식들 높이 맞춤 */
}

/* 5. 하단 텍스트 영역 */
.card-title {
    text-align: start;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    color: #203749;
}

.card-desc {
    text-align: start;
    color: #7B8184;
    font-size: 22px;
    font-style: normal;
    font-weight: 300;
    line-height: 1.3; /* 136.364% */
    /* flex: 1인 card-preview 덕분에 이 텍스트는 항상 카드 맨 아래 바닥에 일정하게 정렬됩니다 */
}

/* footer 감싸는 섹션은 높이를 100vh로 강제하지 않고 auto 처리 */
.snap-footer-wrapper {
    height: auto !important;
    min-height: auto !important;
    scroll-snap-align: end; /* 바닥에 딱 맞추어 스냅 */
}

/* footer 내부 디자인 정리 */
.snap-footer-wrapper footer {
    width: 100%;
}

/* 1. 가로 스크롤 컨테이너 스타일 */
.review-title {
    color: #203749;
    font-size: 40px;
    font-weight: 600;
    word-wrap: break-word
}
.review-scroll-container {
    display: flex;
    gap: 20px; /* 카드 간격 */
    overflow-x: auto; /* 가로 스크롤 활성화 */
    padding: 20px 50px 0 50px; /* 그림자 잘림 방지용 여백 */
    margin-top: 60px;
    scroll-snap-type: x mandatory; /* 카드 단위로 딱딱 멈추는 스냅 효과 */
    -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */

    /* 스크롤바 숨기기 (선택 사항) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.review-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* 2. 리뷰 카드 개별 스타일 */
.review-card {
    flex: 0 0 450px; /* 카드의 기본 너비 고정 (모바일 대응용) */
    max-width: 85vw; /* 화면이 아주 작을 때 뚫고 나가는 것 방지 */
    background: #ffffff;
    border-radius: 15px;
    padding: 32px 28px 20px 28px;
    box-shadow: 0 0 0.8px 0 rgba(0, 0, 0, 0.15);

    /* Flexbox로 세로 정렬 및 공간 분배 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    scroll-snap-align: center; /* 스크롤 정지 시 중앙에 스냅 */
    transition: transform 0.2s ease;
}

/* 3. 내부 요소 스타일 */
.review-rating {
    color: #7B8184;
    font-size: 15.54px;
    font-weight: 600;
    letter-spacing: 1.55px;
    margin-bottom: 16px;
}

.review-content {
    color: #203749;
    font-size: 17px; /* 가독성을 위해 살짝 조율 (기존 21.75px) */
    font-weight: 400;
    line-height: 1.4;
    word-break: keep-all; /* 한글 단어 단위 줄바꿈 */
    margin-bottom: 73px;
}

.review-author {
    color: #7B8184;
    font-size: 14px;
    font-weight: 300;
    margin-top: auto; /* 작성자 정보를 카드 맨 아래로 밀어넣음 */
}

/* 핸드폰 베젤 이미지 (상위 계층으로 올리고 터치 통과) */
.phone-mockup {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 2; /* 화면 이미지보다 위에 위치 */
    pointer-events: none; /* 클릭/터치 이벤트를 아래 슬라이더로 전달 */
}

/* 베젤 안쪽 스크린 영역 */
.phone-screen-swiper {
    position: absolute;
    /* ⚠️ 가지고 계신 Bezel.png의 화면 여백 비율에 맞춰 %, px 조정 ⚠️ */
    top: 3.2%;
    left: 6.5%;
    width: 87%;
    height: 93.6%;

    z-index: 1; /* 베젤 밑으로 이동 */
    border-radius: 36px; /* 핸드폰 모서리 라운딩 크기에 맞춰 조정 */
    overflow: hidden;
}

/* Swiper 슬라이드 내부 이미지 */
.phone-screen-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 영역에 맞게 꽉 차도록 설정 */
    display: block;
}

b {
    font-weight: 600;
}

.card-slider-wrapper {
    width: 100%;
    padding: 0 0 150px 0;
    overflow: hidden;
}

/* Swiper 카드 레이아웃 */
.card-swiper .swiper-slide {
    width: auto; /* 플러터 코드의 카드 너비 */
    height: auto; /* 플러터 코드의 카드 높이 */
    padding-bottom: 2px;
}

/* 카드 카드 디자인 */
.img-feature-card {
    background: #ffffff;
    border-radius: 23.7px;
    box-shadow: 0px 0px 1.5px rgba(0, 0, 0, 0.15);
    display: flex;
    margin-right: 30px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 25px 35px 32px 35px;
    box-sizing: border-box;
    user-select: none;
    margin-top: 1px;
    height: 100%;
}

/* 이미지 영역 컨테이너 */
.card-img-box {
    width: 210px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img {
    max-width: 210px;
    max-height: 210px;
    object-fit: contain;
}

/* 이미지 회전 옵션 (플러터의 rotateZ 재현) */
.rotate-left {
    transform: rotate(-14deg);
}
.rotate-right {
    transform: rotate(6.3deg);
}
.rotate-right-soft {
    transform: rotate(9deg);
}

.feature-card-title {
    margin: 0;
    color: #7B8184;
    font-size: 32px;
    font-weight: 500;
    text-align: center;
    line-height: 1.25;

    /* 💡 타이틀 영역 고정 높이 및 수직 중앙 정렬 추가 */
    display: flex;
    align-items: center;     /* 수직 중앙 정렬 */
    justify-content: center;  /* 수평 중앙 정렬 */

    /* 2줄 기준 고정 높이 계산 (폰트크기 35px * 줄간격 1.25 * 2줄 = 87.5px) */
    height: calc(32px * 1.25 * 2);
}

#slide2 {
    background: #172834;
    padding: 100px 0;
}

#slide3 {
    background: white;
    padding: 0 0 150px 0;
}
#slide4 {
    padding: 0 0 120px 0;
}

#slide4 .hero h2 {
    margin-bottom: 20px;
}
#slide10 .hero h2 {
    margin-top: 110px;
}

#slide2 .review-title {
    color: var(--main-text, #203749);
    font-size: 40px;
    font-weight: 600;
    word-wrap: break-word;
}



/* 5개 통계 아이템을 품는 가로 레이아웃 */
.stats-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap; /* 모바일/태블릿 자동 줄바꿈 */
    align-items: flex-end; /* 강조 수치와 하단 텍스트 수직 정렬 최적화 */
    justify-content: space-between;
    gap: 30px 20px;
    margin-top: 45px;
}

/* 각 통계 아이템 박스 */
.stat-item {
    flex: 1 1 180px; /* 기본 180px 기준 자동 비율 분할 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
}

/* 주요 수치 / 제목 (초록색) */
.stat-value {
    color: white;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
    display: flex;
    align-items: center;     /* 수직 중앙 정렬 */
    justify-content: center;  /* 수평 중앙 정렬 */

    /* 2줄 기준 고정 높이 계산 (폰트크기 35px * 줄간격 1.25 * 2줄 = 87.5px) */
    height: calc(40px * 1.2 * 2);
}

/* 숫자/크기 강조 폰트 (1위, 250만+, 4.8+) */
.stat-value.text-large {
    font-size: 50px;
}

/* 라벨 / 설명글 (회색) */
.stat-label {
    color: white;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.md {
    display: block;
}
.sm {
    display: none;
}


@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 80px;
    }
    .feature-card {
        grid-template-columns: 1fr; /* 1열(세로) 배치 */
        background: none;
        gap: 40px;
    }
    .feature-card-reverse {
        grid-template-columns: 1fr; /* 1열(세로) 배치 */
        gap: 40px;
        background: none;
        /* 모바일에서는 위(preview), 아래(content) 순서로 원복 */
        grid-template-areas:
            "preview"
            "content";
    }

    .feature-card .card-content, .feature-card-reverse .card-content {
        margin-left: 36px;
        margin-right: 0;
        gap: 10px;
    }
    .feature-card .card-preview, .feature-card-reverse .card-preview {
        padding: 0;
    }
    .card-preview {
        padding: 10px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0;
    }
    .intro-card {
        padding: 25px 30px;
    }
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .timer-card {
        /* 1. timer-card 자체를 부모 영역 중앙에 배치 */
        margin-left: auto;
        margin-right: auto;

        /* 2. timer-card 내부 타이머 원형 요소를 중앙 정렬 */
        display: flex;
        justify-content: center;
        align-items: center;

        width: 100%; /* 필요시 카드 전체 너비 보장 */
    }

    .workout-row {
        flex-direction: column;
    }
    .intro-card-title, .intro-card-title-2 {
        font-size: 30px;
    }
    .feature-card-title {
        font-size: 20px;
        height: calc(20px * 1.25 * 2);
    }
    .img-feature-card {
        padding: 15px 24px 22px 24px;
        margin-right: 17px;
        border-radius: 16px;
    }
    .card-slider-wrapper {
        padding: 0 0 100px 0;
    }

    #slide1 {
        height: calc(100% + 60px);
        min-height: 0;
    }

    #slide2 .review-title {
        font-size: 30px;
    }
    .hero h2 {
        font-size: 30px;
        margin-top: 100px;
        margin-bottom: 60px;
    }
    .hero {
        text-align: center;
        padding: 0 20px;
        max-width: 800px;
        margin: 0 auto;
    }
    .hero h1 {
        margin-top: 80px;
        font-size: 30px;
    }
    .md {
        display: none;
    }
    .sm {
        display: block;
    }
    .hero p {
        font-size: 14px;
    }
    /* 이미지 영역 컨테이너 */
    .card-img-box {
        width: 130px;
        height: 130px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-img {
        max-width: 130px;
        max-height: 130px;
        object-fit: contain;
    }
    .stats-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 모바일에서는 2열로 정돈 */
        justify-content: center; /* 핵심: 모든 줄 항목들 중앙 정렬 */
        gap: 30px 15px;
    }

    .stat-value {
        font-size: 25px;
        /* 2줄 기준 고정 높이 계산 (폰트크기 35px * 줄간격 1.25 * 2줄 = 87.5px) */
        height: calc(25px * 1.2 * 2);
    }

    /* 숫자/크기 강조 폰트 (1위, 250만+, 4.8+) */
    .stat-value.text-large {
        font-size: 33px;
        height: calc(25px * 1.25);
    }

    .stat-label {
        font-size: 14px;
    }
    .stats-container {
        display: grid;
        grid-template-columns: repeat(6, 1fr); /* 6열 그리드로 세분화 */
        gap: 30px 10px;
    }

    /* 상단 3개 아이템: 각각 2칸씩 차지 (총 6칸 = 1줄 전체) */
    .stat-item:nth-child(1),
    .stat-item:nth-child(2),
    .stat-item:nth-child(3) {
        grid-column: span 2;
    }

    /* 하단 4번째 아이템: 2번째 칸부터 2칸 차지 */
    .stat-item:nth-child(4) {
        grid-column: 2 / span 2;
    }

    /* 하단 5번째 아이템: 4번째 칸부터 2칸 차지 (하단 2개 가운데 정렬 완성) */
    .stat-item:nth-child(5) {
        grid-column: 4 / span 2;
    }

    #slide3 {
        background: white;
        padding: 0 0 100px 0;
    }

    #slide4 {
        padding: 0 0 100px 0;
    }

    .card-title {
        color: #203749;
        text-align: center;
        font-size: 23px;
        font-style: normal;
        font-weight: 600;
        line-height: 1.3; /* 130.769% */
    }
    .card-content {
        margin-left: 0 !important;
    }
    .card-desc {
        color: #7B8184;
        text-align: center;
        font-size: 17px;
        font-style: normal;
        font-weight: 400;
        line-height: 1.4; /* 140% */
        margin-bottom: 0px;
    }
    .review-scroll-container {
        margin-top: 40px;
    }
    .review-content {
        margin-bottom: 48px;
        font-size: 15px;
    }
    .review-rating {
        font-size: 10px;
    }
}

/* 화살표 경로(Path) 그룹 애니메이션 */
.arrow-group {
    animation: scrollBounce 1.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* 위아래 이동 및 페이드 효과 */
@keyframes scrollBounce {
    0% {
        transform: translateY(-3px);
        opacity: 1;
    }
    50% {
        transform: translateY(4px);
        opacity: 1;
    }
    100% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

@keyframes scrollFlow {
    0% {
        transform: translateY(-6px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(6px);
        opacity: 0;
    }
}
