/* ==========================================================================
   Side by Side Support
   Palette and spectrum are taken from the practice logo: two arms meeting
   to make a heart. The seven-colour rule and the card keylines are that
   mark unfolded.
   ========================================================================== */

:root {
    /* Warm surfaces, three layers, no pure white */
    --paper:  #f4ebdd;   /* page */
    --card:   #fdf9f3;   /* raised surface */
    --shell:  #efe4d4;   /* recessed panel */
    --line:   #e2d4be;   /* hairline */
    --line-strong: #d4c2a7;

    /* Text */
    --ink:    #2b2320;   /* 13:1 on paper */
    --muted:  #5f544c;   /* 6.2:1 on paper */

    /* Action */
    --accent:      #03713a;
    --accent-deep: #02542b;

    /* Brand spectrum, decorative only */
    --c1: #c72465;
    --c2: #e96396;
    --c3: #ff9f14;
    --c4: #038c3e;
    --c5: #2cceb7;
    --c6: #6c4ea8;
    --c7: #f94626;

    /* Aptos is Microsoft's; it renders for anyone with Microsoft 365, Office or
       a current Windows 11. Inter is the web fallback so everyone else gets a
       near match rather than whatever the platform picks. */
    --font-body: 'Aptos', 'Segoe UI Variable Text', 'Segoe UI', 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Aptos Display', 'Aptos', 'Segoe UI Variable Display', 'Segoe UI', 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

    --radius:    14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(66, 46, 28, 0.05), 0 8px 24px -12px rgba(66, 46, 28, 0.18);
    --measure: 68ch;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section: clamp(3.5rem, 7vw, 5.5rem);
}

/* --------------------------------------------------------------- Reset -- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

/* ------------------------------------------------------ Type primitives -- */

h1, h2, h3, .logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.9rem, 1.28rem + 2.8vw, 3.4rem);
}

h2 {
    font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.2rem);
}

h3 {
    font-size: 1.2rem;
    line-height: 1.25;
}

p {
    text-wrap: pretty;
}

.eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.9rem;
}

.lead {
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.24rem);
    line-height: 1.6;
    color: var(--muted);
    max-width: 58ch;
}

/* The signature: the logo's seven colours as a rule. Decorative only. */
.spectrum {
    display: flex;
    height: 5px;
    width: 108px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.spectrum span {
    flex: 1;
}

.spectrum span:nth-child(1) { background: var(--c1); }
.spectrum span:nth-child(2) { background: var(--c2); }
.spectrum span:nth-child(3) { background: var(--c3); }
.spectrum span:nth-child(4) { background: var(--c4); }
.spectrum span:nth-child(5) { background: var(--c5); }
.spectrum span:nth-child(6) { background: var(--c6); }
.spectrum span:nth-child(7) { background: var(--c7); }

.spectrum-center {
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------- Focus / a11y -- */

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 2000;
    background: var(--ink);
    color: var(--card);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 245, 237, 0.88);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.08rem;
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.35rem;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--ink);
    background: var(--shell);
}

/* Current page reads as current, not as disabled */
.nav-menu a[aria-current='page'] {
    color: var(--ink);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-cta {
    padding: 0.5rem 1.1rem !important;
    background: var(--ink);
    color: var(--card) !important;
    font-weight: 600 !important;
    border-radius: 999px;
}

.nav-cta:hover {
    background: var(--accent-deep) !important;
}

/* Menu button */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--ink);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

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

.menu-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

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

/* --------------------------------------------------------------- Main --- */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding-block: var(--section);
    border-top: 1px solid var(--line);
}

.section:first-of-type {
    border-top: 0;
}

.section-head {
    margin-bottom: 2.25rem;
}

.prose > p {
    max-width: var(--measure);
    color: var(--muted);
    margin-bottom: 1.1rem;
}

.prose > p:last-child {
    margin-bottom: 0;
}

.prose ul {
    max-width: var(--measure);
    list-style: none;
    margin: 1.25rem 0;
    display: grid;
    gap: 0.6rem;
}

.prose li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--muted);
}

.prose li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.prose a:hover {
    text-decoration-thickness: 2px;
}

.note {
    font-style: italic;
    color: var(--muted);
    margin-top: 1.5rem;
}

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

/* Home: logo led, centred */
.hero-home {
    text-align: center;
    padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section);
}

.hero-logo {
    width: 400px;
    max-width: 78%;
    height: auto;
    margin: 0 auto 2rem;
}

.hero-home h1 {
    max-width: 20ch;
    margin: 0 auto 1.25rem;
}

.hero-home .lead {
    margin: 0 auto;
}

.hero-actions {
    margin-top: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.hero-locations {
    margin-top: 2.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--muted);
}

/* Inner pages: left aligned, editorial */
.hero-page h1 {
    max-width: 22ch;
}

.hero-page {
    padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2.5rem, 5vw, 3.5rem);
}

.hero-page .lead {
    margin-top: 1.1rem;
}

/* -------------------------------------------------------------- Cards --- */

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

.card {
    --key: var(--c4);
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem 1.6rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* The keyline is the spectrum, one colour per card */
.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--key);
}

.card h3 {
    margin-bottom: 0.6rem;
}

.card p {
    color: var(--muted);
    font-size: 0.98rem;
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
        border-color: var(--line-strong);
    }
}

