@charset "utf-8";

/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg: #FAFAFA; /* Off-white for comfort */
    --color-surface: #FFFFFF;
    --color-surface-dark: #121F18; /* Deep Green for footer */
    --color-primary: #00B76A; /* Fresh Green */
    --color-primary-hover: #00A05D;
    --color-text: #1A1A1A;
    --color-text-muted: #737373;
    --color-border: rgba(0, 183, 106, 0.15);
    
    /* Typography */
    --font-heading: 'Plus Jakarta Sans', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing & Fluid Layout */
    --container-padding: 1.5rem; /* Mobile default */
    --section-gap: clamp(4rem, 8vw, 8rem);
    
    /* Shapes & Easing */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;
    --radius-pill: 100px;
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(0, 183, 106, 0.1);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    :root {
        --container-padding: 3rem;
    }
}

/* Reset & Accessibility */
* { margin: 0; padding: 0; box-sizing: border-box; word-break: keep-all; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
html { scroll-behavior: smooth; color-scheme: light; }
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

/* ==========================================================================
   2.1. Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-surface); 
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 183, 106, 0.4); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary); 
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); letter-spacing: -0.04em; line-height: 1.2; text-wrap: balance; color: var(--color-text); }
.text-gradient { background: linear-gradient(135deg, var(--color-primary) 0%, #00874d 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease-smooth); }

/* ==========================================================================
   3. Layout & Utilities
   ========================================================================== */
.main-wrapper { overflow-x: hidden; width: 100%; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--container-padding); }
.section-padding { padding: var(--section-gap) 0; }
.bg-white { background-color: var(--color-surface); }
.desktop-only { display: none; }
@media (min-width: 768px) { .desktop-only { display: block; } }

/* ==========================================================================
   4. Components (Buttons, Cursor, Preloader, Nav, Modal)
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2rem; border-radius: var(--radius-pill); font-weight: 600;
    transition: all 0.3s var(--ease-smooth); cursor: none; border: none; font-family: var(--font-body);
}
.btn-primary { background-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background-color: var(--color-primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-outline { background-color: transparent; color: var(--color-text); border: 1px solid rgba(0,0,0,0.1); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Custom Cursor */
.custom-cursor {
    position: fixed; top: 0; left: 0; width: 12px; height: 12px;
    background-color: var(--color-primary); border-radius: 50%;
    pointer-events: none; z-index: 9999; transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s, background-color 0.3s;
    will-change: transform;
}
.custom-cursor.hover { width: 48px; height: 48px; opacity: 0.2; background-color: var(--color-primary); }
@media (pointer: coarse) { .custom-cursor { display: none !important; } .btn, a, button { cursor: pointer; } }

/* Preloader */
.preloader { position: fixed; inset: 0; background-color: var(--color-surface); z-index: 10000; display: flex; justify-content: center; align-items: center; transition: opacity 0.8s var(--ease-smooth), visibility 0.8s; }
.preloader.hidden { opacity: 0; visibility: hidden; }
.leaf-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: drawLeaf 2s var(--ease-smooth) forwards; }
@keyframes drawLeaf { to { stroke-dashoffset: 0; } }

/* Scroll Progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background-color: var(--color-primary); width: 0%; z-index: 9998; }

/* Navbar (Full-width Glassmorphism) */
.navbar { position: fixed; top: 0; width: 100%; padding: 1.5rem 0; z-index: 900; transition: all 0.4s var(--ease-smooth); border-bottom: 1px solid transparent; }
.navbar.scrolled { padding: 1rem 0; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,0,0,0.05); }
.navbar-inner { display: flex; justify-content: space-between; align-items: center; }
.brand-logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.8rem; letter-spacing: -0.05em; color: var(--color-text); }
.brand-logo:hover { color: var(--color-primary); }
.nav-links { display: none; }
@media (min-width: 768px) {
    .nav-links { display: flex; gap: 2.5rem; }
    .nav-item { font-weight: 500; font-size: 1rem; color: var(--color-text-muted); transition: color 0.3s; }
    .nav-item:hover { color: var(--color-primary); }
}
.navbar .btn { padding: 0.7rem 1.5rem; font-size: 0.95rem; }

