/* ========================================
   리팜바이오(주) - Main Stylesheet
   ======================================== */

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

:root {
    --primary: #2d7a3a;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --accent: #a8d08d;
    --accent-warm: #f4a261;
    --danger: #e74c3c;
    --text-dark: #1a1a2e;
    --text-medium: #333;
    --text-light: #fff;
    --bg-dark: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-glass: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

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

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.95), rgba(45, 122, 58, 0.92));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo-highlight {
    color: #ffe082;
}

.logo-corp {
    font-size: 0.75em;
    vertical-align: super;
    color: rgba(255,255,255,0.7);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffe082;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.nav-link:hover::after {
    width: 60%;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 46, 0.6) 0%,
        rgba(26, 26, 46, 0.35) 30%,
        rgba(26, 26, 46, 0.45) 70%,
        rgba(26, 26, 46, 0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
}

/* --- Welcome Row --- */
.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.guide-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffe082;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.guide-icon {
    display: inline-block;
    animation: bounce 1.5s infinite;
    margin-right: 4px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.welcome-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.welcome-corp {
    font-size: 0.7em;
    vertical-align: super;
    color: rgba(255,255,255,0.7);
}

/* --- Product Table --- */
.product-table-wrapper {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.product-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 160px 1fr;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.table-header .col-stage,
.table-header .col-products {
    padding: 14px 20px;
    display: flex;
    align-items: center;
}

.table-header .col-stage {
    border-right: 1px solid rgba(255,255,255,0.15);
}

.table-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: rgba(255,255,255,0.04);
}

.stage-cell {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
}

.stage-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.stage-desc {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.products-cell {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* --- Product Buttons --- */
.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.product-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.15), transparent);
    transition: 0.5s;
}

.product-btn:hover::before {
    left: 100%;
}

.product-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(45, 122, 58, 0.25);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

.product-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.product-btn.highlight-red {
    background: linear-gradient(135deg, #ffe0e0, #ffcaca);
    border-color: #e74c3c40;
    color: #c0392b;
    font-weight: 600;
}

.product-btn.highlight-red:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.2);
    border-color: var(--danger);
}

.product-btn.highlight-green {
    background: linear-gradient(135deg, #e0f5e0, #c8e6c9);
    border-color: #4caf5040;
    color: var(--primary-dark);
    font-weight: 600;
}

.product-btn.highlight-green:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.25);
    border-color: var(--primary-light);
}

.product-btn.large-btn {
    padding: 12px 18px;
    font-size: 0.88rem;
    line-height: 1.4;
    white-space: normal;
    min-height: 56px;
}

/* --- Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 0.8s ease forwards;
}

.animate-in:nth-child(2) {
    animation-delay: 0.15s;
}

.product-table-wrapper.animate-in {
    animation-delay: 0.3s;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-dark);
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 900px) {
    .table-header {
        grid-template-columns: 120px 1fr;
    }

    .table-row {
        grid-template-columns: 120px 1fr;
    }

    .product-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .product-btn.large-btn {
        padding: 10px 14px;
        font-size: 0.82rem;
        min-height: 48px;
    }

    .welcome-row {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-inner {
        height: 56px;
        padding: 0 16px;
    }

    .logo {
        font-size: 0.9rem;
    }

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

    .nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(27, 94, 32, 0.98), rgba(45, 122, 58, 0.96));
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-120%);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav.open {
        transform: translateY(0);
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .nav-link:hover {
        background: rgba(255,255,255,0.15);
    }

    .hero {
        padding: 70px 12px 24px;
        min-height: auto;
    }

    .guide-text,
    .welcome-text {
        font-size: 0.9rem;
        text-align: center;
    }

    .table-header {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr;
        border-bottom: 2px solid rgba(255,255,255,0.08);
    }

    .stage-cell {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .products-cell {
        padding: 10px 12px;
        gap: 6px;
    }

    .product-btn {
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .product-btn.large-btn {
        padding: 8px 12px;
        font-size: 0.78rem;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.78rem;
    }

    .logo-highlight {
        display: block;
        font-size: 0.68rem;
    }

    .product-btn {
        padding: 6px 8px;
        font-size: 0.72rem;
    }
}
