/* ============================================================
   이음북 프론트 디자인 시스템 v2 (.fr-*)
   soroweb 레퍼런스: 화이트 + 모노크롬 + 민트(#6ec7b6) 포인트,
   큰 여백, 대형 한글 헤드라인 + 소형 영문 라벨, 보더 중심 카드
   saas.css 뒤에 로드되어 공용 컴포넌트(헤더/요금제/모달)를 오버라이드
   ============================================================ */

/* ===== 베이스 ===== */
body.saas-landing {
    background: #fff;
}

.fr-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.fr-section {
    padding: var(--fr-sec-pad) 0;
    background: #fff;
}

.fr-section--gray {
    background: var(--fr-gray-1);
}

/* 소형 영문 라벨 */
.fr-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--saas-primary-dark);
    margin-bottom: 22px;
}

.fr-label::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--saas-primary);
}

/* 섹션 타이틀 */
.fr-title {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.22;
    color: var(--fr-ink);
    margin: 0 0 18px;
}

.fr-desc {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--fr-gray-4);
    margin: 0;
    max-width: 560px;
}

.fr-section-head {
    margin-bottom: clamp(48px, 6vw, 80px);
}

.fr-section-head--center {
    text-align: center;
}

.fr-section-head--center .fr-desc {
    margin: 0 auto;
}

.fr-section-head--center .fr-label {
    justify-content: center;
}

/* 텍스트 CTA "→" */
.fr-textlink {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fr-ink);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--fr-ink);
    transition: color 0.25s, border-color 0.25s, gap 0.25s;
}

.fr-textlink:hover {
    color: var(--saas-primary-dark);
    border-color: var(--saas-primary-dark);
    gap: 16px;
}

/* 버튼 */
.fr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 34px;
    border-radius: var(--saas-radius-full);
    font-family: var(--saas-font);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}

.fr-btn--primary {
    background: var(--saas-primary);
    color: #fff;
}

.fr-btn--primary:hover {
    background: var(--saas-primary-dark);
    transform: translateY(-2px);
}

.fr-btn--ink {
    background: var(--fr-ink);
    color: #fff;
}

.fr-btn--ink:hover {
    background: #2a2f33;
    transform: translateY(-2px);
}

.fr-btn--ghost {
    background: transparent;
    color: var(--fr-ink);
    border-color: var(--fr-gray-2);
}

.fr-btn--ghost:hover {
    border-color: var(--fr-ink);
}

/* ===== 히어로 ===== */
.fr-hero {
    background: #fff;
    padding: clamp(70px, 9vw, 130px) 0 0;
    overflow: hidden;
}

.fr-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.fr-hero-title {
    font-size: clamp(2.4rem, 6.4vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.12;
    color: var(--fr-ink);
    margin: 0 0 28px;
    word-break: keep-all;
}

.fr-hero-title em {
    font-style: normal;
    color: var(--saas-primary-dark);
}

.fr-hero-title .fr-w {
    display: inline-block;
}

.fr-hero-desc {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.8;
    color: var(--fr-gray-4);
    max-width: 520px;
    margin: 0 0 40px;
    word-break: keep-all;
}

.fr-hero-cta {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: clamp(56px, 7vw, 96px);
}

.fr-hero-scroll {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: var(--fr-gray-3);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 히어로 2컬럼: 좌 텍스트 / 우 일러스트+디바이스 목업 */
.fr-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.fr-hero-copy .fr-hero-cta {
    margin-bottom: 0;
}

/* 우측 스테이지: app.svg 라인 일러스트 + 아이맥/폰 라인아트 프레임 */
.fr-hero-stage {
    position: relative;
    padding: 0 0 40px 12%;
}

.fr-hero-illust {
    position: absolute;
    left: -6%;
    bottom: -4%;
    width: 44%;
    z-index: 3;
    pointer-events: none;
}

/* 인라인 SVG (hero-app.svg): 내부 <image>로 k-003이 폰 프레임 위·손가락 아래에 삽입됨 */
.fr-hero-illust svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 907.09 / 1133.86;
}

.fr-device {
    background: #fff;
}

/* 아이맥: app.svg와 동일한 3px 잉크 라인아트 */
.fr-device--imac {
    position: relative;
    z-index: 2;
    width: 100%;
}

.fr-device--imac .fr-device-screen {
    border: 3px solid #121417;
    border-radius: 14px;
    background: #fff;
    padding: 10px 10px 16px;
    overflow: hidden;
}

.fr-device--imac .fr-device-screen img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--fr-gray-2);
}

