/* Farmketing Design System 2.1 - Refined */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
    /* Brand Colors */
    --primary-green: #4CAF50;
    --primary-orange: #FF9800;
    --primary-blue: #2196F3;
    --primary-purple: #9C27B0;

    --grad-green: linear-gradient(135deg, #4CAF50, #66BB6A);
    --grad-orange: linear-gradient(135deg, #FF9800, #FFB74D);
    --grad-blue: linear-gradient(135deg, #2196F3, #64B5F6);
    --grad-purple: linear-gradient(135deg, #9C27B0, #BA68C8);

    --text-main: #111827;
    /* Gray 900 */
    --text-sub: #4B5563;
    /* Gray 600 */
    --text-light: #9CA3AF;
    /* Gray 400 */
    --text-white: #ffffff;

    --bg-light: #F9FAFB;
    /* Gray 50 */
    --bg-white: #ffffff;
    --bg-dark: #111827;
    /* Gray 900 */

    --container-width: 1280px;
    --header-height: 64px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul,
li {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-green {
    color: var(--primary-green);
}

.text-orange {
    color: var(--primary-orange);
}

.text-blue {
    color: var(--primary-blue);
}

.bg-gray {
    background-color: var(--bg-light);
}

.bg-white {
    background-color: var(--bg-white);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    background: #43A047;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(76, 175, 80, 0.4);
}

.btn-white-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-white-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-block {
    width: 100%;
}

/* Header - Design (Figma) */
#header.design-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-spacer {
    height: var(--header-height);
    flex-shrink: 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
}

/* GNB */
.gnb>ul {
    display: flex;
    gap: 32px;
}

.gnb .depth1>a {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-sub);
    height: var(--header-height);
}

.gnb .depth1:hover>a {
    color: var(--primary-green);
}

/* Submenu */
.depth1 {
    position: relative;
}

.depth1--link .depth2 {
    display: none !important;
}

.depth2 {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #F3F4F6;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    z-index: 100;
}

.depth1:hover .depth2 {
    display: block;
}

.gnb .chevron {
    transition: transform 0.2s;
}

.depth1:hover .chevron {
    transform: rotate(180deg);
}

.depth2 li a {
    display: block;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
}

.depth2 li a:hover {
    background: #F0FDF4;
    color: var(--primary-green);
}

/* Header Buttons */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

.mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 1s ease-in-out;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 24px;
    opacity: 0.9;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Service Grid (3D Flip Cards) */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.flip-card-container {
    height: 400px;
    perspective: 1000px;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.flip-card-container:hover .flip-card {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.flip-front {
    background: white;
}

.flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-front .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.flip-back {
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.back-green {
    background: var(--grad-green);
}

.back-orange {
    background: var(--grad-orange);
}

.back-blue {
    background: var(--grad-blue);
}

.back-purple {
    background: var(--grad-purple);
}

.flip-back h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.flip-back ul li {
    display: flex;
    align-items: start;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    opacity: 0.9;
}

.flip-back .btn-link {
    background: white;
    color: var(--text-main);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
}

/* About Section & Core Values */
.about-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* Increased gap for better separation */
    align-items: center;
}

.section-title-lg {
    font-size: 56px;
    /* Larger title */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 32px;
    letter-spacing: -1.5px;
    color: var(--text-main);
}

.section-desc-lg {
    font-size: 18px;
    color: var(--text-sub);
    margin-bottom: 56px;
    line-height: 1.7;
    max-width: 90%;
}

.core-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 48px;
}

.core-item {
    display: flex;
    flex-direction: column;
    /* Vertical layout */
    align-items: flex-start;
    gap: 16px;
}

.core-icon {
    width: 64px;
    height: 64px;
    /* Larger icon box */
    background: #E8F5E9;
    /* Light green background */
    border-radius: 16px;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    /* Larger icon size */
    flex-shrink: 0;
    margin-bottom: 8px;
}

.core-icon svg {
    width: 32px;
    height: 32px;
}

.core-text h4 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-main);
}

.core-text p {
    font-size: 16px;
    color: var(--text-sub);
    line-height: 1.6;
}

.about-main-img {
    width: 100%;
    height: 100%;
    max-height: 800px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--shadow-2xl);
}

/* Response adjustments for About Section */
@media (max-width: 1024px) {
    .about-grid-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .section-title-lg {
        font-size: 40px;
    }

    .about-main-img {
        max-height: 500px;
    }
}

/* Portfolio Cards */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.pf-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
    cursor: pointer;
}