/* Inquiry Modal */
.inquiry-modal {
    position: fixed; inset: 0; z-index: 9500;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s var(--ease-smooth);
}
.inquiry-modal.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-content {
    position: relative; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
    background-color: var(--color-surface); border-radius: var(--radius-lg); padding: 3rem;
    box-shadow: var(--shadow-modal); transform: translateY(30px); transition: transform 0.4s var(--ease-smooth);
}
.inquiry-modal.active .modal-content { transform: translateY(0); }
.close-modal-btn { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; font-size: 1.5rem; color: var(--color-text-muted); padding: 0.5rem; border-radius: 50%; transition: background 0.3s, color 0.3s; cursor: none; }
.close-modal-btn:hover { background: rgba(0,0,0,0.05); color: var(--color-text); }
.modal-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.modal-header p { color: var(--color-text-muted); margin-bottom: 2rem; font-size: 0.95rem; }

.form-group { margin-bottom: 1.5rem; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
@media (max-width: 480px) { .form-row { flex-direction: column; gap: 0; } }
.inquiry-form label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.inquiry-form input[type="text"], .inquiry-form input[type="email"], .inquiry-form select, .inquiry-form textarea {
    width: 100%; padding: 0.8rem 1rem; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 1rem; background-color: var(--color-bg); transition: border-color 0.3s;
}
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus { border-color: var(--color-primary); outline: none; }
.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip input { display: none; }
.chip span { display: inline-block; padding: 0.5rem 1rem; border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-pill); font-size: 0.9rem; color: var(--color-text-muted); transition: all 0.3s; cursor: none; }
.chip input:checked + span { background-color: rgba(0, 183, 106, 0.1); border-color: var(--color-primary); color: var(--color-primary); font-weight: 600; }
.submit-btn { width: 100%; margin-top: 1rem; }

.modal-success { text-align: center; padding: 2rem 0; }
.modal-success i { font-size: 4rem; color: var(--color-primary); margin-bottom: 1rem; }
.modal-success.hidden { display: none; }

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero-section { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px; overflow: hidden; }
.hero-mesh-bg { position: absolute; inset: 0; background-image: radial-gradient(at 20% 30%, rgba(0, 183, 106, 0.08) 0px, transparent 50%), radial-gradient(at 80% 70%, rgba(0, 183, 106, 0.05) 0px, transparent 50%); filter: blur(40px); z-index: -1; animation: pulseBg 10s ease-in-out infinite alternate; }
@keyframes pulseBg { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }
.hero-title { font-size: clamp(3rem, 6vw, 5.5rem); margin-bottom: 1.5rem; font-weight: 800; }
.hero-subtitle { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--color-text-muted); margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; }
@media (max-width: 480px) { .hero-actions { flex-direction: column; } }
.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.mouse { width: 24px; height: 36px; border: 2px solid var(--color-text-muted); border-radius: 12px; position: relative; }
.wheel { width: 4px; height: 8px; background-color: var(--color-primary); border-radius: 2px; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); animation: scrollWheel 1.5s infinite; }
@keyframes scrollWheel { 0% { top: 4px; opacity: 1; } 100% { top: 20px; opacity: 0; } }

/* ==========================================================================
   6. Sections (The Namu Way, Build, TechStack, Stories, Journey, FAQ)
   ========================================================================== */
.section-wave { line-height: 0; overflow: hidden; margin-bottom: -1px; }
.section-wave svg { display: block; width: 100%; height: 120px; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.section-desc { color: var(--color-text-muted); font-size: 1.1rem; }

/* The Namu Way (Metrics) */
.philosophy-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .philosophy-grid { grid-template-columns: repeat(3, 1fr); } }
.phil-card { padding: 2.5rem; background-color: var(--color-bg); border-radius: var(--radius-lg); transition: transform 0.4s var(--ease-smooth); }
.phil-card:hover { transform: translateY(-8px); }
.phil-icon { font-size: 2.5rem; color: var(--color-primary); margin-bottom: 1.5rem; }
.phil-card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.phil-card p { color: var(--color-text-muted); font-size: 0.95rem; }