.fr-device--imac .fr-device-stand {
    width: 13%;
    height: 34px;
    margin: -3px auto 0;
    background: #fff;
    border-left: 3px solid #121417;
    border-right: 3px solid #121417;
}

.fr-device--imac .fr-device-base {
    width: 34%;
    height: 12px;
    margin: 0 auto;
    background: #fff;
    border: 3px solid #121417;
    border-radius: 999px;
}

/* 스마트폰: 우측 하단 오버랩 */
.fr-device--phone {
    position: absolute;
    right: -3%;
    bottom: -2%;
    width: 19%;
    z-index: 4;
    border: 3px solid #121417;
    border-radius: 26px;
    background: #fff;
    padding: 7px;
    box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.28);
}

.fr-device--phone .fr-device-screen {
    aspect-ratio: 9 / 18;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--fr-gray-2);
}

.fr-device--phone .fr-device-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.fr-hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid var(--fr-gray-2);
    margin-top: clamp(40px, 5vw, 64px);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fr-gray-3);
}

/* ===== 지표 스트립 ===== */
.fr-stats {
    border-top: 1px solid var(--fr-gray-2);
    border-bottom: 1px solid var(--fr-gray-2);
    background: #fff;
}

.fr-stats-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.fr-stat {
    padding: clamp(36px, 4.5vw, 64px) 24px;
    border-right: 1px solid var(--fr-gray-2);
}

.fr-stat:last-child {
    border-right: none;
}

.fr-stat-num {
    display: block;
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--fr-ink);
    line-height: 1;
    margin-bottom: 12px;
}

.fr-stat-num sub {
    font-size: 0.45em;
    font-weight: 700;
    color: var(--saas-primary-dark);
    vertical-align: baseline;
}

.fr-stat-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--fr-gray-4);
}

.fr-stat-sublabel {
    display: block;
    font-size: 0.74rem;
    color: var(--fr-gray-3);
    margin-top: 4px;
    font-weight: 400;
}

/* ===== 서비스(특징) 그리드 — 넘버링 카드 ===== */
.fr-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--fr-gray-2);
    border-left: 1px solid var(--fr-gray-2);
}

.fr-service {
    border-right: 1px solid var(--fr-gray-2);
    border-bottom: 1px solid var(--fr-gray-2);
    padding: clamp(30px, 3.4vw, 48px);
    background: #fff;
    position: relative;
    transition: background 0.3s;
}

.fr-service:hover {
    background: var(--fr-gray-1);
}

.fr-service-no {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--saas-primary-dark);
    margin-bottom: 34px;
}

.fr-service-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fr-ink);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.fr-service-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--fr-gray-4);
    margin: 0;
    word-break: keep-all;
}

/* ===== 스플릿 섹션 ===== */
.fr-split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.fr-split--rev {
    grid-template-columns: 1.1fr 0.9fr;
}

.fr-split--rev .fr-split-copy {
    order: 2;
}

.fr-split--rev .fr-split-media {
    order: 1;
}

.fr-split-media {
    border: 1px solid var(--fr-gray-2);
    border-radius: 14px;
    overflow: hidden;
    background: var(--fr-gray-1);
}

.fr-split-media img {
    display: block;
    width: 100%;
    height: auto;
    will-change: transform;
}

.fr-split-points {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 14px;
}

.fr-split-points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.92rem;
    color: var(--fr-gray-4);
    line-height: 1.6;
}

.fr-split-points li::before {
    content: '';
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--saas-primary);
    margin-top: 8px;
}

.fr-split + .fr-split {
    margin-top: var(--fr-sec-pad);
}

/* ===== 전체 기능 리스트 ===== */
.fr-featlist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 clamp(40px, 6vw, 90px);
    border-top: 1px solid var(--fr-gray-2);
    max-width: 1060px;
    margin: 0 auto;
}

