/**
 * common.css — 나래트렌드 v2.0 공통 디자인 시스템
 * 
 * 모든 페이지가 공유하는 CSS 변수, 리셋, 네비게이션, 푸터, 기본 컴포넌트
 * index.php, global.php, aint.php, farmnote.php 에서 공통 사용
 */

/* ========================================
   CSS Variables — 브랜드 시스템
   ======================================== */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1f2a45;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(52, 211, 153, 0.3);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-green: #34d399;
    --accent-green-dim: rgba(52, 211, 153, 0.15);
    --accent-blue: #60a5fa;
    --accent-blue-dim: rgba(96, 165, 250, 0.15);
    --accent-amber: #fbbf24;
    --accent-amber-dim: rgba(251, 191, 36, 0.15);
    --accent-rose: #fb7185;
    --accent-rose-dim: rgba(251, 113, 133, 0.15);
    
    --font-display: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 60px rgba(52, 211, 153, 0.08);
    --shadow-glow-amber: 0 0 60px rgba(251, 191, 36, 0.08);
    --shadow-glow-blue: 0 0 60px rgba(96, 165, 250, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover { opacity: 0.8; }

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

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

/* 배경 그리드 패턴 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(52, 211, 153, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   Navigation (공통)
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}
.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.nav-logo span {
    color: var(--accent-green);
}
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
    opacity: 1;
}
.nav-lang {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-lang:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* ========================================
   Section Common
   ======================================== */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}
.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}
.section-desc {
    color: var(--text-secondary);
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.8;
}

/* ========================================
   Page Hero (하위 페이지용)
   ======================================== */
.page-hero {
    position: relative;
    z-index: 1;
    padding: 160px 0 80px;
}
.page-hero .breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}
.page-hero .breadcrumb a {
    color: var(--text-muted);
}
.page-hero .breadcrumb a:hover {
    color: var(--accent-green);
}
.page-hero .breadcrumb span {
    margin: 0 8px;
    opacity: 0.4;
}
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.page-hero h1 em {
    font-style: normal;
}
.page-hero .lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.8;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all 0.3s ease;
}
.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

/* ========================================
   Stat / Metric Box
   ======================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s;
}
.stat-box:hover {
    border-color: var(--border-accent);
}
.stat-box .stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.stat-box .stat-value .unit {
    font-size: 1rem;
    color: var(--accent-green);
}
.stat-box .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ========================================
   Timeline
   ======================================== */
.timeline {
    position: relative;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-amber), var(--accent-green));
    opacity: 0.3;
}
.timeline-item {
    position: relative;
    padding-bottom: 48px;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-amber);
    border: 3px solid var(--bg-primary);
    z-index: 1;
}
.timeline-item.active::before {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}
.timeline-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-amber);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.timeline-item.active .timeline-year {
    color: var(--accent-green);
}
.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Image Placeholder (사진 미확보 시)
   ======================================== */
.img-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 12px;
}
.img-placeholder .ph-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}
.img-placeholder .ph-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}
.btn-primary {
    background: var(--accent-green);
    color: var(--bg-primary);
}
.btn-primary:hover {
    background: #2dd4a0;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(52, 211, 153, 0.25);
}
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    opacity: 1;
}
.btn-amber {
    background: var(--accent-amber);
    color: var(--bg-primary);
}
.btn-amber:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
}

/* ========================================
   Patent Badge
   ======================================== */
.patent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ========================================
   CTA Section (공통)
   ======================================== */
.cta {
    text-align: center;
    padding: 120px 0;
    position: relative;
    z-index: 1;
}
.cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.cta h2 em {
    font-style: normal;
    color: var(--accent-green);
}
.cta p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 40px;
}
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================
   Footer (공통)
   ======================================== */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 2;
}
.footer-info strong {
    color: var(--text-secondary);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .stat-grid { grid-template-columns: 1fr; }
}
