@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Poppins:wght@400;500;600&family=Roboto:wght@400;500&display=swap');

:root {
    --brand-primary: #002554;
    --brand-secondary: #1a365d;
    --brand-accent: #a7def5;
    --brand-text: #111a26;
    --surface: #f4f7fb;
    --white: #ffffff;
    --border: #d8e2f0;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    color: var(--brand-text);
    background: linear-gradient(160deg, #f8fbff 0%, #ecf3fb 100%);
}

body:focus-within {
    scroll-behavior: smooth;
}

main {
    flex: 1 0 auto;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 37, 84, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
}

.brand img {
    width: 230px;
    max-width: 42vw;
    display: block;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.top-nav a {
    text-decoration: none;
    color: var(--brand-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.top-nav a:hover {
    color: var(--brand-secondary);
}

.hero-band {
    background: linear-gradient(128deg, var(--brand-primary) 0%, #12396d 66%, #24538a 100%);
    color: var(--white);
    padding: 3.7rem 0 3.2rem;
}

.hero-band.mini {
    padding: 2.8rem 0;
}

.eyebrow {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.92;
}

h1,
h2,
h3 {
    font-family: 'Lora', serif;
    color: var(--brand-primary);
}

.hero-band h1 {
    margin: 0.35rem 0 0.6rem;
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.hero-band p {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    max-width: 760px;
}

.service-selector {
    padding: 2.5rem 0 3.5rem;
}

.services-grid {
    display: grid;
    gap: 1.4rem;
}

.services-grid.one-card {
    grid-template-columns: minmax(280px, 760px);
}

.services-grid.two-cards {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.service-card {
    background: linear-gradient(170deg, var(--white) 0%, #f9fcff 100%);
    border: 1px solid var(--border);
    border-left: 6px solid var(--brand-accent);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 14px 32px rgba(0, 37, 84, 0.08);
}

.service-kicker {
    margin: 0;
    color: var(--brand-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-card h2 {
    margin: 0.45rem 0;
    font-size: 1.9rem;
}

.card-copy {
    margin: 0.4rem 0 1rem;
    color: #26384b;
}

.features {
    margin: 0 0 1.4rem;
    padding-left: 1.2rem;
    color: #1f3246;
}

.features li {
    margin-bottom: 0.35rem;
}

.status-note {
    margin-top: 1rem;
    color: #3b4f66;
    font-size: 0.95rem;
}

.intake-shell {
    padding-bottom: 3rem;
}

.form-container {
    margin-top: 1.6rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 18px 32px rgba(0, 37, 84, 0.08);
}

.progress-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.8rem;
}

.progress-step {
    background: #edf3fa;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem;
    text-align: center;
}

.progress-step .step-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    background: var(--white);
    color: var(--brand-secondary);
}

.progress-step .step-label {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #41556b;
}

.progress-step.active {
    border-color: var(--brand-secondary);
    background: #e6f1fb;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--brand-primary);
    color: var(--white);
}

.progress-step.completed {
    border-color: #8eb0d2;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    margin: 0.2rem 0 0.9rem;
    font-size: 1.45rem;
}

.form-grid {
    display: grid;
    gap: 0.9rem;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-group {
    margin-bottom: 0.95rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--brand-primary);
    font-weight: 500;
}

.form-group.required > label::after {
    content: ' *';
    color: #b02030;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #c8d7e9;
    border-radius: 10px;
    padding: 0.72rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.98rem;
    color: var(--brand-text);
    background: #fbfdff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(0, 37, 84, 0.35);
    outline-offset: 2px;
}

input:not([type='radio']):not([type='checkbox']),
select {
    height: 2.85rem;
    line-height: 1.25;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 10px;
    background-image: linear-gradient(45deg, transparent 50%, var(--brand-secondary) 50%),
        linear-gradient(135deg, var(--brand-secondary) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.2rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.13);
}

textarea {
    resize: vertical;
}

.inline-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.inline-options label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    font-weight: 400;
}

.inline-options input {
    width: auto;
}

.conditional-group {
    border-left: 3px solid var(--brand-accent);
    padding-left: 0.9rem;
    margin-bottom: 1rem;
}

.members-stack {
    display: grid;
    gap: 1rem;
}

.member-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--surface);
}

.member-card h3 {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
}

.helper-text {
    margin-top: 0;
    color: #3a5168;
}

.error-text {
    color: #b02030;
    font-weight: 500;
}

.review-box {
    border: 1px solid var(--border);
    background: #f8fbff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.review-box h3 {
    margin: 0.7rem 0 0.2rem;
    font-size: 1.08rem;
}

.review-box p {
    margin: 0.2rem 0;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.step-actions {
    display: flex;
    gap: 0.7rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    border-radius: 999px;
    padding: 0.7rem 1.2rem;
    border: 1px solid transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 0.93rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-accent);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--brand-primary);
    color: var(--brand-accent);
}

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

.btn-outline {
    background: transparent;
    border-color: var(--brand-secondary);
    color: var(--brand-secondary);
}

.btn-secondary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--white);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.footer-wrap p {
    margin: 0;
}

.footer-wrap a {
    color: var(--brand-secondary);
    text-decoration: none;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .form-grid.two-col,
    .form-grid.three-col {
        grid-template-columns: 1fr;
    }

    .progress-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .nav-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .form-container {
        padding: 1rem;
    }

    .form-actions,
    .step-actions {
        width: 100%;
    }

    .step-actions button,
    .btn-outline {
        flex: 1;
    }
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #45a049;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .form-group-row {
        grid-template-columns: 1fr;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }

    .progress-bar::before {
        top: 15px;
    }

    .progress-step .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}
