/* Global — editorial design system (white surfaces, typographic hierarchy) */

:root {
    /* Reference palette */
    --color-slate-dark: #141413;
    --color-ivory-light: #ffffff;
    --color-ivory-medium: #f3f3f3;
    --color-ivory-dark: #d4d4d4;
    --color-oat: #e8e8e8;
    --color-cloud-medium: #b0aea5;
    --color-cloud-light: #dcdcdc;
    --color-cloud-dark: #87867f;
    --color-slate-medium: #3d3d3a;
    --color-slate-light: #5e5d59;

    /* Blue accent — preserved from original site */
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --blue-dark: #0066cc;

    /* Semantic aliases */
    --text: var(--color-slate-dark);
    --text-secondary: var(--color-slate-light);
    --text-tertiary: var(--color-cloud-dark);
    --surface: var(--color-ivory-light);
    --surface-secondary: var(--color-ivory-medium);
    --surface-muted: var(--color-oat);
    --surface-dark: var(--color-slate-dark);
    --divider: var(--color-slate-dark);
    --divider-light: var(--color-cloud-light);

    --primary: var(--blue);
    --primary-dark: var(--blue-dark);
    --accent: var(--blue);
    --light: var(--surface);
    --dark: var(--text);
    --gray-light: var(--surface-secondary);
    --gray-medium: var(--color-cloud-light);
    --gray-dark: var(--text-tertiary);
    --border: var(--divider);

    --primary-rgb: 0, 113, 227;
    --accent-rgb: 0, 113, 227;

    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Lora', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-heading: var(--font-sans);
    --font-body: var(--font-sans);

    --text-caption: 12px;
    --leading-caption: 1.3;
    --text-body-sm: 15px;
    --leading-body-sm: 1.4;
    --tracking-body-sm: -0.03px;
    --text-subheading: 18px;
    --leading-subheading: 1.4;
    --text-heading-sm: 20px;
    --leading-heading-sm: 1.4;
    --text-heading: 24px;
    --leading-heading: 1.3;
    --tracking-heading: -0.12px;
    --text-heading-lg: clamp(2.25rem, 5vw, 3.8125rem);
    --leading-heading-lg: 1.1;
    --tracking-heading-lg: -0.02em;
    --text-display: clamp(2.75rem, 7vw, 5.6875rem);
    --leading-display: 1.1;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-unit: 4px;
    --spacing-4: 4px;
    --spacing-8: 8px;
    --spacing-12: 12px;
    --spacing-16: 16px;
    --spacing-32: 32px;
    --spacing-76: 76px;
    --spacing-84: 84px;

    --spacing-xs: var(--spacing-4);
    --spacing-sm: var(--spacing-8);
    --spacing-md: var(--spacing-16);
    --spacing-lg: var(--spacing-32);
    --spacing-xl: var(--spacing-76);
    --spacing-2xl: var(--spacing-84);
    --spacing-3xl: var(--spacing-84);
    --spacing-xxl: var(--spacing-84);

    /* Layout */
    --page-max-width: 1200px;
    --content-max: var(--page-max-width);
    --section-gap: 61px;
    --card-padding: 31px;
    --header-height: 68px;

    /* Radii */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 8px;
    --radius-xl: 16px;
    --radius-2xl: 16px;
    --radius-3xl: 24px;
    --radius-pill: 999px;
    --radius-cards: 8px;
    --radius-featuredcards: 24px;
    --radius-buttons: calc(var(--radius-featuredcards) - 14px);
    --radius-nav-cta: var(--radius-buttons);

    /* No elevation shadows */
    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-md: none;
    --nav-blur: none;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-regular);
    font-size: var(--text-body-sm);
    line-height: var(--leading-body-sm);
    letter-spacing: var(--tracking-body-sm);
    color: var(--text);
    background-color: var(--surface);
    overflow-x: hidden;
    padding-top: var(--header-height);
    text-rendering: optimizeLegibility;
}

body.page-home {
    padding-top: var(--header-height);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-heading);
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

