/* ==========================================================================
   HCMA Patient Access Index
   ========================================================================== */

:root {
    --primary: #003a63;
    --primary-dark: #002a49;
    --secondary: #5bc7fa;

    /* Accessible stand-in for --secondary wherever it carries text: the design
       blue is 1.85:1 on white, this is 4.76:1. Fills and gradients keep #5bc7fa. */
    --secondary-strong: #0b7aaf;
    --secondary-strong-dark: #096289;

    --tertiary: #5d9732;
    --tertiary-dark: #4b7a28;
    --black: #2a2a2a;
    --grey: #5a5a5a;
    --grey-nav: #676767;
    --border: #c7c7c7;
    --surface: #fff;
    --tint: #f4f8fb;

    --review-gradient: linear-gradient(112.34deg, #ade3fd 0%, #5bc7fa 100%);
    --nav-shadow: 0 4px 12px rgba(0, 0, 0, .25);

    --content: 1176px;
    --gutter: 24px;
}

/* Base -------------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 16px;
    color: var(--black);
    background: var(--surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: var(--gutter);
    z-index: 20;
    background: var(--surface);
    color: var(--primary);
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 4px;
    box-shadow: var(--nav-shadow);
}

.skip-link:focus {
    top: 12px;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    line-height: normal;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--surface);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--surface);
}

.btn-secondary {
    background: var(--secondary-strong);
    color: var(--surface);
}

.btn-secondary:hover {
    background: var(--secondary-strong-dark);
    color: var(--surface);
}

.btn-tertiary {
    background: var(--tertiary);
    color: var(--surface);
}

.btn-tertiary:hover {
    background: var(--tertiary-dark);
    color: var(--surface);
}

/* Keeps the bordered variant the same 34px tall as the solid buttons. */
.btn-alt {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 7px 11px;
}

.btn-alt:hover {
    background: var(--primary);
    color: var(--surface);
}

.btn-block {
    width: 100%;
}

/* Header ------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--nav-shadow);
}

.utility-bar {
    display: flex;
    justify-content: flex-end;
    background: var(--primary);
    padding: 6px var(--gutter);
}

.utility-link {
    font-size: 16px;
    line-height: normal;
    color: var(--surface);
}

.utility-link:hover {
    color: var(--secondary);
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 6px var(--gutter);
}

.masthead-logo img {
    width: 239px;
    height: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a,
.footer-nav a {
    font-size: 20px;
    font-weight: 600;
    line-height: normal;
}

.main-nav a {
    color: var(--grey-nav);
}

.main-nav a:hover {
    color: var(--primary);
}

/* Mobile nav toggle ------------------------------------------------------- */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 0 auto;
    background: var(--primary);
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero -------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 600px;
    padding: 72px;
    border: 2px solid var(--border);
    border-left: 0;
    border-right: 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Carousel Caption, Frosting=Light. The translucent panel keeps the copy
   legible wherever the photo's laptop lands as the viewport narrows. */
.hero-caption {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* 648px is the designed text measure, so the panel is that plus its own
       padding — otherwise the 40px inset would reflow the headline. */
    width: 728px;
    max-width: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, .8);
}

.hero-eyebrow {
    font-size: 22px;
    font-weight: 800;
    line-height: normal;
    text-transform: uppercase;
    color: var(--tertiary);
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: normal;
}

/* Figma's 24px hero size was set against a one-line lorem string; the approved
   copy is ~280 characters, so it steps down to keep the panel a sane height. */
.hero-text {
    font-size: 19px;
    line-height: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    padding-top: 12px;
}

/* Report selector --------------------------------------------------------- */

.selector-band {
    background: var(--primary);
    padding: 28px var(--gutter);
}

.selector {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 16px 24px;
    max-width: var(--content);
    margin: 0 auto;
}

.selector-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 1 260px;
}

.selector-label {
    font-size: 15px;
    font-weight: 700;
    line-height: normal;
    color: var(--surface);
}

.selector-input {
    font-family: inherit;
    font-size: 16px;
    line-height: normal;
    color: var(--black);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    width: 100%;
}

.selector-submit {
    padding-top: 11px;
    padding-bottom: 11px;
}

.selector-band :focus-visible {
    outline-color: var(--surface);
}

.selector-fallback {
    max-width: var(--content);
    margin: 16px auto 0;
    color: var(--surface);
    text-align: center;
}

/* Reports ----------------------------------------------------------------- */

.reports {
    max-width: calc(var(--content) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 50px var(--gutter) 102px;
    text-align: center;
}

.section-head {
    max-width: 721px;
    margin: 0 auto 24px;
}

.section-title {
    font-size: 38px;
    font-weight: 800;
    line-height: normal;
    margin-bottom: 12px;
}

.section-text {
    line-height: normal;
    color: var(--grey);
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 25px;
}

.report-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.report-map {
    width: 100%;
    height: auto;
}

.report-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.report-specialty {
    font-size: 20px;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
}

.report-specialty-primary {
    color: var(--tertiary);
}

.report-specialty-obgyn {
    font-weight: 600;
    color: var(--secondary-strong);
}

.report-market {
    font-size: 22px;
    font-weight: 800;
    line-height: normal;
    text-transform: uppercase;
    color: var(--primary);
}

.report-period {
    line-height: normal;
    color: var(--grey);
}

.reports-all {
    margin-top: 24px;
}

/* Content panels ---------------------------------------------------------- */

.panel {
    padding: 72px var(--gutter);
    text-align: center;
}

.panel-tint {
    background: var(--tint);
}

.panel-inner {
    max-width: var(--content);
    margin: 0 auto;
}

.panel-narrow {
    max-width: 820px;
}

/* Clears the sticky header when a nav anchor is followed. */
[id] {
    scroll-margin-top: 140px;
}

/* About: what it is / what it isn't ---------------------------------------- */

.about-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    text-align: left;
}

