/* Root palette and typography */
:root {
    --ink: #1d2330;
    --ink-soft: #3e4660;
    --sky: #f3f6fb;
    --paper: #ffffff;
    /*--accent: #2a4b8d;*/
    --accent: #1F3849;
    --accent-2: #7b9bd6;
    --success: #2f7b4a;
}

/* Base element resets */
html,
body {
    height: 100%;
}

/* Body defaults */
body {
    margin: 0;
    background: var(--sky);
    color: var(--ink);
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Layout containers */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background: var(--paper);
    border-bottom: 1px solid #e8eef7;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.logo {
    width: 60px;
    height: auto;
    /*border-radius: 8px;*/
    /*background: linear-gradient(135deg, var(--accent), var(--accent-2));*/
    display: inline-block;
}

.brand .logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.85rem;
    letter-spacing: .3px;
    margin: 0;
    font-weight: 700;
    color: #1F3849;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
}

nav a:hover,
nav a:focus {
    color: var(--accent);
}

/* Hero */
.hero {
    background: var(--paper);
    padding: 48px 0 36px;
    border-bottom: 1px solid #e8eef7;
    text-align: center;
}

.hero h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--accent);
}

.hero p {
    margin: 0 auto 18px;
    max-width: 780px;
    color: var(--ink-soft);
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
}

.btn:hover,
.btn:focus {
    background: #203a6d;
}

/* Section blocks */
section {
    padding: 36px 0;
}

section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: var(--ink);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--paper);
    border: 1px solid #e8eef7;
    border-radius: 12px;
    padding: 18px;
}

.kicker {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
}

/* Definition list for quick facts */
.facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.facts dt {
    font-weight: 700;
}

.facts dd {
    margin: 0;
    color: var(--ink-soft);
}

/* Footer */
footer {
    background: var(--paper);
    border-top: 1px solid #e8eef7;
    color: var(--ink-soft);
    padding: 24px 0 48px;
    font-size: .95rem;
}

.legal {
    font-size: .85rem;
    color: #6a728b;
    margin-top: 8px;
}

/* Small screen nav */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    display: none;
    appearance: none;
    border: 1px solid #e0e6f2;
    background: var(--paper);
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 700;
}

@media (max-width:768px) {
    nav ul {
        display: none;
    }

    nav ul.open {
        display: flex;
        width: 100%;
        margin-top: 12px;
    }

    .menu-btn {
        display: inline-block;
    }

    .hero h2 {
        font-size: 1.9rem;
    }
}

/* Form CSS */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

[type="checkbox"],
[type="radio"],
[type="range"] {
    appearance: none;
    flex-shrink: 0;
    padding: 0;
    user-select: none;
}

[type="checkbox"]:focus,
[type="radio"]:focus,
[type="range"]:focus {
    outline: none;
}

/** Components **/

.fs-form {
    display: grid;
    row-gap: 1.5rem;
}

.fs-form:where(.fs-layout__2-column) {
    column-gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
}

fieldset {
    display: grid;
    margin: 1.5rem 0;
    row-gap: 1.5rem;
}

.fs-form:where(.fs-layout__2-column) fieldset {
    column-gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
    grid-column: 1 / -1;
}

.fs-fieldset-title {
    color: var(--color-text-default);
    font-family: var(--font-family-display);
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}