h1 { font-size: var(--text-heading-lg); font-weight: var(--font-weight-bold); line-height: var(--leading-heading-lg); letter-spacing: var(--tracking-heading-lg); }
h2 { font-size: var(--text-heading); }
h3 { font-size: var(--text-heading-sm); }
h4 { font-size: var(--text-subheading); font-weight: var(--font-weight-medium); }
h5 { font-size: var(--text-body-sm); }
h6 { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.06em; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text);
    line-height: var(--leading-body-sm);
}

a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-xs);
}

.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
}

section {
    padding: var(--section-gap) 0;
}

.text-center {
    text-align: center;
}

/* Typographic emphasis — underline, not color */
.headline-emphasis {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.12em;
    text-decoration-color: var(--text);
}

.section-eyebrow,
.meta-label {
    display: block;
    margin-bottom: var(--spacing-12);
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 44px;
    padding: 12px 31px;
    font-family: var(--font-body);
    font-weight: var(--font-weight-medium);
    font-size: var(--text-body-sm);
    line-height: 1;
    letter-spacing: var(--tracking-body-sm);
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-buttons);
    border: 1px solid var(--text);
    cursor: pointer;
    white-space: nowrap;
    background-color: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btn:hover, .btn:focus {
    text-decoration: none;
    border-color: var(--color-slate-medium);
}

.btn-primary {
    background-color: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--blue-hover);
    border-color: var(--blue-hover);
    color: #fff;
}

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

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--surface-secondary);
    color: var(--text);
}

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

.btn-outline:hover, .btn-outline:focus {
    background-color: var(--surface-secondary);
    color: var(--text);
}

.btn-nav-cta {
    border-radius: var(--radius-buttons);
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-body-sm);
    color: var(--text);
    text-decoration: none;
}

.arrow-link:hover {
    text-decoration: underline;
}

.cta-center {
    text-align: center;
    margin-top: var(--spacing-32);
}

.section-header {
    width: 100%;
    max-width: none;
    margin: 0 0 var(--spacing-32);
    text-align: left;
}

.section-header--narrow {
    max-width: 42rem;
}

.section-header.text-center,
.text-center .section-header {
    text-align: center;
}

.section-header.text-center.section-header--narrow,
.text-center .section-header.section-header--narrow {
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: var(--spacing-12);
}

.section-header p {
    margin-bottom: 0;
    font-size: var(--text-subheading);
    color: var(--text);
}

/* Surfaces */
.surface-card {
    background: var(--surface-secondary);
    border-radius: var(--radius-cards);
    padding: var(--card-padding);
}

.surface-card--oat {
    background: var(--surface-muted);
}

.feature-dark {
    background: var(--surface-dark);
    color: var(--color-ivory-light);
    border-radius: var(--radius-featuredcards);
    padding: var(--card-padding);
}

.feature-dark h1,
.feature-dark h2,
.feature-dark h3,
.feature-dark h4 {
    color: var(--color-ivory-light);
}

.feature-dark p {
    color: var(--color-ivory-dark);
}

.feature-dark .headline-emphasis {
    text-decoration-color: var(--color-ivory-light);
}

.feature-dark .btn-secondary {
    background: var(--color-ivory-light);
    color: var(--text);
    border-color: var(--text);
}

.feature-dark .btn-secondary:hover {
    background: var(--color-ivory-medium);
}

/* Header */
body > header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    background-color: var(--surface-secondary);
    border-bottom: 1px solid transparent;
}

body > header.scrolled {
    border-bottom-color: var(--color-cloud-light);
}

body > header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--content-max);
}

.logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-link:hover {
    text-decoration: none;
}

.logo-text {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1;
}

.logo-link:hover .logo-text {
    color: var(--text);
}

.logo-img {
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.logo h1 {
    font-size: 16px;
    margin-bottom: 0;
    font-weight: var(--font-weight-bold);
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    font-size: var(--text-body-sm);
    line-height: 1.2;
    font-weight: var(--font-weight-regular);
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease, box-shadow 0.15s ease;
}

.nav-links a:not(.btn-contact) {
    padding: 0.375rem 0;
    border: none;
    border-radius: 0;
    box-shadow: inset 0 -2px 0 transparent;
}

.nav-links a:not(.btn-contact):hover,
.nav-links a:not(.btn-contact):focus {
    text-decoration: none;
    color: var(--color-slate-medium);
}

.nav-links a:not(.btn-contact).active {
    font-weight: var(--font-weight-medium);
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--text);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 110;
}

