* {
    box-sizing: border-box;
}

:root {
    --ink: #17202a;
    --muted: #53616f;
    --line: #d9e0e6;
    --paper: #ffffff;
    --logo-bg: #fcfaf7;
    --soft: #f4f7f8;
    --navy: #1d3548;
    --teal: #287271;
    --gold: #b7791f;
    --chatbot-viewport-height: 100vh;
    --chatbot-keyboard-offset: 0px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--logo-bg);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease-in-out;
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 120px;
    padding: 10px 0;
    transition: all 0.3s ease-in-out;
}

.nav.scrolled {
    background: var(--logo-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav.scrolled .container {
    min-height: 80px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 20;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--ink);
    transition: background 0.2s ease-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--ink);
    transition: all 0.2s ease-out;
}

.hamburger::before {
    top: 8px;
}

.hamburger::after {
    bottom: 8px;
}

.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

.logo {
    display: flex;
    align-items: center;
    max-height: 160px;
}

.logo img {
    display: block;
    height: 160px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: all 0.3s ease-in-out;
}

.nav.scrolled .logo img {
    height: 90px;
}

@media (max-width: 960px) {
    .nav .container {
        min-height: 80px;
    }

    .logo {
        max-height: 100px;
    }

    .logo img {
        height: 100px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-links a.cta-button {
    color: #fff;
}

section {
    padding: 84px 0;
}

.contact {
    background: var(--navy);
    color: #fff;
}

.contact h2 {
    color: #fff;
}

.contact .section-intro {
    color: rgba(255, 255, 255, 0.8);
}

.contact-method {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.contact-method h3 {
    color: var(--ink);
}

.contact-method p {
    color: var(--muted);
}

.contact-method .button-secondary {
    color: var(--navy);
    background: var(--soft);
    border-color: var(--line);
}

.contact .pricing-note {
    color: rgba(255, 255, 255, 0.6);
}

.calendly-inline-widget {
    margin-top: 34px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.hero {
    padding: 104px 0 88px;
    background: linear-gradient(135deg, #1d3548, #287271);
    color: #fff;
}

.hero .container {
    max-width: 940px;
    margin-left: max(20px, calc((100% - 1120px) / 2));
}

h1,
h2,
h3,
h4 {
    margin: 0;
    line-height: 1.15;
}

h1,
h2 {
    font-family: "Playfair Display", Georgia, serif;
}

h1 {
    max-width: 900px;
    font-size: clamp(2.55rem, 5vw, 4.9rem);
    letter-spacing: 0;
}

h2 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 3.4vw, 3.15rem);
}

h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
}

p {
    margin: 0 0 16px;
}

.hero-subtitle {
    max-width: 790px;
    color: rgba(255, 255, 255, 0.91);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-subtitle:first-of-type {
    margin-top: 28px;
}

.hero-cta,
.contact-options {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.button-primary,
.button-secondary,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.2;
}

.button-primary,
.cta-button {
    color: #fff;
    background: var(--teal);
}

.button-secondary {
    color: var(--navy);
    background: #fff;
    border-color: var(--line);
}

.hero .button-secondary {
    color: #fff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.65);
}

.section-intro {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.08rem;
}

.services,
.team {
    background: var(--soft);
}

.services-grid,
.differentiator-grid,
.team-grid,
.approach-content,
.contact-options,
.footer-content {
    display: grid;
    gap: 24px;
}

.services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 36px;
}

.differentiator-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 34px;
}

.service-card,
.differentiator-item,
.approach-principles,
.team-member,
.contact-method {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 28px;
}

.service-card.featured {
    border-top: 4px solid var(--teal);
}

.differentiator-item {
    border-top: 4px solid var(--teal);
}

.badge,
.tagline,
.title,
.bio-note,
.pricing-note {
    color: var(--muted);
}

.badge {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tagline,
.title {
    font-weight: 700;
}

.features {
    padding-left: 20px;
    margin: 20px 0 24px;
}

.features li,
.approach-principles li {
    margin-bottom: 10px;
}

.implementation-note {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.approach-content {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: start;
    margin-top: 34px;
}

.approach-text h3:not(:first-child) {
    margin-top: 34px;
}

.team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 36px;
}

.team-member {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.team-member img {
    display: block;
    width: 220px;
    height: 220px;
    margin: 0 auto 22px;
    border: 4px solid #fff;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 28px rgba(23, 32, 42, 0.16);
    flex-shrink: 0;
}

/* Make Barry's photo taller to show full face */
.team-member:first-child img {
    height: 310px;
}

.team-member .bio {
    text-align: left;
}

.team-email {
    margin-top: auto;
    padding-top: 12px;
    align-self: center;
}

.contact-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
}

.pricing-note {
    margin-top: 26px;
}

.chatbot {
    position: fixed;
    right: 24px;
    bottom: calc(24px + var(--chatbot-keyboard-offset));
    z-index: 30;
}

.chatbot-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    background: var(--teal);
    box-shadow: 0 16px 34px rgba(23, 32, 42, 0.24);
    cursor: pointer;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.chatbot-toggle-icon {
    position: relative;
    display: block;
    width: 34px;
    height: 26px;
    border: 2px solid currentColor;
    border-radius: 9px;
}

.chatbot-toggle-icon::after {
    content: '';
    position: absolute;
    left: 7px;
    bottom: -8px;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    background: var(--teal);
    transform: rotate(45deg);
}

.chatbot-toggle-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: -9px 0 0 currentColor, 9px 0 0 currentColor;
    transform: translate(-50%, -50%);
}

.chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 40px));
    height: min(620px, max(260px, calc(var(--chatbot-viewport-height) - 120px)));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(23, 32, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot[data-open="true"] .chatbot-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chatbot-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    color: #fff;
    background: var(--navy);
}