.metrics-wrap { display: flex; flex-direction: column; background-color: var(--color-surface-dark); color: #fff; padding: 3rem; border-radius: var(--radius-lg); gap: 2rem; text-align: center; }
@media (min-width: 768px) { .metrics-wrap { flex-direction: row; justify-content: space-around; align-items: center; text-align: left; } }
.metric-item { display: flex; flex-direction: column; align-items: center; }
.metric-value { font-size: 3.5rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-primary); line-height: 1; }
.metric-unit { font-size: 2rem; }
.metric-label { font-size: 1.1rem; color: #aaa; margin-top: 0.5rem; font-weight: 500; }
.metric-divider { width: 100%; height: 1px; background-color: rgba(255,255,255,0.1); }
@media (min-width: 768px) { .metric-divider { width: 1px; height: 60px; } }

/* Soft Bento Grid (Expertise & Projects) */
.bento-grid, .project-bento { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) {
    /* Asymmetrical Grid for Expertise to look more technical */
    .bento-grid { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 240px; }
    .col-span-2 { grid-column: span 2; } .col-span-1 { grid-column: span 1; }
    .row-span-2 { grid-row: span 2; } .row-span-1 { grid-row: span 1; }
    
    .project-bento { grid-template-columns: repeat(2, 1fr); }
}
.bento-card, .project-card { background-color: var(--color-surface); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
/* Technical Background Pattern for Expertise */
.bento-card::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(0, 183, 106, 0.05) 1px, transparent 1px); background-size: 20px 20px; opacity: 0; transition: opacity 0.4s var(--ease-smooth); z-index: 0; pointer-events: none; }
.bento-card:hover::before { opacity: 1; }
.bento-content { position: relative; z-index: 1; }
.glow-effect { transition: box-shadow 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth); }
.glow-effect:hover { box-shadow: var(--shadow-glow); transform: translateY(-4px); }
.bento-icon { font-size: 2.2rem; color: var(--color-primary); margin-bottom: 1rem; }

