/* ==========================================
   Global Page Styles
========================================== */
:root {
    --bg: #eef4fb;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #142033;
    --muted: #5f6f86;
    --border: #d8e3f2;
    --border-strong: #bfd2eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #e8f0ff;
    --success-bg: #e8fff1;
    --success-border: #22c55e;
    --error: #c62828;
    --shadow: 0 16px 40px rgba(20, 32, 51, 0.10);
    --shadow-soft: 0 8px 24px rgba(20, 32, 51, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
    min-height: 100vh;
}

a {
    color: var(--primary-dark);
}

/* ==========================================
   Shared Layout Styles
========================================== */
.site-header {
    color: #ffffff;
    padding: 26px 0;
    background: linear-gradient(135deg, #142033 0%, #20344f 55%, #26466b 100%);
    box-shadow: 0 10px 28px rgba(20, 32, 51, 0.18);
}

.header-container,
.page-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.header-container h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    line-height: 1.1;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.9;
}

.subtitle {
    margin: 8px 0 0;
    max-width: 44ch;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
    font-weight: bold;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: linear-gradient(135deg, #3ea3ff, #2563eb);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.page-shell {
    padding: 34px 0 52px;
}

.site-footer {
    text-align: center;
    padding: 24px 20px 30px;
    color: var(--muted);
}

/* ==========================================
   Card Styles
========================================== */
.hero-card,
.card,
.stat-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(191, 210, 235, 0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 28px;
    margin-bottom: 24px;
}

.hero-card h2,
.card h3,
.stat-card h3 {
    margin-top: 0;
}

.hero-card h2 {
    margin-bottom: 10px;
    font-size: clamp(1.7rem, 2.6vw, 2.15rem);
}

.hero-card p:last-child {
    margin-bottom: 0;
    max-width: 60ch;
    line-height: 1.6;
    color: var(--muted);
}

.card {
    max-width: 780px;
    margin: 0 auto;
    padding: 30px;
    box-shadow: var(--shadow);
}

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

.card::before {
    content: "Personalized Plan Builder";
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.stat-card {
    padding: 22px;
}

.stat-card-wide {
    grid-column: span 2;
}

.stat-value {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    line-height: 1.15;
    font-weight: bold;
    color: #0f172a;
}

.stat-note {
    margin-top: 10px;
    color: var(--muted);
}

/* ==========================================
   Form Styles
========================================== */
form {
    margin-top: 18px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #122033;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 1rem;
    color: var(--text);
    background: var(--surface-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-group label,
.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    font-weight: normal;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.radio-group label:hover,
.checkbox-group label:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 8px 18px rgba(20, 32, 51, 0.08);
}

input[type="radio"],
input[type="checkbox"] {
    margin: 0;
    accent-color: var(--primary);
}

.error {
    margin-top: 8px;
    color: var(--error);
    font-size: 0.94rem;
    font-weight: bold;
}

.success-message {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 5px solid var(--success-border);
    border-radius: 14px;
    line-height: 1.6;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
    filter: brightness(1.02);
}

.button-link.secondary {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.button-link.secondary:hover {
    background: #f8fbff;
    box-shadow: 0 8px 16px rgba(20, 32, 51, 0.08);
}

/* ==========================================
   Responsive Styles
========================================== */
@media (max-width: 700px) {
    .hero-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .card {
        padding: 22px;
    }

    .radio-group,
    .checkbox-group,
    .button-row,
    .main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-card-wide {
        grid-column: span 1;
    }

    .main-nav a,
    .button-link,
    button {
        width: 100%;
    }
}