.mobile-menu-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background-color: var(--text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.mobile-menu-toggle span:nth-child(1) { top: 14px; }
.mobile-menu-toggle span:nth-child(2) { top: 19px; }
.mobile-menu-toggle span:nth-child(3) { top: 24px; }

/* Page header */
.page-header {
    background-color: var(--surface);
    padding: var(--spacing-76) 0 var(--spacing-32);
    text-align: left;
    border-bottom: 1px solid var(--color-cloud-light);
}

.page-header .container {
    width: 100%;
    max-width: var(--content-max);
}

.page-header h2 {
    margin-bottom: var(--spacing-12);
    font-size: var(--text-heading-lg);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-heading-lg);
    color: var(--text);
    max-width: none;
}

.page-header p {
    font-size: var(--text-subheading);
    max-width: none;
    margin: 0;
    color: var(--text);
}

.page-header--narrow h2 {
    max-width: 14ch;
}

.page-header--narrow p {
    max-width: 28rem;
}

/* Footer */
footer {
    background-color: var(--surface-secondary);
    color: var(--text);
    padding: var(--section-gap) 0 var(--spacing-32);
    border-top: 1px solid var(--color-cloud-light);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-32);
    margin-bottom: var(--spacing-32);
}

.footer-logo {
    flex: 1 1 220px;
}

.footer-logo .logo-link {
    margin-bottom: 0.75rem;
}

.footer-logo h2 {
    font-size: 16px;
    margin-bottom: 0.375rem;
}

.footer-logo p {
    font-size: var(--text-caption);
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.footer-locations {
    flex: 1 1 280px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-32);
}

.footer-location h3 {
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    color: var(--text-tertiary);
}

.footer-location address,
.footer-location p {
    font-size: var(--text-body-sm);
    color: var(--text);
    font-style: normal;
    line-height: var(--leading-body-sm);
}

.footer-nav {
    flex: 0 1 140px;
}

.footer-nav h3 {
    font-family: var(--font-mono);
    font-size: var(--text-caption);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: var(--text-tertiary);
}

.footer-nav ul {
    list-style: none;
    padding-left: 0;
}

.footer-nav a {
    font-size: var(--text-body-sm);
    color: var(--text);
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.copyright {
    border-top: 1px solid var(--color-cloud-light);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: var(--text-caption);
    color: var(--text-tertiary);
}

.copyright p {
    margin-bottom: 0;
    color: var(--text-tertiary);
}

.copyright p + p {
    margin-top: 0.25rem;
}

.copyright a {
    color: var(--text-tertiary);
    text-decoration: underline;
}

.copyright a:hover {
    color: var(--text-secondary);
}

.footer-bottom a {
    color: var(--text-tertiary);
    text-decoration: underline;
}

.footer-bottom p + p {
    margin-top: 0.25rem;
}

.footer-bottom a:hover {
    color: var(--text-secondary);
}

/* CTA band */
.cta-section {
    background-color: var(--surface-dark);
    text-align: left;
    padding: var(--section-gap) 0;
}

.cta-section h3 {
    margin-bottom: var(--spacing-12);
    font-family: var(--font-serif);
    font-size: var(--text-display);
    font-weight: var(--font-weight-regular);
    line-height: var(--leading-display);
    color: var(--color-ivory-light);
}

.cta-section p {
    max-width: 32rem;
    margin: 0 0 var(--spacing-32);
    font-size: var(--text-subheading);
    color: var(--color-ivory-dark);
}

.cta-section .btn-primary {
    background: var(--color-ivory-light);
    color: var(--text);
    border-color: var(--text);
}

.cta-section .btn-primary:hover {
    background: var(--color-ivory-medium);
    border-color: var(--text);
    color: var(--text);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-12);
    justify-content: flex-start;
    flex-wrap: wrap;
}