.fr-featlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 4px;
    border-bottom: 1px solid var(--fr-gray-2);
    font-size: 0.95rem;
    color: var(--fr-ink);
    font-weight: 500;
}

.fr-featlist-item i {
    color: var(--saas-primary-dark);
    font-size: 0.82rem;
    flex: none;
}

.fr-featlist-item span small {
    display: block;
    font-weight: 400;
    color: var(--fr-gray-3);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ===== Featured Works (쇼케이스) ===== */
.fr-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 3vw, 40px);
}

.fr-work {
    text-decoration: none;
    display: block;
    color: inherit;
    background: #fff;
    border: 1px solid var(--fr-gray-2);
    border-radius: 18px;
    padding: 14px 14px 20px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.45s;
}

.fr-work:hover {
    transform: translateY(-8px);
    border-color: #a9dcd1;
    box-shadow: 0 28px 48px -22px rgba(53, 141, 129, 0.28);
}

.fr-work-thumb {
    position: relative;
    border: 1px solid var(--fr-gray-2);
    border-radius: 12px;
    overflow: hidden;
    background: var(--fr-gray-1);
    aspect-ratio: 3 / 4;
    margin-bottom: 16px;
}

.fr-work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fr-work:hover .fr-work-thumb img {
    transform: scale(1.05);
}

/* 페이지 수 플로팅 배지 */
.fr-work-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--fr-ink);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 11px;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.fr-work-badge i {
    color: var(--saas-primary-dark);
    font-size: 0.65rem;
}

/* 호버 오버레이 + 열어보기 버튼 */
.fr-work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 20, 23, 0.45), rgba(18, 20, 23, 0) 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
}

.fr-work:hover .fr-work-overlay {
    opacity: 1;
}

.fr-work-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--fr-ink);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 10px 18px;
    transform: translateY(12px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.fr-work:hover .fr-work-open {
    transform: translateY(0);
}

.fr-work-open i {
    color: var(--saas-primary-dark);
    font-size: 0.72rem;
}

.fr-work-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.fr-work-num {
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--saas-primary-dark);
}

.fr-work-title {
    flex: 1;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--fr-ink);
    letter-spacing: -0.02em;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}

.fr-work:hover .fr-work-title {
    color: var(--saas-primary-dark);
}

/* 우측 원형 화살표 */
.fr-work-arrow {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--fr-gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fr-gray-3);
    font-size: 0.68rem;
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fr-work:hover .fr-work-arrow {
    background: var(--saas-primary);
    border-color: var(--saas-primary);
    color: #fff;
    transform: rotate(-45deg);
}

.fr-work-pages {
    flex: none;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--fr-gray-3);
    text-transform: uppercase;
}

.fr-work-desc {
    margin: 8px 0 0;
    padding: 0 4px;
    font-size: 0.85rem;
    color: var(--fr-gray-4);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== FAQ 아코디언 ===== */
.fr-faq {
    max-width: 860px;
    margin: 0 auto;
    border-top: 1px solid var(--fr-gray-2);
}

.fr-faq-item {
    border-bottom: 1px solid var(--fr-gray-2);
}

.fr-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 26px 4px;
    font-family: var(--saas-font);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fr-ink);
    letter-spacing: -0.02em;
}

.fr-faq-q .fr-faq-icon {
    flex: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--fr-gray-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--fr-gray-4);
    transition: transform 0.35s, background 0.35s, color 0.35s;
}

.fr-faq-item.open .fr-faq-icon {
    transform: rotate(45deg);
    background: var(--fr-ink);
    color: #fff;
    border-color: var(--fr-ink);
}

.fr-faq-a {
    height: 0;
    overflow: hidden;
}

.fr-faq-a-inner {
    padding: 0 44px 28px 4px;
    font-size: 0.94rem;
    line-height: 1.85;
    color: var(--fr-gray-4);
    word-break: keep-all;
}

/* ===== 최종 CTA 밴드 ===== */
.fr-cta {
    background: var(--fr-gray-1);
    text-align: center;
    padding: var(--fr-sec-pad) 24px;
}