.fs-field {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.fs-label {
    color: var(--color-text-default);
    display: block;
    font-family: var(--font-family-display);
    font-size: 1rem;
    line-height: 1.25rem;
}

.fs-description {
    color: var(--color-text-muted);
    display: block;
    font-size: 1rem;
    line-height: 1.25rem;
}

.fs-button-group {
    display: flex;
    flex-direction: row-reverse;
    column-gap: 1.5rem;
}

.fs-form:where(.fs-layout__2-column) .fs-button-group {
    grid-column: 1 / -1;
}

.fs-button {
    background-color: var(--color-primary);
    border-radius: 9999px;
    color: white;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5rem;
    padding: 0.75rem 2rem;
    transition-duration: 200ms;
    transition-property: background-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.fs-button:hover {
    background-color: var(--color-primary-active);
}

.fs-button:focus-visible {
    background-color: var(--color-primary-active);
    outline: 4px solid var(--color-highlight);
}

.fs-input,
.fs-select {
    appearance: none;
    border-radius: 9999px;
    border-width: 0;
    box-shadow: var(--color-border-default) 0 0 0 1px inset;
    color: var(--color-text-default);
    font-size: 1rem;
    height: 3rem;
    line-height: 1.5rem;
    outline: none;
    padding-left: 1rem;
    padding-right: 1rem;
}

.fs-input:focus-visible,
.fs-select:focus-visible {
    box-shadow: var(--color-border-active) 0 0 0 1px inset;
}

.fs-input::placeholder {
    color: var(--color-text-muted);
}

.fs-checkbox-group,
.fs-radio-group {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

.fs-checkbox-field,
.fs-radio-field {
    column-gap: 0.5rem;
    display: flex;
}

:is(.fs-checkbox-field, .fs-radio-field) .fs-label+.fs-description {
    margin-top: 0.25rem;
}

.fs-checkbox-wrapper,
.fs-radio-wrapper {
    align-items: center;
    display: flex;
    height: 1.25rem;
}

.fs-checkbox,
.fs-radio {
    background-color: #fff;
    border: 1px solid var(--color-border-default);
    height: 1.25rem;
    width: 1.25rem;
}

.fs-checkbox {
    border-radius: 0.25rem;
}

.fs-radio {
    border-radius: 100%;
}

.fs-checkbox:checked,
.fs-radio:checked {
    background-color: var(--color-primary);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-color: transparent;
}

.fs-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.fs-radio:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}

.fs-checkbox:focus-visible,
.fs-radio:focus-visible {
    border-color: var(--color-border-active);
    outline: 4px solid var(--color-highlight);
    outline-offset: 0;
}

.fs-checkbox:checked:focus-visible,
.fs-radio:checked:focus-visible {
    border-color: transparent;
}

.fs-select {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.625em 1.625em;
    padding-right: 2.875rem;
}

.fs-slider {
    background: transparent;
    cursor: pointer;
    height: 1.25rem;
    width: 100%;
}

.fs-slider::-moz-range-track {
    background-color: var(--color-background);
    border-radius: 0.5rem;
    height: 0.5rem;
}

.fs-slider::-webkit-slider-runnable-track {
    background-color: var(--color-background);
    border-radius: 0.5rem;
    height: 0.5rem;
}

.fs-slider::-moz-range-thumb {
    background-color: var(--color-primary);
    border: none;
    /* Removes extra border that FF applies */
    border-radius: 50%;
    height: 1.25rem;
    width: 1.25rem;
}

.fs-slider::-webkit-slider-thumb {
    appearance: none;
    background-color: var(--color-primary);
    border-radius: 50%;
    height: 1.25rem;
    margin-top: -0.375rem;
    /* Centers thumb on the track */
    width: 1.25rem;
}

.fs-slider:focus-visible::-moz-range-thumb {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.fs-slider:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.fs-switch {
    background-color: var(--color-background-alt);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.75' fill='white'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;
    border-radius: 1.25rem;
    cursor: pointer;
    height: 1.25rem;
    transition-duration: 200ms;
    transition-property: background-color, background-position;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    width: 2.5rem;
}

.fs-switch:checked {
    background-color: var(--color-primary);
    background-position: right center;
}

.fs-switch:focus-visible {
    outline: 4px solid var(--color-highlight);
    outline-offset: 0;
}

.fs-textarea {
    appearance: none;
    border-radius: 0.75rem;
    border-width: 0;
    box-shadow: var(--color-border-default) 0 0 0 1px inset;
    color: var(--color-text-default);
    font-size: 1rem;
    line-height: 1.5rem;
    outline: none;
    padding: 0.5rem 0.75rem;
    resize: vertical;
}

.fs-textarea:focus-visible {
    box-shadow: var(--color-border-active) 0 0 0 1px inset;
}

.fs-textarea::placeholder {
    color: var(--color-text-muted);
}

/** Utilities **/

.col-span-full {
    grid-column: 1 / -1;
}

.fs-textarea::placeholder {
    color: var(--color-text-muted);
}

.slider-label-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.25rem;
}

.slider-label-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    white-space: nowrap;
}

/* formspree overrides */
/* ------------------------- */
/* Scope: only .fs-form      */
/* ------------------------- */
.fs-form {
    /* match site card look */
    background: var(--paper);
    border: 1px solid #e8eef7;
    border-radius: 12px;
    padding: 18px;
    max-width: 720px;
    margin: 12px auto 0;

    /* spacing consistent with site */
    display: grid;
    row-gap: 1rem;
}

/* ------------------------- */
/* Field stack + labels      */
/* ------------------------- */
.fs-field {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.fs-label {
    /* classical heading font */
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--ink);
    font-size: 1rem;
}

/* ------------------------- */
/* Inputs / textarea         */
/* ------------------------- */
.fs-input,
.fs-select {
    /* pill → softer pill to match site */
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #dbe3f2;
    background: #fff;
    color: var(--ink);
    font: 400 1rem/1.5 'Merriweather', serif;
    height: auto;
    padding: 10px 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fs-textarea {
    border-radius: 10px;
    border: 1px solid #dbe3f2;
    background: #fff;
    color: var(--ink);
    font: 400 1rem/1.5 'Merriweather', serif;
    padding: 10px 12px;
    min-height: 140px;
    resize: vertical;
    transition: border-color .15s ease, box-shadow .15s ease;
}

/* ------------------------- */
/* Placeholder color         */
/* ------------------------- */
.fs-input::placeholder,
.fs-textarea::placeholder {
    color: #9aa3b5;
}

/* ------------------------- */
/* Focus states              */
/* ------------------------- */
.fs-input:focus,
.fs-textarea:focus,
.fs-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42, 75, 141, .15);
}

/* ------------------------- */
/* Helper text               */
/* ------------------------- */
.fs-description {
    color: var(--ink-soft);
    font: 400 .95rem/1.4 'Merriweather', serif;
}

/* ------------------------- */
/* Button to match .btn      */
/* ------------------------- */
.fs-button {
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s ease;
}

.fs-button:hover,
.fs-button:focus {
    background: #203a6d;
}

/* ------------------------- */
/* Button group alignment    */
/* ------------------------- */
.fs-button-group {
    display: flex;
    justify-content: flex-start;
}

/* ------------------------- */
/* Status color helpers      */
/* ------------------------- */
.fs-form.success #cf-status {
    color: var(--success);
}

.fs-form.error #cf-status {
    color: #b94b4b;
}

/* ------------------------- */
/* Small-screen padding      */
/* ------------------------- */
@media (max-width: 768px) {
    .fs-form {
        padding: 16px;
    }
}