.cta-section .btn {
    text-decoration: none;
}

/* Social */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text);
    font-size: var(--text-body-sm);
    text-decoration: none;
}

.social-links a:hover {
    text-decoration: underline;
}

.partner-link-container {
    text-align: center;
    margin: var(--spacing-md) 0 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-cloud-light);
}

.partner-link {
    display: inline-block;
    padding: 0.375rem;
}

.partner-link:hover {
    text-decoration: none;
}

.partner-link img {
    max-height: 32px;
    width: auto;
    /* Tint logo to --surface-dark (testimonials background, #141413) */
    filter: brightness(0);
    opacity: 1;
}

.nav-links .btn-contact {
    background-color: var(--blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 20px;
    border-radius: var(--radius-buttons);
    font-size: var(--text-body-sm);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    margin-left: clamp(0.5rem, 1.5vw, 1rem);
    white-space: nowrap;
    border: 1px solid var(--blue);
    box-shadow: none;
}

.nav-links .btn-contact:hover,
.nav-links .btn-contact:focus,
.nav-links .btn-contact.active {
    background-color: var(--blue-hover);
    border-color: var(--blue-hover);
    color: #fff;
    text-decoration: none;
}

body.menu-open {
    overflow: hidden;
}

.pay-bill-btn {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 99;
    background-color: var(--blue);
    color: #fff;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: var(--radius-buttons);
    font-weight: var(--font-weight-medium);
    font-size: var(--text-body-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: 1px solid var(--blue);
}

.pay-bill-btn:hover {
    background-color: var(--blue-hover);
    border-color: var(--blue-hover);
    color: #fff;
    text-decoration: none;
}

.pay-bill-btn i {
    color: #fff;
}

@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }

    body > header {
        height: var(--header-height);
    }

    body > header .container {
        min-height: var(--header-height);
    }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .logo-link {
        min-width: 0;
    }

    .logo-text {
        white-space: normal;
        overflow: visible;
        max-width: none;
        text-overflow: unset;
        line-height: 1.2;
    }

    nav {
        flex-shrink: 0;
    }

    body:not(.page-home) {
        padding-top: var(--header-height);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        max-height: 0;
        background-color: var(--surface-secondary);
        border-bottom: 1px solid var(--color-cloud-light);
        flex-direction: column;
        align-items: stretch;
        overflow: hidden;
        padding: 0;
        gap: 0;
    }

    .nav-links.active {
        max-height: 480px;
        padding: var(--spacing-16) 0 var(--spacing-32);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a:not(.btn-contact) {
        display: block;
        padding: 0.875rem clamp(1.25rem, 4vw, 2rem);
        font-size: var(--text-body-sm);
        box-shadow: none;
    }

    .nav-links a:not(.btn-contact).active {
        font-weight: var(--font-weight-medium);
        box-shadow: inset 3px 0 0 var(--text);
        padding-left: calc(clamp(1.25rem, 4vw, 2rem) - 3px);
    }

    .nav-links .btn-contact {
        margin: var(--spacing-16) clamp(1.25rem, 4vw, 2rem) 0;
        text-align: center;
        display: flex;
        align-self: stretch;
        width: auto;
        min-height: 44px;
        padding: 12px 24px;
        font-size: var(--text-body-sm);
        border-radius: var(--radius-buttons);
        border: 1px solid var(--blue);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateX(-50%) rotate(45deg);
        top: 19px;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateX(-50%) rotate(-45deg);
        top: 19px;
    }

    .footer-content {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }

    .footer-logo,
    .footer-locations,
    .footer-nav {
        flex: 0 0 auto;
    }

    .footer-locations {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    footer {
        padding: var(--spacing-32) 0 var(--spacing-md);
    }

    .partner-link-container {
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }

    section {
        padding: var(--spacing-32) 0;
    }

    .page-header {
        padding: var(--spacing-32) 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.25rem;
    }

    .logo-text {
        font-size: 15px;
    }
}