.card-grid > .card:nth-child(7n + 1) { --key: var(--c1); }
.card-grid > .card:nth-child(7n + 2) { --key: var(--c2); }
.card-grid > .card:nth-child(7n + 3) { --key: var(--c3); }
.card-grid > .card:nth-child(7n + 4) { --key: var(--c4); }
.card-grid > .card:nth-child(7n + 5) { --key: var(--c5); }
.card-grid > .card:nth-child(7n + 6) { --key: var(--c6); }
.card-grid > .card:nth-child(7n + 7) { --key: var(--c7); }

/* Column counts chosen so no row ends with a single stranded card */
@media (min-width: 760px) {
    .card-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    background: var(--accent);
    color: var(--card);
    border: 1px solid var(--accent);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: var(--shell);
    border-color: var(--ink);
    color: var(--ink);
}

/* -------------------------------------------------------------- Media --- */

.feature {
    display: grid;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    align-items: center;
}

/* The photo is 474px wide at source, so it is never stretched past that */
.feature-img {
    width: 100%;
    max-width: 474px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.feature-caption {
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 1.25rem;
}

.feature-address {
    font-style: normal;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

@media (min-width: 820px) {
    .feature {
        grid-template-columns: 474px 1fr;
    }
}

/* Profile: photo alongside text */
.profile {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--shell);
    border: 1px solid var(--line);
}

/* --------------------------------------------------------------- Team --- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    list-style: none;
}

.team-member {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.1rem 1.4rem;
    text-align: center;
}

.team-photo,
.team-photo-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center 22%;
    border-radius: var(--radius-sm);
    margin-bottom: 1.1rem;
    background: var(--shell);
}

.team-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px dashed var(--line-strong);
}

.team-member h3 {
    font-size: 1.08rem;
    margin-bottom: 0.3rem;
}

.team-role {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* ------------------------------------------------------------ Contact --- */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card .eyebrow {
    margin-bottom: 0.15rem;
}

.contact-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.contact-card address {
    font-style: normal;
    color: var(--muted);
    line-height: 1.55;
}

@media (hover: hover) {
    a.contact-card:hover {
        border-color: var(--accent);
        transform: translateY(-3px);
        box-shadow: var(--shadow);
    }
}

/* ---------------------------------------------------------- CTA band ---- */

.cta-wrap {
    padding-inline: var(--gutter);
}

.cta-band {
    max-width: 1200px;
    margin: 0 auto var(--section);
    padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.25rem);
    background: var(--shell);
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    text-align: center;
}

.cta-band h2 {
    max-width: 20ch;
    margin: 0 auto 0.9rem;
}

.cta-band p {
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto;
}

.cta-actions {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

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

.site-footer {
    background: #241d18;
    color: #f6ece0;
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: var(--gutter);
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-logo {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(246, 236, 224, 0.6);
    margin-bottom: 0.9rem;
}

.site-footer p,
.site-footer address {
    color: rgba(246, 236, 224, 0.78);
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.65;
}

.site-footer a {
    color: #f6ece0;
    text-decoration: none;
    border-bottom: 1px solid rgba(246, 236, 224, 0.3);
    transition: border-color 0.2s ease;
}

.site-footer a:hover {
    border-bottom-color: #f6ece0;
}

.footer-nav {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.footer-nav a {
    border-bottom: 0;
    font-size: 0.95rem;
    color: rgba(246, 236, 224, 0.78);
}

.footer-nav a:hover {
    color: #f6ece0;
}

.footer-bottom {
    max-width: 1200px;
    margin: clamp(2rem, 4vw, 2.75rem) auto 0;
    padding: 1.5rem var(--gutter) 0;
    border-top: 1px solid rgba(246, 236, 224, 0.15);
}

.footer-legal {
    font-size: 0.82rem;
    color: rgba(246, 236, 224, 0.6);
    line-height: 1.6;
}

/* ---------------------------------------------------------- Responsive -- */

@media (max-width: 900px) {
    .profile {
        grid-template-columns: 200px 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.75rem var(--gutter) 1.25rem;
        background: var(--card);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px -16px rgba(66, 46, 28, 0.4);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 0.85rem 0.75rem;
        font-size: 1.02rem;
        border-radius: var(--radius-sm);
    }

    .nav-menu a[aria-current='page'] {
        box-shadow: none;
        background: var(--shell);
    }

    .nav-cta {
        margin-top: 0.5rem;
        text-align: center;
    }

    .profile {
        grid-template-columns: 1fr;
    }

    .profile-photo {
        max-width: 220px;
    }
}

@media (max-width: 560px) {
    .logo-text {
        font-size: 0.95rem;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .card-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------- Page load ---- */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.18s; }
.reveal-3 { animation-delay: 0.29s; }
.reveal-4 { animation-delay: 0.40s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

.spectrum-wipe span {
    transform: scaleY(0);
    transform-origin: bottom;
    animation: wipe 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.spectrum-wipe span:nth-child(1) { animation-delay: 0.30s; }
.spectrum-wipe span:nth-child(2) { animation-delay: 0.36s; }
.spectrum-wipe span:nth-child(3) { animation-delay: 0.42s; }
.spectrum-wipe span:nth-child(4) { animation-delay: 0.48s; }
.spectrum-wipe span:nth-child(5) { animation-delay: 0.54s; }
.spectrum-wipe span:nth-child(6) { animation-delay: 0.60s; }
.spectrum-wipe span:nth-child(7) { animation-delay: 0.66s; }

@keyframes wipe {
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .spectrum-wipe span {
        transform: none;
    }
}

@media print {
    .site-header,
    .cta-band,
    .menu-toggle {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}
