/* MedLink Technologies — light mode design system
   Palette from Branding - Color - Font AI Guidance.md */
:root {
    color-scheme: light;
    --ink: #101820;            /* graphite black — headings, wordmark */
    --ink-deep: #080b0f;       /* deep black */
    --text: #2c3540;           /* body text */
    --muted: #7a8694;          /* steel gray — secondary text */
    --line: #dbe3ea;           /* light border derived from cool gray */
    --brand: #0c8ccb;          /* primary MedLink blue */
    --brand-strong: #0a76ab;   /* darker blue for hover / small text contrast */
    --brand-bright: #2ca9e1;   /* bright blue accent */
    --brand-soft: #8ed0f0;     /* light blue highlight */
    --tint: #eef6fb;           /* pale blue tint for section bands */
    --bg: #ffffff;
    --panel: #ffffff;
    --shell: min(1120px, 92vw);
    --font-display: "Montserrat", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

.shell {
    width: var(--shell);
    margin: 0 auto;
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 8px 0;
    z-index: 20;
}

.skip-link:focus {
    left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--brand-bright);
    outline-offset: 2px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    z-index: 10;
}

.nav-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 1.5rem;
    min-height: 88px;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
    padding: 0.35rem 0;
    justify-self: start;
}

.brand-logo {
    display: block;
    height: clamp(48px, 5.5vw, 64px);
    width: auto;
}

.site-nav {
    display: flex;
    gap: 0.4rem;
    justify-self: end;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: var(--brand-strong);
    background: var(--tint);
}

.site-nav .nav-cta {
    background: var(--brand);
    color: #fff;
}

.site-nav .nav-cta:hover {
    background: var(--brand-strong);
    color: #fff;
}

/* Page scaffold */
.page {
    padding-bottom: 4rem;
}

.section {
    margin-top: 3rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding-top: 1rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
    color: var(--muted);
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.5rem;
    color: var(--line);
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}

/* Legal and policy documents */
.legal-updated {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.legal-doc {
    max-width: 72ch;
    padding: clamp(1.5rem, 4vw, 2.4rem);
}

.legal-doc h2 {
    margin: 2rem 0 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-doc p {
    margin: 0.8rem 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.legal-doc ul {
    margin: 0.8rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
}

.legal-doc ul li::marker {
    color: var(--brand);
}

/* Hero */
.hero {
    background: linear-gradient(180deg, var(--tint) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
    padding: clamp(2.2rem, 5vw, 4rem) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
}

.hero-copy h1 {
    margin: 0.6rem 0 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    font-size: clamp(1.7rem, 3.8vw, 2.7rem);
    max-width: 24ch;
}

.hero-copy p {
    margin: 1rem 0 0;
    color: var(--muted);
    max-width: 60ch;
    font-size: 1.05rem;
}

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(16, 24, 32, 0.10);
    background: #fff;
}

.hero-art-compact img {
    max-height: 260px;
    object-fit: cover;
}

.hero.compact {
    padding: clamp(1.8rem, 4vw, 3rem) 0;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--brand);
    color: #ffffff;
    padding: 0.72rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: var(--brand-strong);
    box-shadow: 0 6px 18px rgba(12, 140, 203, 0.28);
}

.btn:disabled {
    cursor: not-allowed;
    background: var(--muted);
    opacity: 0.55;
    box-shadow: none;
}

.btn.ghost {
    background: #ffffff;
    border-color: var(--brand);
    color: var(--brand-strong);
}

.btn.ghost:hover {
    background: var(--tint);
    box-shadow: none;
}

/* Section headings */
.section-head {
    margin-bottom: 1.4rem;
}

.section-head h2 {
    margin: 0.4rem 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    color: var(--ink);
}

/* Metrics band */
.metrics-band {
    background: var(--ink);
    padding: 2rem 0;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.metric-card {
    text-align: left;
}

.metric-value {
    margin: 0;
    color: var(--brand-soft);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.metric-label {
    margin: 0.35rem 0 0;
    color: #c7d3dd;
    line-height: 1.4;
    font-size: 0.95rem;
}

.focus-band {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.2rem;
}

.focus-band .metric-value {
    font-size: 1.1rem;
    line-height: 1.3;
}

.focus-band .metric-value a {
    color: var(--brand-soft);
    text-decoration: none;
}

.focus-band .metric-value a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Cards */
.cards {
    display: grid;
    gap: 1.2rem;
}

.services-grid,
.case-grid,
.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-grid,
.services-grid-home,
.challenge-grid,
.team-grid,
.team-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card .text-link {
    margin-top: auto;
    padding-top: 1rem;
}

.service-card h2 a,
.service-card h3 a {
    color: inherit;
    text-decoration: none;
}

.service-card h2 a:hover,
.service-card h3 a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.service-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.service-detail h2,
.service-deliverables h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
}

.service-detail p {
    margin: 1rem 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.service-deliverables ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--text);
    line-height: 1.7;
}

.service-deliverables ul li::marker {
    color: var(--brand);
}

.panel {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 24, 32, 0.06);
    padding: 1.5rem;
}

.service-card h2,
.service-card h3,
.case-card h3,
.person-card h2,
.person-card h3,
.process h2,
.contact h2,
.contact-result h2,
.contact-summary h2,
.biography h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
}