.pf-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.pf-thumb {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.pf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.pf-card:hover .pf-thumb img {
    transform: scale(1.1);
}

.pf-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: var(--primary-green);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 99px;
}

.pf-content {
    padding: 24px;
}

.pf-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Contact Forms */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
}

.contact-info-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-form-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #F9FAFB;
}

.form-input:focus {
    border-color: var(--primary-green);
    ring: 2px solid rgba(76, 175, 80, 0.2);
}

/* Footer - Design (Figma) */
#footer.design-footer {
    background: #111827;
    color: #D1D5DB;
    padding: 48px 0 0;
}

#footer.design-footer .footer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    font-size: 20px;
    color: white;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-h {
    color: white;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-links li {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-green);
}

.footer-contact li {
    list-style: none;
}

.footer-hours {
    padding-top: 8px;
    font-size: 13px;
    opacity: 0.85;
}

.footer-bottom {
    border-top: 1px solid #1F2937;
    padding: 32px 0;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-copy {
    font-size: 14px;
    opacity: 0.8;
}

.footer-legal {
    display: flex;
    gap: 24px;
    font-size: 14px;
}

.footer-legal a:hover {
    color: var(--primary-green);
}

/* Responsive */
@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .core-grid,
    .pf-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 48px;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .header-actions {
        display: none;
    }

    .gnb {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #E5E7EB;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        padding: 16px 24px;
    }

    .gnb ul {
        flex-direction: column;
        gap: 0;
    }

    .gnb .depth1>a {
        height: auto;
        padding: 12px 0;
    }

    .gnb .depth2 {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        margin-bottom: 8px;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: none;
        border: none;
        cursor: pointer;
        color: #374151;
    }
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 36px;
    }

    #footer.design-footer .footer-cols {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.animate-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Design Page (Figma folder layout) ========== */
.design-page-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.design-page-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-page-hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.design-page-hero .inner {
    position: relative;
    z-index: 2;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
    color: #fff;
}

.design-page-hero .inner h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.design-page-hero .inner p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    opacity: 0.9;
}

.design-page-hero--green {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    min-height: auto;
    padding: 96px 24px;
}

.design-page-hero--green .inner {
    color: #fff;
}

.design-page-hero--green .inner h1 {
    color: #fff;
}

.design-page-hero--green .inner p {
    color: rgba(255, 255, 255, 0.9);
}

.design-section {
    padding: 96px 0;
}

.design-section--gray {
    background: #F9FAFB;
}

.design-section--dark {
    background: #111827;
    color: #fff;
    text-align: center;
    padding: 80px 24px;
}

.design-section--dark h2 {
    color: #fff;
}

.design-section--dark p {
    color: #D1D5DB;
}

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

.design-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.design-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.design-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.design-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.design-card .num {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.design-card .label {
    font-size: 14px;
    color: #6B7280;
}

.design-card .icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #DCFCE7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
}

.design-why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.design-why-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 32px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s;
}

.design-why-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.design-why-card .icon-wrap {
    width: 48px;
    height: 48px;
    background: #DCFCE7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    flex-shrink: 0;
}

.design-why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.design-why-card p {
    color: #6B7280;
    line-height: 1.6;
}

.design-mission-bar {
    width: 96px;
    height: 4px;
    background: var(--primary-green);
    margin: 32px auto 0;
}

@media (max-width: 1024px) {
    .design-grid-2 {
        grid-template-columns: 1fr;
    }

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

    .design-why-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .design-grid-4 {
        grid-template-columns: 1fr;
    }
}