:root {
    --primary: #2D5A27;
    --primary-light: #E8F5E9;
    --secondary: #1976D2;
    --accent: #D32F2F;
    --bg: #F5F7FA;
    --card-bg: #FFFFFF;
    --text-main: #2C3E50;
    --text-muted: #546E7A;
    --border: #CFD8DC;
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --font-size-base: 20px;
    --font-size-lg: 24px;
    --font-size-xl: 48px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 80px 0;
}

/* Navigation */
.nav {
    background: var(--card-bg);
    padding: 20px 0;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 600;
    transition: color 0.2s;
}

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

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

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

.btn-primary:hover {
    background: #23471e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(45, 90, 39, 0.3);
}

.btn-emergency {
    background: var(--accent);
    color: white;
}

.btn-emergency:hover {
    background: #b71c1c;
    animation: pulse 1.5s infinite;
}

.btn-outline {
    background: transparent;
    border: 3px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #E8F5E9 0%, #FFFFFF 100%);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: var(--font-size-xl);
    margin-bottom: 24px;
    color: var(--primary);
}

.hero p {
    font-size: var(--font-size-lg);
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--text-muted);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

/* Dashboard Preview */
.dashboard-preview {
    background: #F0F4F8;
    border-radius: 24px;
    padding: 40px;
    margin-top: 60px;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.dash-status {
    display: flex;
    gap: 24px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-safe { background: #C8E6C9; color: #2E7D32; }
.status-alert { background: #FFCDD2; color: #C62828; }

.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.dash-main {
    background: white;
    padding: 24px;
    border-radius: 16px;
}

.dash-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.med-list {
    list-style: none;
}

.med-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.med-item:last-child { border-bottom: none; }

.med-time { font-weight: 800; color: var(--secondary); }

/* How it Works */
.steps {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 48px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-num {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 20px;
    font-size: 24px;
}

/* Footer */
footer {
    background: #263238;
    color: white;
    padding: 60px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #B0BEC5;
}

/* Typography Utility */
.text-center { text-align: center; }
.section-title { font-size: 36px; margin-bottom: 16px; text-align: center; }
.section-subtitle { text-align: center; color: var(--text-muted); max-width: 700px; margin: 0 auto 48px; }

/* Dashboard UI Refinements */
.dash-name { margin-bottom: 4px; }
.dash-last-active { color: var(--text-muted); font-size: 16px; }
.dash-activity-title { margin-bottom: 20px; }
.dash-main-highlight { background: var(--primary-light); }
.dash-highlight-title { margin-bottom: 12px; color: var(--primary); }
.dash-highlight-value { font-weight: 800; font-size: 24px; }
.dash-highlight-sub { color: var(--primary); font-weight: 600; }
.dash-side-card { border: 1px solid var(--border); }
.dash-side-title { margin-bottom: 12px; }
.battery-bar { height: 12px; background: #EEE; border-radius: 6px; overflow: hidden; }
.battery-fill { width: 85%; height: 100%; background: var(--primary); }
.battery-text { font-size: 14px; margin-top: 8px; }

/* Section Overrides */
.section-dark { background-color: var(--primary); color: white; }
.section-dark .section-title { color: white; }
.benefit-card { background: rgba(255,255,255,0.1); padding: 32px; border-radius: var(--radius); }
.benefit-card h3 { color: white; }

.footer-brand-text { color: #B0BEC5; max-width: 300px; }
.footer-bottom { margin-top: 60px; padding-top: 20px; border-top: 1px solid #37474F; text-align: center; color: #78909C; font-size: 14px; }

.footer-logo { color: white; margin-bottom: 20px; }
.footer-contact-cta { margin-top: 20px; }
.btn-footer-msg { border-color: white; color: white; padding: 10px 20px; font-size: 16px; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 32px; }
    .dash-grid { grid-template-columns: 1fr; }
    .steps { flex-direction: column; }
}