@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;700&family=Noto+Sans+KR:wght@400;500;700&display=swap');

@font-face {
    font-family: 'Salonica';
    src: url('/fonts/Salonica.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --header-height: 80px;
    --main-green: #1b6331;
}

/* =========================================================
   MAIN PAGE 전용 스타일
   ※ 다른 페이지와 클래스 충돌 방지용
========================================================= */
body.main-page {
    margin: 0;
    font-family: 'Pretendard', 'Jost', sans-serif;
    color: #222;
    background: #fff;
    overflow-x: hidden;
}

body.main-page main section {
    position: relative;
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* -------------------------------
   HERO SECTION
-------------------------------- */
.main-page .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('/img/main/forest-bg.png') center/cover no-repeat;
}

.main-page .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.main-page .hero-text {
    color: #fff;
    font-weight: 500;
}

.main-page .hero-text h1 {
    font-size: clamp(3rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
}

.main-page .hero-text .subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.main-page .hero-text .desc {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: white;
}

.main-page .brand-link {
    position: absolute;
    bottom: 6%;
}

.main-page .brand-link a.read-more {
    position: relative;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.main-page .brand-link a.read-more::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.main-page .brand-link a.read-more::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.main-page .brand-link a.read-more:hover::before {
    width: 100%;
}
.main-page .brand-link a.read-more:hover::after {
    transform: translateX(4px);
}

/* -------------------------------
   CYCLE SECTION
-------------------------------- */
.main-page .cycle {
    position: relative;
    width: 100%;
    background: url('/img/main/soil-bg.png') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

.main-page .cycle-inner {
    max-width: 1700px;
    margin: 0 auto;
}

.main-page .cycle-title img {
    width: 30px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    opacity: 0.85;
}

.main-page .cycle-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10rem;
    margin-bottom: 3rem;
    margin-top: 3rem;
    overflow: visible;
}

.main-page .cycle-item {
    width: clamp(240px, 22vw, 350px);
    aspect-ratio: 350 / 390;
    height: auto;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
}

.main-page .cycle-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.25);
    z-index: 5;
}

.main-page .cycle-item img {
    width: clamp(4rem, 7vw, 8rem);
    margin-bottom: 1rem;
}

.main-page .cycle-item h3 {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

.main-page .cycle-item p {
    font-size: clamp(0.8rem, 0.9vw, 0.92rem);
    line-height: 1.6;
}

.main-page .cycle-desc {
    margin-top: 3rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.8;
    opacity: 0.9;
    color: white;
}

.main-page .eng-slogan {
    font-family: 'Salonica', cursive;
    font-size: 5rem;
    color: #fff;
    margin-top: 10rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

.main-page .logo-text {
    margin-top: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

/* -------------------------------
   COMPANY HERO SECTION
-------------------------------- */
.main-page .company-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 8rem 1rem 8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
}

.main-page .company-hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.main-page .company-inner {
    position: relative;
    z-index: 2;
    max-width: 1500px;
    margin: 0 auto;
}

.main-page .company-inner .en-title {
    font-family: 'Jost', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #e0e0e0;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.main-page .company-inner .kr-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.main-page .company-inner .desc {
    max-width: 1000px;
    margin: 10rem auto 10rem;
    font-size: 0.95rem;
    line-height: 1.9;
    opacity: 0.95;
}

/* -------------------------------
   KEYWORDS
-------------------------------- */
.main-page .company-keywords {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.main-page .keyword-box {
    flex: 1 1 200px;
    min-width: 330px;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.main-page .keyword-box:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-6px);
}

.main-page .keyword-box h4 {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.main-page .keyword-box p {
    font-size: 0.85rem;
    color: #f5f5f5;
    line-height: 1.6;
    opacity: 0.9;
}

/* -------------------------------
   PAGE NAVIGATION
-------------------------------- */
.page-nav {
    position: fixed;
    top: 50%;
    right: 3%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.page-nav .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-nav .dot.active {
    background: var(--main-green);
    transform: scale(1.2);
    border-color: var(--main-green);
}

.page-nav .dot:hover {
    background: var(--main-green);
    opacity: 0.9;
}

/* -------------------------------
   FULLPAGE SCROLL CONTROL
-------------------------------- */
body.main-page main {
    height: 100vh;
    overflow: hidden;
}

body.main-page main section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
}

/* -------------------------------
   FOOTER SECTION
-------------------------------- */
.main-page .footer-section {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    height: auto;
    min-height: unset;
}

.main-page .footer-section footer {
    width: 100%;
    max-width: 1400px;
    color: #aaa;
}

.main-page .footer-section footer a,
.main-page .footer-section footer p {
    color: #aaa;
}

/* ======================================================
   MAIN 반응형 (최종 안정화 버전)
====================================================== */

/* ------------------------------
   1500px ~ 1201px
------------------------------ */
@media (max-width: 1500px) and (min-width: 1201px) {
    .main-page .cycle-icons {
        gap: 6rem;
    }

    .main-page .cycle-item {
        width: clamp(220px, 20vw, 300px);
        aspect-ratio: 350 / 390;
    }
}

/* ------------------------------
   1426px 이하 (company 2열 전환)
------------------------------ */
@media (max-width: 1426px) {
    .main-page .company-keywords {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
    }
}

/* ------------------------------
   1200px 이하 : 구조 변경 시작
------------------------------ */
@media (max-width: 1200px) {
    body.main-page main {
        overflow-x: auto;
        overflow-y: visible;
    }

    body.main-page main section {
        min-height: auto;
        scroll-snap-align: none;
        overflow: visible;
    }

    .page-nav {
        display: none !important;
    }

    .main-page .hero-text h1 {
        font-size: clamp(2rem, 4vw, 2.6rem);
    }

    .main-page .hero-text .subtitle {
        font-size: 1.1rem;
    }

    .main-page .hero-text .desc {
        font-size: 0.95rem;
    }

    .main-page .brand-link a.read-more {
        font-size: 0.95rem;
    }

    /* CYCLE 영역 */
    .main-page .cycle,
    .main-page .cycle-inner,
    .main-page .cycle-icons {
        overflow: visible !important;
    }

    .main-page .cycle-icons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        gap: 2.5rem;
        padding: 0 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .main-page .cycle-item {
        width: clamp(200px, 24vw, 300px);
        aspect-ratio: 350 / 390;
        flex-shrink: 0;
        scroll-snap-align: center;
        z-index: 1;
        transition: transform 0.3s ease;
    }

    .main-page .cycle-item:hover {
        transform: translateY(-6px);
        z-index: 3;
    }

    .main-page .cycle-item img {
        width: 6rem;
    }

    .main-page .cycle-item h3 {
        font-size: 1rem;
    }

    .main-page .cycle-item p {
        display: none;
    }

    .main-page .cycle-title img {
        width: 24px;
    }

    .main-page .eng-slogan {
        font-size: 3rem;
        margin-top: 6rem;
    }

    /* COMPANY 영역 */
    .main-page .company-inner .en-title {
        font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    }

    .main-page .company-inner .kr-title {
        font-size: 1.1rem;
    }

    .main-page .company-inner .desc {
        font-size: 0.9rem;
        margin: 6rem auto;
    }

    .main-page .company-keywords {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        justify-items: center;
    }

    .main-page .keyword-box {
        min-width: unset;
        max-width: 100%;
        padding: 1.2rem 0.8rem;
    }
}

/* ------------------------------
   900px 이하
------------------------------ */
@media (max-width: 900px) {
    .main-page .cycle-item p {
        display: none;
    }
}

/* ------------------------------
   800px 이하 : 폰트·간격 축소
------------------------------ */
@media (max-width: 800px) {
    .main-page .hero-text h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    }

    .main-page .hero-text .desc {
        font-size: 0.9rem;
    }

    .main-page .cycle-item {
        width: clamp(150px, 25vw, 240px);
        aspect-ratio: 350 / 390;
    }

    .main-page .cycle-item img {
        width: clamp(3rem, 6vw, 5rem);
    }

    .main-page .cycle-item h3 {
        font-size: 0.95rem;
    }

    .main-page .eng-slogan {
        font-size: 2.4rem;
    }

    .main-page .company-inner .desc {
        font-size: 0.9rem;
    }

    .main-page .company-keywords {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .main-page .keyword-box h4 {
        font-size: 0.9rem;
    }

    .main-page .keyword-box p {
        font-size: 0.8rem;
    }
}

/* ------------------------------
   600px 이하 : 모바일 전용
------------------------------ */
@media (max-width: 600px) {
    /* HERO */
    .main-page .hero-text {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .main-page .hero-text h1 {
        font-size: clamp(1.5rem, 5vw, 1.8rem);
    }

    .main-page .hero-text .subtitle {
        font-size: 1rem;
    }

    .main-page .hero-text .desc {
        font-size: 0.85rem;
    }

    /* CYCLE */
    .main-page .cycle,
    .main-page .cycle-inner,
    .main-page .cycle-icons {
        overflow: visible !important;
    }

    .main-page .cycle-icons {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.8rem;
        padding: 0 0.6rem;
        min-height: 110px;
        box-sizing: border-box;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .main-page .cycle-item {
        width: clamp(90px, 28vw, 170px);
        aspect-ratio: 350 / 390;
        flex-shrink: 0;
        scroll-snap-align: center;
        transition: transform 0.3s ease;
    }

    .main-page .cycle-item:hover {
        transform: translateY(-6px);
        z-index: 5;
    }

    .main-page .cycle-item img {
        width: clamp(2.2rem, 5vw, 3rem);
    }

    .main-page .cycle-item h3 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .main-page .cycle-item p {
        display: none;
    }

    .main-page .cycle-desc {
        font-size: 0.85rem;
        line-height: 1.6;
        padding: 0 0.8rem;
    }

    /* COMPANY */
    .main-page .company-keywords {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .main-page .keyword-box {
        padding: 1rem;
    }

    .main-page .keyword-box h4 {
        font-size: 0.85rem;
    }

    .main-page .keyword-box p {
        font-size: 0.78rem;
    }

    .main-page .eng-slogan {
        font-size: clamp(1.5rem, 5vw, 1.8rem);
    }
}

/* ------------------------------
   400px 이하
------------------------------ */
@media (max-width: 400px) {
    .main-page .hero-text h1 {
        font-size: 1.8rem;
    }

    .main-page .hero-text .desc {
        font-size: 0.8rem;
    }

    .main-page .cycle-icons {
        gap: 1rem;
        padding: 0 0.4rem;
    }

    .main-page .cycle-item img {
        width: clamp(2rem, 6vw, 3rem);
    }

    .main-page .cycle-item h3 {
        font-size: 0.75rem;
    }

    .main-page .company-keywords {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .main-page .keyword-box h4 {
        font-size: 0.8rem;
    }

    .main-page .company-inner .desc {
        display: none;
    }

    .main-page .keyword-box {
        padding: 0.5rem;
    }
}

/* ------------------------------
   360px 이하 : 최소 대응
------------------------------ */
@media (max-width: 360px) {
    .main-page .cycle-icons {
        gap: 0.4rem;
        padding: 0 0.3rem;
        overflow-x: auto;
        overflow-y: visible;
    }

    .main-page .cycle-item {
        width: clamp(90px, 40vw, 110px);
        aspect-ratio: 350 / 390;
    }

    .main-page .cycle-item img {
        width: clamp(2rem, 6vw, 2.8rem);
    }

    .main-page .cycle-item h3 {
        font-size: 0.72rem;
    }
}