.service-card p,
.case-card p,
.person-card p,
.quote-card p,
.biography p,
.process p,
.contact p {
    color: var(--muted);
    line-height: 1.6;
}

.service-card ul {
    margin: 0.8rem 0 0;
    padding-left: 1.1rem;
    color: var(--text);
    line-height: 1.6;
}

.service-card ul li::marker {
    color: var(--brand);
}

.impact {
    margin: 0.5rem 0;
    color: var(--brand-strong);
    font-weight: 600;
}

/* Testimonials */
.quote-card {
    margin: 0;
    border-left: 4px solid var(--brand);
}

.quote-card p {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.quote-card footer {
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}

/* Team */
.person-card {
    display: grid;
    grid-template-columns: minmax(130px, 0.65fr) minmax(0, 1.35fr);
    align-items: start;
    gap: 1.2rem;
}

.person-headshot {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--tint);
}

.person-headshot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-card-content {
    min-width: 0;
}

.person-card-home {
    grid-template-columns: 1fr;
    border-top: 4px solid var(--brand);
}

.person-card-content-home {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    min-width: 0;
}

.person-card-content-home h3 {
    font-size: 1.3rem;
}

.person-card-content-home .role {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.person-card-divider {
    width: 2.75rem;
    height: 3px;
    margin-top: 1rem;
    background: var(--brand-bright);
    border-radius: 2px;
}

.person-card-content-home .text-link {
    margin-top: 0.75rem;
}

.role {
    margin: 0.4rem 0;
    color: var(--brand-strong);
    font-weight: 600;
}

.introduction {
    margin-top: 0.6rem;
}

.text-link {
    display: inline-block;
    margin-top: 0.7rem;
    color: var(--brand-strong);
    font-weight: 500;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

/* Biography */
.biography {
    display: grid;
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
    gap: 1.6rem;
    align-items: start;
}

.biography-headshot {
    max-width: 320px;
}

.biography-content h1 {
    margin-top: 0.4rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.biography-profile-link {
    margin-top: 0.8rem;
}

.biography-back-link {
    margin-top: 1rem;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    background: var(--tint);
}

.profile-link-placeholder {
    cursor: default;
    opacity: 0.8;
}

.profile-link-mark {
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    border-radius: 4px;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.profile-link-status {
    font-style: italic;
}

/* Process */
.process .steps {
    display: grid;
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.process h3 {
    margin: 0 0 0.4rem;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.process .steps > div {
    border-top: 3px solid var(--brand-bright);
    padding-top: 0.9rem;
}

/* CTA band */
.cta-band {
    text-align: center;
    background: linear-gradient(135deg, var(--tint) 0%, #ffffff 70%);
    padding: clamp(1.8rem, 4vw, 2.8rem);
}

.cta-band h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}

.cta-band p {
    max-width: 60ch;
    margin: 0.8rem auto 1.4rem;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr);
    gap: 1.2rem;
    align-items: start;
}

.contact-summary ul {
    margin: 0.8rem 0;
    padding-left: 1.1rem;
    color: var(--text);
    line-height: 1.7;
}

.contact-summary ul li::marker {
    color: var(--brand);
}

.contact-summary p {
    color: var(--muted);
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-form label {
    display: grid;
    gap: 0.4rem;
}

.contact-form label > span {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    font: inherit;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    min-height: 48px;
    transition: border-color 0.2s ease;
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover {
    border-color: var(--brand-soft);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--brand);
}

.contact-form small {
    color: var(--muted);
    font-size: 0.82rem;
}

.field-error,
.form-error {
    color: #b3261e;
    font-weight: 500;
}

.form-error {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid #ecc6c3;
    border-radius: 10px;
    background: #fdf3f2;
}

.spam-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.contact-result {
    text-align: center;
    padding: clamp(1.8rem, 4vw, 2.8rem);
}

.contact-result p {
    color: var(--muted);
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    background: var(--tint);
    padding: 2.4rem 0 1.4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
}

.footer-social a {
    color: var(--brand-strong);
    font-weight: 500;
}

.footer-logo {
    display: block;
    height: 44px;
    width: auto;
}

.footer-brand p {
    margin: 0.8rem 0 0;
    color: var(--muted);
    max-width: 32ch;
}

.footer-nav {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
}

.footer-nav a,
.footer-contact a {
    color: var(--ink);
    text-decoration: none;
    padding: 0.2rem 0;
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.footer-heading {
    margin: 0 0 0.5rem;
    color: var(--ink);
    font-weight: 600;
}

.footer-contact {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.footer-area {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.footer-legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.footer-legal-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
}

.footer-legal-nav a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.copyright {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid,
    .biography,
    .contact-layout,
    .service-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .focus-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-grid,
    .case-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .quote-grid,
    .services-grid-home,
    .challenge-grid,
    .team-grid,
    .team-grid-home {
        grid-template-columns: 1fr;
    }

    .nav-wrap {
        grid-template-columns: 1fr;
        row-gap: 0.4rem;
        padding: 0.6rem 0;
        min-height: 0;
    }

    .site-nav {
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .metrics {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .focus-band {
        grid-template-columns: 1fr;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }
}
