/* ===================================
   Vital Signs Tracker - Main Styles
   Colors derived from CWV palette:
   Green:  #0cce6b
   Orange: #ffa400
   Red:    #ff4e42
   =================================== */

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

:root {
    --green: #0cce6b;
    --green-light: #e8faf0;
    --orange: #ffa400;
    --orange-light: #fff5e0;
    --red: #ff4e42;
    --red-light: #ffe8e7;
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --text-light: #8a8aa0;
    --bg: #ffffff;
    --bg-subtle: #f8f9fc;
    --bg-dark: #0f1117;
    --bg-card: #ffffff;
    --border: #e8e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

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

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

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

ul {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.btn-primary:hover {
    background: #0ab85f;
    border-color: #0ab85f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 206, 107, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover {
    border-color: var(--green);
    color: var(--green);
}

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo img {
    height: 32px;
    width: auto;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Hero --- */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--green-light);
    color: #0a9e54;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--green) 0%, #0a9e54 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 40px;
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-metrics {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.metric-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--green);
}

.metric-good .metric-value { color: var(--green); }

/* --- Problem / Solution Section --- */
.problem-section {
    padding: 80px 0;
    background: var(--bg);
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.problem-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
}

.problem-card-good {
    background: var(--green-light);
    border-color: rgba(12, 206, 107, 0.2);
}

.problem-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.problem-icon-bad {
    background: var(--red-light);
    color: var(--red);
}

.problem-icon-good {
    background: rgba(12, 206, 107, 0.15);
    color: var(--green);
}

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

.problem-card li {
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-left: 20px;
    position: relative;
}

.problem-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.problem-card-good li::before {
    background: var(--green);
}

/* --- Dashboard Preview --- */
.dashboard-preview {
    padding: 80px 0;
    background: var(--bg-subtle);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-header h2 {
    margin-bottom: 12px;
}
.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.dashboard-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.dashboard-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f0f5;
    border-bottom: 1px solid var(--border);
}

.dashboard-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}
.dashboard-dot:first-child { background: #ff5f57; }
.dashboard-dot:nth-child(2) { background: #ffbd2e; }
.dashboard-dot:nth-child(3) { background: #28c940; }

.dashboard-url {
    margin-left: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--bg-card);
    padding: 4px 16px;
    border-radius: 6px;
    flex: 1;
    max-width: 320px;
}

.dashboard-mockup {
    padding: 32px;
}

/* Mock Metric Cards */
.mock-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.mock-metric-card {
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.mock-metric-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.mock-metric-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.mock-metric-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mock-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.mock-badge-green { background: var(--green); }
.mock-badge-orange { background: var(--orange); }
.mock-badge-red { background: var(--red); }

.mock-badge-label {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Mock Charts */
.mock-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.mock-chart {
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.mock-chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.mock-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 0 8px;
}

.mock-bar {
    flex: 1;
    background: linear-gradient(180deg, #6fa8f5 0%, #4285f4 100%);
    border-radius: 3px 3px 0 0;
    min-width: 8px;
    transition: height 0.6s ease;
}

.mock-line-chart {
    width: 100%;
    height: 120px;
}

/* Mock Table */
.mock-table {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.mock-table-title {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.mock-table-header,
.mock-table-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr repeat(5, 1fr);
    padding: 10px 20px;
    font-size: 0.8rem;
    gap: 8px;
    align-items: center;
}

.mock-table-header {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mock-table-row {
    border-bottom: 1px solid var(--border);
}
.mock-table-row:last-child {
    border-bottom: none;
}

.mock-table-row .mock-badge {
    font-size: 0.75rem;
    text-align: center;
    display: block;
    padding: 3px 6px;
}

/* --- Features --- */
.features {
    padding: 100px 0;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.feature-card:hover {
    border-color: rgba(12, 206, 107, 0.3);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--green-light);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon-red {
    background: var(--red-light);
    color: var(--red);
}

.feature-icon-orange {
    background: var(--orange-light);
    color: var(--orange);
}

.feature-icon-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.feature-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.feature-icon + .feature-tag {
    background: var(--green-light);
    color: #0a9e54;
    border-color: rgba(12, 206, 107, 0.2);
}

.feature-icon.feature-icon-red + .feature-tag {
    background: var(--red-light);
    color: var(--red);
    border-color: rgba(255, 78, 66, 0.2);
}

.feature-icon.feature-icon-orange + .feature-tag {
    background: var(--orange-light);
    color: #b87400;
    border-color: rgba(255, 164, 0, 0.2);
}

.feature-icon.feature-icon-purple + .feature-tag {
    background: #f3e8ff;
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.2);
}

.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- How It Works --- */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-subtle);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.step {
    text-align: center;
    max-width: 280px;
    padding: 32px 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--border);
    padding-top: 48px;
    font-weight: 300;
}

/* --- Pricing --- */
.pricing {
    padding: 100px 0;
    background: var(--bg);
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-label.toggle-active {
    color: var(--text);
    font-weight: 600;
}

.save-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--green-light);
    color: var(--green);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.toggle-switch {
    width: 48px;
    height: 28px;
    border-radius: 100px;
    background: var(--border);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.toggle-switch.active {
    background: var(--green);
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(20px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    transition: all 0.2s;
}

.pricing-card:hover {
    box-shadow: var(--shadow);
}

.pricing-card-popular {
    border-color: var(--green);
    box-shadow: var(--shadow);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--green);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 100px;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-sites {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.pricing-amount {
    margin-bottom: 28px;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.price-period {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 400;
}

.pricing-features {
    margin-bottom: 28px;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 24px;
    position: relative;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
    font-size: 0.85rem;
}

/* --- Testimonials --- */
.testimonials {
    padding: 100px 0;
    background: var(--bg-subtle);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    padding: 32px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.testimonial-stars {
    color: var(--orange);
    font-size: 1.1rem;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0;
    background: var(--bg);
}

.cta-inner {
    text-align: center;
    padding: 72px 48px;
    border-radius: var(--radius-lg);
    background: var(--bg-dark);
    color: #fff;
}

.cta-inner h2 {
    margin-bottom: 16px;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.cta-inner p {
    max-width: 540px;
    margin: 0 auto 32px;
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
}

.cta-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

/* --- Footer --- */
.footer {
    padding: 60px 0 32px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 320px;
}
.footer-brand img {
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.footer-brand a {
    color: var(--green);
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.footer-col a:hover {
    color: var(--green);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 1024px) {
    .mock-metrics-row {
        grid-template-columns: 1fr;
    }
    .mock-charts-row {
        grid-template-columns: 1fr;
    }
    .mock-table-header,
    .mock-table-row {
        font-size: 0.7rem;
        padding: 8px 12px;
        grid-template-columns: 1.2fr 1.2fr repeat(5, 0.8fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
        box-shadow: var(--shadow);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-toggle {
        display: flex;
    }

    .hero { padding: 120px 0 60px; }
    .hero-cta { flex-direction: column; align-items: center; }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }
    .step-arrow {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-mockup {
        padding: 16px;
    }

    .mock-table-header,
    .mock-table-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .mock-table-header span:nth-child(n+4),
    .mock-table-row span:nth-child(n+4) {
        display: none;
    }
    .mock-table-header span:nth-child(4),
    .mock-table-row span:nth-child(4) {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }
    .footer-links {
        gap: 40px;
    }

    .cta-inner {
        padding: 48px 24px;
    }
}

@media (max-width: 480px) {
    .hero-metrics {
        gap: 8px;
    }
    .metric-pill {
        padding: 6px 12px;
    }
    .metric-label { font-size: 0.7rem; }
    .metric-value { font-size: 0.8rem; }
    .price { font-size: 2.5rem; }
}