.feature {
    border-top: 3px solid var(--tertiary);
    padding-top: 16px;
}

/* Signals the "what it isn't" caveat without shouting at the reader. */
.feature-caution {
    border-top-color: var(--secondary-strong);
}

.feature-title {
    font-size: 22px;
    font-weight: 800;
    line-height: normal;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature-text {
    color: var(--grey);
    line-height: 25px;
}

/* Methodology ------------------------------------------------------------- */

.note {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 24px 28px;
}

.note p {
    color: var(--grey);
    line-height: 25px;
}

.note p+p {
    margin-top: 16px;
}

/* Request a review -------------------------------------------------------- */

.review {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    background: var(--review-gradient);
    padding: 48px 132px;
}

.review-icon {
    flex: none;
    width: 100px;
    height: 100px;
}

.review-copy {
    flex: 0 1 721px;
}

.review-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.review-text {
    font-size: 18px;
    line-height: 25px;
}

.review-text+.review-text {
    margin-top: 12px;
}

.review-cta {
    flex: none;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--primary);
    border-top: 2px solid var(--grey);
    padding: 20px var(--gutter);
    color: var(--surface);
}

.footer-title {
    font-size: 20px;
    font-weight: 800;
    line-height: normal;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.footer-sub,
.footer-legal {
    font-size: 18px;
    line-height: 25px;
}

.footer-legal {
    text-align: right;
    max-width: 420px;
}

.footer-copyright {
    font-size: 15px;
    margin-top: 4px;
    opacity: .8;
}

.footer-nav a {
    color: var(--surface);
}

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

.site-footer :focus-visible {
    outline-color: var(--surface);
}

/* Large screens ----------------------------------------------------------- */

@media (max-width: 1400px) {

    .review {
        padding-left: 72px;
        padding-right: 72px;
    }
}

/* Below the 1224px design width the grid drops a column and stays centred, so
   cards keep close to their designed 275px rather than stretching. */

@media (max-width: 1240px) {

    .hero {
        padding: 56px 48px;
    }

    .hero-title {
        font-size: 52px;
    }


    .report-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 950px;
        margin: 0 auto;
    }

    .review {
        padding-left: 48px;
        padding-right: 48px;
    }
}

@media (max-width: 1080px) {

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px var(--gutter);
    }

    .footer-nav .nav-list {
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-legal {
        text-align: left;
    }
}

/* Tablet ------------------------------------------------------------------ */

@media (max-width: 940px) {

    .masthead {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .masthead-cta {
        order: 1;
        margin-left: auto;
    }

    .main-nav {
        order: 3;
        display: none;
        width: 100%;
        border-top: 1px solid var(--border);
        padding: 8px 0 12px;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .main-nav .nav-list a {
        display: block;
        padding: 8px 0;
    }

    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 600px;
    }

    .reports {
        padding-bottom: 72px;
    }

    .review {
        flex-wrap: wrap;
        gap: 24px;
        padding: 40px var(--gutter);
    }

    .review-copy {
        flex: 1 1 420px;
    }

    .review-cta {
        margin-left: 148px;
    }
}

/* Mobile ------------------------------------------------------------------ */

@media (max-width: 680px) {

    .masthead {
        gap: 12px;
    }

    .masthead-logo img {
        width: 150px;
    }

    .nav-toggle {
        margin-left: auto;
    }

    /* Too narrow for the header CTA, so it moves inside the collapsed menu. */
    .masthead-cta {
        display: none;
        order: 4;
        margin: 0 0 8px;
    }

    .main-nav.is-open~.masthead-cta {
        display: inline-flex;
    }

    .hero {
        min-height: 0;
        padding: 32px var(--gutter);
    }

    .hero-caption {
        padding: 24px;
    }

    /* Holds the laptop out of frame so the caption stays on the light side. */
    .hero-bg {
        object-position: left center;
    }

    .hero-eyebrow {
        font-size: 18px;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-text {
        font-size: 17px;
        line-height: 27px;
    }

    .section-title {
        font-size: 30px;
    }

    .review-title {
        font-size: 24px;
    }

    .report-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 300px;
    }

    .panel {
        padding: 48px var(--gutter);
    }

    .about-split {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Fields and button share one full-width column so their edges line up. */
    .selector-field {
        flex: 1 1 100%;
    }

    .selector-submit {
        width: 100%;
    }

    .note {
        padding: 20px 22px;
    }

    .review {
        padding: 32px var(--gutter);
    }

    .review-cta {
        margin-left: 0;
    }
}

@media (max-width: 420px) {

    .hero-title {
        font-size: 32px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }
}

/* Reduced motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    * {
        transition: none !important;
    }
}