/* Tech Stack (Marquee) */
.marquee-wrapper { width: 100%; overflow: hidden; padding: 2rem 0; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: flex; width: max-content; animation: scrollMarquee 30s linear infinite; }
.tech-item { display: flex; align-items: center; gap: 0.8rem; font-size: 1.5rem; padding: 1rem 2.5rem; color: var(--color-text-muted); background-color: var(--color-surface); border-radius: var(--radius-pill); margin: 0 1rem; box-shadow: var(--shadow-soft); transition: color 0.3s, transform 0.3s; }
.tech-item:hover { color: var(--color-primary); transform: scale(1.05); }
.tech-item i { font-size: 2rem; }
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Projects specifics */
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600; width: max-content; }
.status-live { background-color: rgba(0, 183, 106, 0.1); color: var(--color-primary); }
.status-dev { background-color: rgba(115, 115, 115, 0.1); color: var(--color-text-muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background-color: currentColor; }
.status-live .dot { animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.project-link { font-size: 1.5rem; color: var(--color-text-muted); transition: color 0.3s; }
.project-link:hover { color: var(--color-primary); }
.project-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.project-desc { color: var(--color-text-muted); font-size: 0.95rem; }

/* Hover-Scroll Parallax Image */
.hover-scroll-container {
    margin-top: 2rem; width: 100%; height: 240px; border-radius: var(--radius-md);
    overflow: hidden; background-color: var(--color-bg); position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
@media (min-width: 768px) { .hover-scroll-container { height: 320px; } }
.hover-scroll-img {
    width: 100%; height: auto; position: absolute; top: 0; left: 0;
    transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}
.project-card:hover .hover-scroll-img {
    /* Mobile hover height calc */
    transform: translateY(calc(-100% + 240px));
}
@media (min-width: 768px) {
    .project-card:hover .hover-scroll-img {
        transform: translateY(calc(-100% + 320px));
    }
}

/* Process Timeline */
.process-timeline { position: relative; max-width: 800px; margin: 0 auto; }
.process-line { position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--color-primary), transparent); opacity: 0.2; }
.process-step { position: relative; padding-left: 4rem; margin-bottom: 3rem; }
.step-number { position: absolute; left: 0; top: 0; width: 48px; height: 48px; background-color: var(--color-surface); border: 2px solid var(--color-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--color-primary); font-family: var(--font-heading); }
.step-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step-content p { color: var(--color-text-muted); }

/* FAQ */
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.05); padding: 1.5rem 0; cursor: pointer; }
.faq-question { display: flex; justify-content: space-between; align-items: center; }
.faq-question h3 { font-size: 1.1rem; font-weight: 500; margin: 0; }
.faq-question i { color: var(--color-primary); transition: transform 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease-smooth); }
.faq-answer p { padding-top: 1rem; color: var(--color-text-muted); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-item.active .faq-answer { max-height: 300px; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.footer-wave { margin-bottom: -1px; }
.site-footer { position: relative; background-color: var(--color-surface-dark); color: #fff; padding: 6rem 0 3rem; overflow: hidden; }

/* Mesh Gradient Background for Footer */
.footer-mesh-bg { position: absolute; inset: 0; background-image: radial-gradient(at 50% 100%, rgba(0, 183, 106, 0.15) 0px, transparent 60%); z-index: 0; pointer-events: none; }

/* Pre-Footer Massive CTA */
.footer-cta { position: relative; z-index: 1; text-align: center; margin-bottom: 5rem; }
.footer-cta-text { font-family: var(--font-heading); font-size: clamp(3rem, 12vw, 10rem); font-weight: 800; line-height: 0.9; color: rgba(255, 255, 255, 0.03); letter-spacing: -0.02em; user-select: none; transition: color 0.4s var(--ease-smooth); }
.footer-cta:hover .footer-cta-text { color: rgba(255, 255, 255, 0.08); }

.footer-content { position: relative; z-index: 1; }

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; } }

.footer-brand { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-logo { font-size: 2.5rem; color: var(--color-primary); font-family: var(--font-heading); line-height: 1; }
.footer-desc { color: #aaa; font-size: 0.95rem; line-height: 1.6; max-width: 300px; }
.footer-socials { display: flex; gap: 1rem; margin-top: 0.5rem; }
.social-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 1.2rem; transition: all 0.3s var(--ease-smooth); }
.social-link:hover { border-color: var(--color-primary); background-color: var(--color-primary); transform: translateY(-3px); }

.footer-col-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: #fff; letter-spacing: 0.05em; text-transform: uppercase; }

/* Services Links */
.footer-links { display: flex; flex-direction: column; gap: 1rem; list-style: none; }
.footer-links a { color: #aaa; transition: color 0.3s, padding-left 0.3s; position: relative; }
.footer-links a::before { content: '→'; position: absolute; left: -15px; opacity: 0; color: var(--color-primary); transition: opacity 0.3s, left 0.3s; }
.footer-links a:hover { color: #fff; padding-left: 15px; }
.footer-links a:hover::before { opacity: 1; left: 0; }

/* Simplified Grid Company Info */
.biz-info-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem 1.5rem; align-items: baseline; font-size: 0.85rem; color: #aaa; }
.biz-label { font-weight: 600; color: #ddd; }
.biz-value { color: #aaa; }

.contact-email-wrapper { margin-top: 1.5rem; }
.contact-email { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; color: var(--color-primary); font-weight: 500; border-bottom: 1px dashed var(--color-primary); padding-bottom: 0.2rem; transition: color 0.3s, border-color 0.3s; }
.contact-email:hover { color: #fff; border-color: #fff; }

.copy-toast { position: absolute; bottom: 40px; left: 0; background-color: var(--color-primary); color: #fff; padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.8rem; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 10; }
.copy-toast.show { opacity: 1; visibility: visible; transform: translateY(-5px); }

/* Bottom Area */
.footer-bottom { border-top: 1px dashed rgba(255,255,255,0.15); padding-top: 2rem; display: flex; flex-direction: column; gap: 1rem; text-align: center; color: #666; font-size: 0.85rem; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; } }

/* ==========================================================================
   8. Animation Utilities (Reveal)
   ========================================================================== */
.reveal-up { opacity: 0; transform: translateY(30px); will-change: opacity, transform; }