.chatbot-kicker {
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.chatbot-header h2 {
    margin: 0;
    color: #fff;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.15rem;
}

.chatbot-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.chatbot-status {
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    background: var(--soft);
    font-size: 0.82rem;
}

.chatbot-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    overflow-y: auto;
}

.chat-message {
    max-width: 86%;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.chat-message p {
    margin: 0;
}

.chat-message a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-message.bot {
    align-self: flex-start;
    color: var(--ink);
    background: var(--soft);
}

.chat-message.pending p {
    letter-spacing: 2px;
    animation: pulseText 1s ease-in-out infinite;
}

.chat-message.user {
    align-self: flex-end;
    color: #fff;
    background: var(--teal);
}

.chatbot-prompts {
    display: flex;
    gap: 8px;
    padding: 0 18px 14px;
    overflow-x: auto;
}

.chatbot-prompts button {
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--navy);
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.chatbot-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.chatbot-form textarea {
    width: 100%;
    min-height: 44px;
    max-height: 110px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    line-height: 1.35;
}

.chatbot-form textarea:disabled {
    color: var(--muted);
    background: var(--soft);
}

.chatbot-form button {
    min-height: 44px;
    padding: 0 15px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: var(--teal);
    font-weight: 800;
    cursor: pointer;
}

@keyframes pulseText {
    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

.footer {
    padding: 54px 0 28px;
    color: rgba(255, 255, 255, 0.82);
    background: var(--navy);
}

.footer h4,
.footer a {
    color: #fff;
}

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

.footer-links {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--logo-bg);
        flex-direction: column;
        padding: 40px;
        gap: 24px;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .logo img {
        height: 120px;
    }

    .services-grid,
    .differentiator-grid,
    .team-grid,
    .approach-content,
    .contact-options,
    .footer-content {
        grid-template-columns: 1fr;
    }

    section,
    .hero {
        padding: 64px 0;
    }

    .team-member img {
        width: 180px;
        height: 180px;
    }

    .team-member:first-child img {
        height: 250px;
    }

    .chatbot {
        right: 16px;
        bottom: calc(16px + var(--chatbot-keyboard-offset));
    }

    .chatbot-panel {
        bottom: 68px;
        width: calc(100vw - 32px);
        height: min(580px, max(220px, calc(var(--chatbot-viewport-height) - 96px)));
    }

    .chatbot[data-keyboard-open="true"] .chatbot-toggle {
        opacity: 0;
        pointer-events: none;
        transform: translateY(24px);
    }

    .chatbot[data-keyboard-open="true"] .chatbot-panel {
        bottom: 0;
        height: min(580px, max(240px, calc(var(--chatbot-viewport-height) - 28px)));
    }
}
