/* ========== UpRow Design System ========== */
:root {
    --teal: #1B4647;
    --teal-light: #245c5d;
    --teal-dark: #132f30;
    --white: #FFFFFF;
    --navy: #051D40;
    --orange: #F18129;
    --orange-dark: #d46e1f;
    --sky: #4EB6D4;
    --sky-light: #e8f6fa;
    --cream: #F9FAFB;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ========== Typography ========== */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { color: var(--gray-600); }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-light); }

/* ========== Layout ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }

/* ========== Top Nav (Desktop) ========== */
.top-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1.5rem; height: 64px;
    display: flex; align-items: center; justify-content: center;
}
.top-nav-inner {
    max-width: 1200px; width: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.top-nav-logo img { height: 32px; width: auto; }
.top-nav-links { display: flex; align-items: center; gap: 2rem; }
.top-nav-links a {
    font-size: 0.9rem; font-weight: 500; color: var(--gray-600);
    transition: color var(--transition);
}
.top-nav-links a:hover { color: var(--teal); }
.top-nav-links .nav-cta {
    background: var(--teal); color: var(--white) !important;
    padding: 0.5rem 1.25rem; border-radius: var(--radius-full);
    font-weight: 600; font-size: 0.85rem;
}
.top-nav-links .nav-cta:hover { background: var(--teal-light); }

@media (max-width: 768px) {
    .top-nav-links { display: none; }
}

/* ========== Bottom Nav (Mobile) ========== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
}
.bottom-nav-inner {
    display: flex; justify-content: space-around; align-items: center;
    max-width: 500px; margin: 0 auto;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    text-decoration: none; color: var(--gray-400);
    font-size: 0.65rem; font-weight: 500;
    padding: 0.25rem 0.75rem; border-radius: var(--radius-sm);
    transition: color var(--transition);
}
.bottom-nav-item svg { width: 24px; height: 24px; }
.bottom-nav-item.active { color: var(--teal); }
.bottom-nav-item:hover { color: var(--teal); }

@media (max-width: 768px) {
    .bottom-nav { display: block; }
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border: none; border-radius: var(--radius-full);
    font-family: inherit; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
}
.btn-primary { background: var(--teal); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--teal-light); transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); box-shadow: var(--shadow-md); }
.btn-orange:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-outline { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }
.btn-white { background: var(--white); color: var(--teal); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--teal); }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* ========== Cards ========== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--gray-300); transform: translateY(-2px); }
.card-icon {
    width: 56px; height: 56px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1.25rem;
}
.card-icon.teal { background: rgba(27,70,71,0.08); }
.card-icon.orange { background: rgba(241,129,41,0.1); }
.card-icon.sky { background: rgba(78,182,212,0.1); }

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 50%, var(--navy) 100%);
    color: var(--white); padding: 6rem 0 5rem; text-align: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(78,182,212,0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(241,129,41,0.1) 0%, transparent 50%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,0.8); font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; }
.hero .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3.5rem; }
}

/* ========== Features Grid ========== */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ========== Chat Bubbles ========== */
.chat-container { display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble {
    max-width: 85%; padding: 0.875rem 1.125rem;
    border-radius: var(--radius-lg); font-size: 0.95rem; line-height: 1.55;
    animation: fadeUp 0.3s ease;
}
.chat-bubble.kim {
    background: var(--gray-100); color: var(--gray-800);
    border-bottom-left-radius: 4px; align-self: flex-start;
}
.chat-bubble.user {
    background: var(--teal); color: var(--white);
    border-bottom-right-radius: 4px; align-self: flex-end;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Chat Input ========== */
.chat-input-bar {
    display: flex; gap: 0.75rem; padding: 1rem 1.5rem;
    background: var(--white); border-top: 1px solid var(--gray-200);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
}
.chat-input-bar input {
    flex: 1; padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300); border-radius: var(--radius-full);
    font-family: inherit; font-size: 0.95rem; outline: none;
    transition: border-color var(--transition);
}
.chat-input-bar input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27,70,71,0.1); }
.chat-input-bar button {
    background: var(--teal); color: var(--white); border: none;
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background var(--transition);
}
.chat-input-bar button:hover { background: var(--teal-light); }

@media (max-width: 768px) {
    .chat-input-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
}

/* ========== Quick Actions ========== */
.quick-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0;
}
.quick-action-btn {
    background: var(--white); border: 1px solid var(--gray-300);
    border-radius: var(--radius-full); padding: 0.5rem 1rem;
    font-size: 0.85rem; font-weight: 500; color: var(--teal);
    cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.quick-action-btn:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }

/* ========== Milestone Cards ========== */
.milestone-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 1.25rem;
    display: flex; gap: 1rem; align-items: flex-start;
}
.milestone-icon { font-size: 2rem; flex-shrink: 0; }
.milestone-content h4 { margin-bottom: 0.25rem; }
.milestone-content p { font-size: 0.9rem; }

/* ========== Tips ========== */
.tip-card {
    background: rgba(27,70,71,0.04); border: 1px solid rgba(27,70,71,0.1);
    border-radius: var(--radius); padding: 1.25rem;
}
.tip-card h4 { color: var(--teal); margin-bottom: 0.5rem; }
.tip-card p { font-size: 0.9rem; }

/* ========== Page Header ========== */
.page-hero {
    background: var(--teal); color: var(--white);
    padding: 3.5rem 0; text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255,255,255,0.8); margin-top: 0.5rem; }

/* ========== Footer ========== */
.site-footer {
    text-align: center; padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--gray-200); color: var(--gray-500);
    font-size: 0.85rem;
}
.site-footer a { color: var(--teal); font-weight: 500; }

/* ========== Utility ========== */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ========== Draw Table ========== */
.draw-table { width: 100%; border-collapse: collapse; }
.draw-table th, .draw-table td { padding: 0.75rem 1rem; text-align: left; font-size: 0.9rem; }
.draw-table th { color: var(--teal); font-weight: 600; border-bottom: 2px solid var(--teal); }
.draw-table td { border-bottom: 1px solid var(--gray-200); }
.draw-table .score { font-weight: 700; color: var(--orange); }

/* ========== Responsive ========== */
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .section { padding: 3rem 0; }
}
