/* ===== Global Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: #f4f5f7;
}

/* ===== CSS Variables ===== */
:root {
    --bg: #f4f5f7;
    --bg-card: #ffffff;
    --primary: #16a34a;
    --primary-soft: #bbf7d0;
    --primary-dark: #15803d;
    --accent: #f97316;
    --text-main: #0f172a;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* ===== Layout ===== */
.section {
    padding: 3.5rem 7vw;
}

.section.highlight {
    background: #ecfdf3;
}

.section-heading {
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    text-align: left;
}

.section-heading h1,
.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: 0.75rem;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* ===== Header & Nav ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(244, 245, 247, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 7vw;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.nav a {
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    color: var(--text-muted);
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--primary-dark);
    border-color: rgba(22, 163, 74, 0.15);
    background: rgba(22, 163, 74, 0.04);
}

.nav a.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ===== Hero ===== */
.hero {
    padding: 3.5rem 7vw 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero-text p {
    color: var(--text-muted);
    max-width: 32rem;
    font-size: 0.98rem;
}

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.hero-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span {
    font-size: 0.78rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}

/* ===== Card inside Hero ===== */
.hero-card {
    background: radial-gradient(circle at top left, #dcfce7 0, #ffffff 50%);
    border-radius: var(--radius-xl);
    padding: 1.8rem 1.6rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.hero-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.25);
}

.btn.primary:hover {
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

.btn.ghost {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.6);
    color: var(--text-main);
}

.btn.ghost:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: rgba(22, 163, 74, 0.04);
}

.btn.full-width {
    width: 100%;
}

/* ===== Cards, Grids ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.card h2, .card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 1.8rem;
}

.grid-2-inner {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 1.5rem;
}

.feature-card {
    border-top: 3px solid var(--primary);
}

/* ===== Lists ===== */
.checklist {
    list-style: none;
    margin-top: 0.6rem;
}

.checklist li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8rem;
    color: var(--primary-dark);
}

.bullet-list {
    margin-left: 1rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.bullet-list li {
    margin-bottom: 0.3rem;
}

/* ===== Tables ===== */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: #eff6ff;
}

th, td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
}

th {
    font-weight: 600;
    color: var(--text-main);
}

tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* ===== Forms ===== */
.form-card h2 {
    margin-bottom: 1rem;
}

.form-row {
    margin-bottom: 0.85rem;
}

.form-row label {
    display: block;
    font-size: 0.86rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    outline: none;
    background: #f9fafb;
    transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(22, 163, 74, 0.8);
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
    background: #ffffff;
}

textarea {
    resize: vertical;
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ===== Weekly Plan Grid ===== */
.week-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 1rem;
}

.day-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 0.9rem;
    border: 1px dashed rgba(148, 163, 184, 0.7);
}

.day-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.day-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* ===== Stats Section ===== */
.stats {
    padding-top: 0;
    padding-bottom: 3rem;
    display: grid;
    gap: 1.3rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: var(--shadow-soft);
}

.stat-card h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
}

.stat-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Accordion (Research Page) ===== */
.accordion {
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.24);
    overflow: hidden;
}

.accordion input {
    display: none;
}

.accordion-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.3rem;
    cursor: pointer;
    background: #f1f5f9;
}

.accordion-label h2 {
    font-size: 1rem;
}

.accordion-label .tag {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.3rem;
    transition: max-height 0.25s ease;
}

.accordion-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}

.accordion-content h4 {
    margin-top: 0.6rem;
    margin-bottom: 0.25rem;
}

.accordion-content p,
.accordion-content ul {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.accordion-content .grid-2 {
    margin-top: 0.7rem;
    margin-bottom: 0.8rem;
}

/* Expand when checked */
.accordion input:checked ~ .accordion-content {
    padding: 0.9rem 1.3rem 1.1rem;
    max-height: 800px; /* enough for content */
}

/* ===== Footer ===== */
.site-footer {
    padding: 1.5rem 7vw 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    margin-top: 2rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 2rem;
    }

    .hero-card {
        order: -1;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .section,
    .hero {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .week-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stats {
        grid-template-columns: minmax(0, 1fr);
    }
}