.fr-cta-title {
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.2;
    color: var(--fr-ink);
    margin: 0 0 20px;
    word-break: keep-all;
}

.fr-cta-desc {
    font-size: 1.02rem;
    color: var(--fr-gray-4);
    margin: 0 0 40px;
}

/* ===== 서브페이지 히어로 ===== */
.fr-subhero {
    background: #fff;
    padding: clamp(70px, 9vw, 120px) 0 clamp(40px, 5vw, 64px);
    border-bottom: 1px solid var(--fr-gray-2);
}

.fr-subhero .fr-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 14px;
}

/* ===== 요금제 오버라이드 (마크업은 기존 .saas-* 유지) ===== */
.saas-pricing {
    background: #fff;
    padding: var(--fr-sec-pad) 5%;
}

.saas-price-card {
    box-shadow: none !important;
    border: 1px solid var(--fr-gray-2) !important;
    border-radius: 14px !important;
    background: #fff !important;
}

.saas-price-card.featured {
    border-color: var(--saas-primary) !important;
    transform: none !important;
}

.saas-price-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--saas-shadow-md) !important;
}

/* ===== 스크롤 리빌 초기 상태 (JS 없거나 reduced-motion이면 그대로 보임) ===== */
html.fr-anim-ready .fr-reveal {
    opacity: 0;
    transform: translateY(44px);
}

html.fr-anim-ready .fr-hero-title .fr-w,
html.fr-anim-ready .fr-hero-desc,
html.fr-anim-ready .fr-hero-cta,
html.fr-anim-ready .fr-hero-scroll,
html.fr-anim-ready .fr-hero-stage {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

    html.fr-anim-ready .fr-reveal,
    html.fr-anim-ready .fr-hero-title .fr-w,
    html.fr-anim-ready .fr-hero-desc,
    html.fr-anim-ready .fr-hero-cta,
    html.fr-anim-ready .fr-hero-scroll,
    html.fr-anim-ready .fr-hero-stage {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .fr-hero-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .fr-hero-stage {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
        padding-left: 14%;
    }

    .fr-services {
        grid-template-columns: repeat(2, 1fr);
    }

    .fr-works {
        grid-template-columns: repeat(2, 1fr);
    }

    .fr-split,
    .fr-split--rev {
        grid-template-columns: 1fr;
    }

    .fr-split--rev .fr-split-copy {
        order: 1;
    }

    .fr-split--rev .fr-split-media {
        order: 2;
    }
}

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

    .fr-stat:nth-child(2n) {
        border-right: none;
    }

    .fr-stat:nth-child(-n+2) {
        border-bottom: 1px solid var(--fr-gray-2);
    }

    .fr-services {
        grid-template-columns: 1fr;
    }

    .fr-works {
        grid-template-columns: 1fr;
    }

    .fr-hero-meta {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* ===== 헤더 오버라이드 (마크업 유지) ===== */
.saas-header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--fr-gray-2);
}

.saas-header.scrolled {
    background: #fff;
    box-shadow: none;
    border-bottom-color: var(--fr-gray-2);
}

.saas-nav-link {
    font-weight: 600;
    color: var(--fr-gray-4);
}

.saas-nav-link:hover {
    color: var(--fr-ink);
    transform: none;
}

/* 헤더 CTA: 잉크 pill */
.saas-header .saas-btn-primary {
    background: var(--fr-ink);
    color: #fff;
    box-shadow: none;
    border-radius: var(--saas-radius-full);
}

.saas-header .saas-btn-primary:hover {
    background: #2a2f33;
    box-shadow: none;
}

/* ===== 푸터 오버라이드: 라이트 미니멀 =====
   색상·타이포·레이아웃은 saas.css 의 .site-footer 규칙이 담당한다.
   (푸터를 포함하는 프론트 페이지는 모두 saas.css 를 함께 로드)
   여기서는 프론트 전용 상단 구분선만 얹는다. */
.site-footer {
    background: #fff !important;
    border-top: 1px solid var(--fr-gray-2);
}

/* 푸터 로고 색은 footer.php 내 SVG <style>에서 직접 지정 (잉크 텍스트 + 민트 아이콘) */
