/* ===================================
   OakTrust Wealth Advisors - Styles
   =================================== */

/* CSS Variables */
:root {
    /* Brand Colors */
    /* softer brand shades (Pantone 5395 U slate navy, Pantone 478 U maroon) */
    --navy: #464c59;
    --navy-dark: #2c3445;
    --navy-light: #59606f;
    --burgundy: #8e6e5c;
    --burgundy-dark: #775847;
    --burgundy-light: #a3826f;

    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Typography */
    --font-heading: 'EB Garamond', 'Iowan Old Style', Palatino, Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* keep section headings clear of the fixed header when jumping to them */
    scroll-padding-top: 108px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

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

a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--burgundy);
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

p {
    margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background-color: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.btn-primary:hover {
    background-color: var(--navy-dark);
    border-color: var(--navy-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.btn-secondary:hover {
    background-color: var(--navy-dark);
    border-color: var(--navy-dark);
    color: var(--white);
}

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

.btn-outline:hover {
    background-color: var(--white);
    color: var(--navy);
}

.btn-light {
    background-color: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn-light:hover {
    background-color: var(--off-white);
    border-color: var(--off-white);
    color: var(--navy);
}

.btn-full {
    width: 100%;
}

/* Section Elements */
.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--burgundy);
    margin-bottom: var(--space-md);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* ===================================
   Header / Navigation
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

/* Thin navy strip above the menu */
.topbar {
    background-color: var(--navy);
    height: 16px;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 65px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--burgundy);
}

.nav-links .btn {
    padding: 0.5rem 1.125rem;
    background-color: var(--navy);
    border: none;
    border-radius: 4px;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-links .btn:hover {
    background-color: var(--navy-light);
    color: var(--white);
}

/* Small BrokerCheck badge beside Account Login */
.nav-links .nav-bc {
    display: flex;
    align-items: center;
}

.nav-bc img {
    height: 18px;
    width: auto;
    display: block;
}

.nav-links .nav-bc:hover {
    opacity: 0.8;
}

.nav-links .nav-bc::after {
    display: none;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--navy);
    transition: all var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */

/* Clean top section: no photo, centered navy headline on warm off-white
   (the tree photo rules below are kept in case it comes back) */
.hero.hero-clean {
    background-color: #f7f5f2;
    min-height: auto;
    margin-top: 96px; /* height of the fixed top bar + menu */
    padding: 3.5rem 0;
    text-align: center;
}

.hero.hero-clean::before,
.hero-clean .hero-overlay {
    display: none;
}

.hero-clean .hero-content {
    margin: 0 auto;
}

.hero-clean .section-tag {
    display: block;
    margin-bottom: 0.75rem;
}

.hero.hero-clean h1 {
    color: var(--navy);
    text-shadow: none;
    font-size: clamp(2.25rem, 4.25vw, 3.375rem);
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.hero.hero-clean p {
    color: var(--gray-600);
    font-size: 1rem;
    text-shadow: none;
    margin-bottom: 1.25rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-clean .hero-buttons {
    justify-content: center;
}

.hero-clean .btn-outline {
    color: var(--navy);
    border-color: var(--navy);
}

.hero-clean .btn-outline:hover {
    background-color: var(--navy);
    color: var(--white);
}
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('Images/Oak trees v2-upscaled.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 75%;
    filter: brightness(1.18) saturate(1.05);
    transform: scale(1.1);
    animation: kenBurns 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes kenBurns {
    to {
        transform: scale(1);
    }
}

.hero.hero-compact {
    min-height: 60vh;
}

.hero.hero-compact h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero.hero-compact p {
    font-size: 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* soft warm shadow behind the headline, light at the edges, so the picture keeps its golden colors */
    background: radial-gradient(ellipse 45% 60% at 45% 50%, rgba(20, 18, 15, 0.5) 0%, rgba(20, 18, 15, 0.25) 60%, rgba(20, 18, 15, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.hero h1 {
    color: var(--white);
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 16px rgba(0,0,0,0.45);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 10px rgba(0,0,0,0.5);
    margin-bottom: var(--space-xl);
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ===================================
   Trust Bar
   =================================== */
.section-divider {
    height: 1px;
    background-color: var(--gray-300);
    margin: 0;
}

.trust-bar {
    background-color: var(--off-white);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--gray-200);
}

.trust-heading {
    text-align: center;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0 0 var(--space-md) 0;
}

.trust-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.trust-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--navy);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.trust-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
}

.trust-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--space-4xl) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-content p {
    color: var(--gray-700);
    font-size: 1.0625rem;
}

.about-list {
    margin: var(--space-xl) 0;
}

.about-list li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--gray-700);
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background-color: var(--burgundy);
    border-radius: 50%;
}

.about-image {
    position: relative;
}

.image-placeholder {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 1.125rem;
}

/* About Section - Team List */
.team-list {
    /* Fills the right column of about-grid */
}

.team-list-heading {
    font-size: 1.5rem;
    margin-bottom: var(--space-xl);
    color: var(--navy);
}

.team-member-row {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--gray-200);
}

.team-member-row:first-of-type {
    padding-top: 0;
}

.team-member-row:last-of-type {
    border-bottom: none;
}

.team-member-photo {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    width: 100px;
    height: 130px;
}

.photo-placeholder-small {
    width: 100px;
    height: 130px;
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.team-member-photo img {
    width: 100px;
    height: 130px;
    object-fit: contain;
    border-radius: 8px;
    filter: grayscale(100%);
}

.team-member-photo img.zoom-in {
    object-fit: cover;
    object-position: top;
    transform: scale(1.2);
    transform-origin: top;
}

.team-member-photo img.zoom-slight {
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
    transform-origin: center;
}

.team-member-photo img.zoom-nancy {
    object-fit: cover;
    object-position: center -25%;
    transform: scale(1.35);
    transform-origin: center;
}

.team-member-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    justify-content: center;
}

.team-member-name-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.team-member-name {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    display: inline-block;
    transition: transform var(--transition-base);
}

.team-member-name:hover {
    transform: scale(1.03);
    color: var(--burgundy);
}

.team-member-title {
    font-size: 0.9375rem;
    color: var(--burgundy);
    font-weight: 500;
}

.team-member-contact {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.team-member-contact a {
    color: var(--gray-600);
}

.team-member-contact a:hover {
    color: var(--navy);
}

.team-member-contact .separator {
    color: var(--gray-400);
}

.team-member-bio-link {
    display: inline-block;
    margin-top: var(--space-xs);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--burgundy);
}

.team-member-bio-link:hover {
    color: var(--burgundy-dark);
    text-decoration: underline;
}

.team-member-certs {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Team Member Expandable Sections (Mobile Only) */
.team-member-expand {
    display: none;
}

.team-member-photo {
    cursor: pointer;
}

/* ===================================
   Services Section
   =================================== */
.services {
    padding: var(--space-4xl) 0;
    background-color: var(--off-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.service-card {
    background-color: var(--white);
    padding: var(--space-xl);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-icon {
    width: 56px;
    height: 56px;
    background-color: var(--navy);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--white);
}

.service-card h3 {
    color: var(--navy);
}

.service-card > p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.service-card ul {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-md);
}

.service-card ul li {
    font-size: 0.875rem;
    color: var(--gray-700);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.service-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--burgundy);
}

/* ===================================
   Approach Section
   =================================== */
.approach {
    padding: var(--space-4xl) 0;
}

.approach-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: var(--space-lg);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--navy);
    opacity: 0.3;
    margin-bottom: var(--space-sm);
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.step p {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

/* ===================================
   Team Section
   =================================== */
.team {
    padding: var(--space-4xl) 0;
    background-color: var(--off-white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.team-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: box-shadow var(--transition-base);
}

.team-card:hover {
    box-shadow: var(--shadow-md);
}

.team-photo {
    aspect-ratio: 1;
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 1.125rem;
}

.team-card h3 {
    padding: var(--space-lg) var(--space-lg) var(--space-xs);
    margin-bottom: 0;
}

.team-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--burgundy);
    padding: 0 var(--space-lg);
}

.team-card > p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: 0;
}

.team-email {
    display: block;
    font-size: 0.875rem;
    color: var(--navy);
    padding: 0 var(--space-lg) var(--space-lg);
}

/* ===================================
   CTA Section
   =================================== */
.cta {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    text-align: center;
}

.cta h2 {
    color: var(--white);
}

.cta p {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    padding: var(--space-4xl) 0;
}

.contact-grid {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info h2 {
    margin-bottom: var(--space-md);
}

.contact-info > p {
    color: var(--gray-600);
    font-size: 1.0625rem;
    margin-bottom: var(--space-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    display: flex;
    gap: var(--space-md);
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--burgundy);
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item strong {
    display: block;
    color: var(--navy);
    margin-bottom: var(--space-xs);
}

.contact-item p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.contact-item p a {
    color: var(--navy);
    text-decoration: underline;
    text-decoration-color: var(--burgundy);
    text-underline-offset: 3px;
}

.contact-item p a:hover {
    color: var(--burgundy);
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--off-white);
    padding: var(--space-xl);
    border-radius: 8px;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-800);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-disclaimer {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: var(--space-md);
    margin-bottom: 0;
}

/* ===================================
   Footer (light, with a thin maroon rule on top)
   =================================== */
/* Disclosures page */
.legal-page {
    margin-top: 96px; /* height of the fixed top bar + menu */
    padding: var(--space-3xl) 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    color: var(--navy-dark);
    font-size: clamp(2.25rem, 4.25vw, 3.375rem);
    margin-bottom: var(--space-xl);
}

.legal-content h2 {
    color: var(--navy-dark);
    font-size: 1.75rem;
    margin: var(--space-2xl) 0 var(--space-md);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content p {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: var(--space-md);
    overflow-wrap: anywhere;
}

.legal-content a {
    color: var(--burgundy-dark);
    text-decoration: underline;
}

.footer {
    background-color: #f7f5f2;
    color: var(--gray-700);
    padding: 1.75rem 0 var(--space-md);
    border-top: 2px solid var(--navy);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
}

.footer-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--navy);
}

.footer-brand p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.footer-brand p a {
    color: var(--burgundy);
}

.footer-brand p a:hover {
    color: var(--burgundy-dark);
    text-decoration: underline;
}

.footer h4 {
    color: var(--burgundy);
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-md);
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-xl);
}

.footer-links a {
    color: var(--gray-700);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--navy);
}

.footer-disclaimer {
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-300);
}

.footer-disclaimer p {
    color: var(--gray-600);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 0.375rem;
}

.footer-disclaimer p:last-child {
    margin-bottom: 0;
}

.footer-disclaimer a {
    color: var(--gray-700);
    text-decoration: underline;
}

.footer-disclaimer a:hover {
    color: var(--navy);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--gray-300);
}

.footer-bottom p {
    color: var(--gray-600);
    font-size: 0.8125rem;
    margin-bottom: 0;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .approach-steps .step:nth-child(4),
    .approach-steps .step:nth-child(5) {
        grid-column: span 1;
    }

}

@media (max-width: 1024px) {
    /* Keep the full menu on one line on tablets */
    .nav-links {
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 96px;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

    /* Hero */
    .hero {
        padding: 120px 0 var(--space-3xl);
        min-height: auto;
    }

    .hero.hero-clean {
        padding: var(--space-2xl) 0;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Trust Bar */
    .trust-items {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .team-list {
        margin-top: var(--space-xl);
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Approach */
    .approach-steps {
        grid-template-columns: 1fr;
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Team Member Rows - keep horizontal layout on mobile */
    .team-member-row {
        gap: var(--space-md);
        align-items: center;
    }

    .team-member-photo {
        width: 80px;
        height: 104px;
    }

    .photo-placeholder-small,
    .team-member-photo img {
        width: 80px;
        height: 104px;
    }

    .team-member-name-row {
        flex-direction: column;
        gap: 0;
    }

    .team-member-name {
        font-size: 1.125rem;
    }

    .team-member-contact {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }

    .team-member-contact a {
        font-size: 0.75rem;
    }

    .team-member-contact .separator {
        display: none;
    }

    /* Mobile zoom adjustments for team photos */
    .team-member-photo img.zoom-slight {
        object-fit: cover;
        object-position: center;
        transform: scale(1.05);
        transform-origin: center;
    }

    .team-member-photo img.zoom-in {
        object-fit: cover;
        object-position: top;
        transform: scale(1.2);
        transform-origin: top;
    }

    .team-member-photo img.zoom-nancy {
        object-fit: cover;
        object-position: center -25%;
        transform: scale(1.35);
        transform-origin: center;
    }

    /* Team Member Expandable Sections (Mobile) */
    .team-member-expand {
        display: none;
        padding: 0 var(--space-sm);
        margin-top: calc(-1 * var(--space-md));
        margin-bottom: var(--space-md);
    }

    .team-member-expand.active {
        display: block;
    }

    .expand-section {
        border-bottom: 1px solid var(--gray-200);
    }

    .expand-section:last-child {
        border-bottom: none;
    }

    .expand-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-sm) 0;
        cursor: pointer;
    }

    .expand-header h4 {
        margin: 0;
        font-size: 0.9rem;
        color: var(--navy);
        font-weight: 600;
    }

    .expand-icon {
        font-size: 1.25rem;
        font-weight: 300;
        color: var(--gray-500);
    }

    .expand-content {
        display: none;
        padding-bottom: var(--space-sm);
    }

    .expand-content.active {
        display: block;
    }

    .expand-content p {
        font-size: 0.8rem;
        line-height: 1.6;
        color: var(--gray-700);
        margin-bottom: var(--space-xs);
    }

    .expand-content p:last-child {
        margin-bottom: 0;
    }

    .expand-content ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .expand-content ul li {
        font-size: 0.8rem;
        color: var(--gray-700);
        padding: var(--space-xs) 0;
        padding-left: var(--space-md);
        position: relative;
    }

    .expand-content ul li::before {
        content: '•';
        position: absolute;
        left: 0;
        color: var(--burgundy);
    }

    /* Modal Responsive */
    .modal {
        padding: 80px 0.15rem;
    }

    .modal-content {
        position: relative;
        margin: 0 auto;
        max-height: 80vh;
        overflow-x: hidden;
        overflow-y: auto;
        width: 99%;
    }

    .modal-close {
        position: sticky;
        top: 0;
        float: right;
        margin: 0.25rem;
        z-index: 10;
        background: var(--gray-200);
    }

    .modal-header {
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
        padding: 0.5rem;
        padding-top: 0;
        background: transparent;
        border-radius: 0;
    }

    .modal-photo {
        width: 80px !important;
        height: 104px !important;
        flex-shrink: 0;
    }

    .modal-photo img {
        width: 80px !important;
        height: 104px !important;
    }

    .modal-header-info {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
        align-items: flex-start;
        justify-content: center;
    }

    .modal-header-info h3 {
        font-family: var(--font-heading);
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--navy);
        line-height: 1.2;
    }

    .modal-header-info .modal-credentials {
        font-size: 0.8125rem;
        color: var(--gray-500);
        font-weight: 500;
    }

    .modal-header-info .modal-title {
        font-size: 0.9375rem;
        color: var(--burgundy);
        font-weight: 500;
    }

    .modal-contact {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }

    .modal-contact .separator {
        display: none;
    }

    .modal-contact a {
        font-size: 0.75rem;
        color: var(--gray-600);
    }

    .modal-body {
        padding: 0.5rem;
        padding-top: 0;
    }

    .modal-body ul {
        columns: 1;
    }

    /* Collapsible Sections */
    .collapsible {
        border-bottom: 1px solid var(--gray-200);
    }

    .collapsible:last-child {
        border-bottom: none;
    }

    .collapsible-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-xs) 0;
        cursor: pointer;
        user-select: none;
    }

    .collapsible-header h4 {
        margin: 0;
        font-size: 0.9rem;
        color: var(--navy);
        font-weight: 600;
    }

    .collapsible-icon {
        font-size: 1.25rem;
        font-weight: 300;
        color: var(--gray-500);
    }

    .collapsible-content {
        display: none;
        padding-bottom: var(--space-md);
    }

    .collapsible-content.active {
        display: block;
    }

    .collapsible-content p {
        margin-bottom: var(--space-sm);
    }

    .collapsible-content p:last-child {
        margin-bottom: 0;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        flex-direction: column;
        text-align: center;
    }

    .footer-links ul {
        justify-content: center;
        gap: var(--space-xs) var(--space-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .trust-items {
        grid-template-columns: 1fr;
    }

    .trust-number {
        font-size: 2rem;
    }
}

/* ===================================
   Modal Styles
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    overflow: hidden;
    padding: var(--space-xl);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    border-radius: 12px;
    max-width: 950px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: sticky;
    top: var(--space-md);
    float: right;
    margin-top: var(--space-md);
    margin-right: var(--space-md);
    margin-bottom: calc(-36px - var(--space-md));
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-header {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    padding-right: calc(var(--space-xl) + 40px);
    background-color: var(--off-white);
    border-radius: 12px 12px 0 0;
}

.modal-photo {
    width: 120px;
    height: 156px;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.modal-photo .photo-placeholder-small {
    width: 120px;
    height: 156px;
}

.modal-photo img {
    width: 120px;
    height: 156px;
    object-fit: contain;
    border-radius: 8px;
    filter: grayscale(100%);
}

.modal-photo img.zoom-in {
    object-fit: cover;
    object-position: top;
    transform: scale(1.2);
    transform-origin: top;
}

.modal-photo img.zoom-slight {
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
    transform-origin: center;
}

.modal-photo img.zoom-nancy {
    object-fit: cover;
    object-position: center -25%;
    transform: scale(1.35);
    transform-origin: center;
}

.modal-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xs);
}

.modal-name-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.modal-header-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0;
}

.modal-credentials {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-500);
}

.modal-header-info .modal-title {
    font-size: 1.125rem;
    color: var(--burgundy);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-body p {
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.modal-body h4 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--navy);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

.modal-body .collapsible:first-child h4 {
    margin-top: 0;
}

.modal-body ul {
    margin-bottom: var(--space-lg);
    columns: 2;
    column-gap: var(--space-xl);
}

.modal-body ul li {
    font-size: 0.875rem;
    color: var(--gray-700);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
    break-inside: avoid;
}

.modal-body ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--burgundy);
}

/* Desktop: hide collapsible icons, show all content */
.collapsible-icon {
    display: none;
}

.collapsible-content {
    display: block;
}

.collapsible-header {
    cursor: default;
}

.modal-contact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.modal-contact a {
    font-size: 1rem;
    color: var(--navy);
    font-weight: 500;
}

.modal-contact a:hover {
    color: var(--burgundy);
}

.modal-contact .separator {
    color: var(--gray-400);
    font-size: 1rem;
}

/* Desktop: hide icons, show text */
.modal-contact .contact-icon {
    display: none;
}

.modal-contact .contact-text {
    display: inline;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll reveal classes - activated via JS */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Premium Animations
   =================================== */

/* Hero Fade-In Animation */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Headline Word-by-Word Animation */
.hero-headline {
    word-spacing: normal;
}

.hero-headline .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-headline .word:nth-of-type(1) { animation-delay: 0.1s; }
.hero-headline .word:nth-of-type(2) { animation-delay: 0.18s; }
.hero-headline .word:nth-of-type(3) { animation-delay: 0.26s; }
.hero-headline .word:nth-of-type(4) { animation-delay: 0.34s; }
.hero-headline .word:nth-of-type(5) { animation-delay: 0.42s; }
.hero-headline .word:nth-of-type(6) { animation-delay: 0.50s; }
.hero-headline .word:nth-of-type(7) { animation-delay: 0.58s; }

/* Hero Subheadline */
.hero-fade {
    opacity: 0;
    animation: heroFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-fade-2 { animation-delay: 0.8s; }
.hero-fade-3 { animation-delay: 1s; }

/* Logo Fade In Animation */
.logo {
    opacity: 0;
    animation: navSlideDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Nav Items Slide Down Animation */
@keyframes navSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links li {
    opacity: 0;
    animation: navSlideDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

/* Nav Underline Grow Animation */
.nav-links a:not(.btn) {
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--burgundy);
    transform: translateX(-50%) scaleX(0);
    transition: transform var(--transition-base);
}

.nav-links a:not(.btn):hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Team Photo Grow on Hover - scale entire container */
.team-member-photo {
    transition: transform var(--transition-base);
}

.team-member-photo:hover {
    transform: scale(1.05);
}

/* Staggered Reveal Delays */
.service-card.reveal { transition-delay: 0s; }
.service-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.service-card.reveal:nth-child(3) { transition-delay: 0.2s; }
.service-card.reveal:nth-child(4) { transition-delay: 0.15s; }
.service-card.reveal:nth-child(5) { transition-delay: 0.25s; }
.service-card.reveal:nth-child(6) { transition-delay: 0.35s; }

.step.reveal { transition-delay: 0s; }
.step.reveal:nth-child(2) { transition-delay: 0.1s; }
.step.reveal:nth-child(3) { transition-delay: 0.2s; }
.step.reveal:nth-child(4) { transition-delay: 0.3s; }
.step.reveal:nth-child(5) { transition-delay: 0.4s; }

.team-list > .team-member-row.reveal:nth-child(2) { transition-delay: 0s; }    /* Nick */
.team-list > .team-member-row.reveal:nth-child(4) { transition-delay: 0.4s; }  /* Tom */
.team-list > .team-member-row.reveal:nth-child(6) { transition-delay: 0.8s; }  /* Nancy */

/* Trust Bar Slide Up Animation */
@keyframes trustSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trust-item {
    opacity: 0;
    animation: trustSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.trust-item:nth-child(1) { animation-delay: 1.0s; }
.trust-item:nth-child(2) { animation-delay: 1.1s; }
.trust-item:nth-child(3) { animation-delay: 1.2s; }
.trust-item:nth-child(4) { animation-delay: 1.3s; }

/* Trust Bar Count-Up Animation */
.trust-number {
    display: inline-block;
}

.trust-number.counting {
    opacity: 1;
}

/* ===================================
   Mobile Modal Overrides (must be after base modal styles)
   =================================== */
@media (max-width: 768px) {
    /* Compact modal header - no photo */
    .modal-header {
        display: block;
    }

    .modal-photo {
        display: none;
    }

    .modal-content {
        max-height: 80vh;
        width: 99%;
    }

    .modal-header-info {
        gap: 1px;
    }

    /* Each item on one line */
    .modal-name-row {
        display: block;
    }

    .modal-header-info h3 {
        font-family: var(--font-heading);
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--navy);
        line-height: 1.2;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .modal-header-info .modal-credentials {
        display: block;
        font-size: 0.7rem;
        color: var(--gray-500);
        font-weight: 500;
        white-space: nowrap;
    }

    .modal-header-info .modal-title {
        font-size: 0.7rem;
        color: var(--burgundy);
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
    }

    .modal-contact {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.3rem;
        align-items: center;
        margin-top: 2px;
    }

    .modal-contact a {
        font-size: 0.65rem;
        color: var(--gray-600);
        font-weight: normal;
        white-space: nowrap;
    }

    .modal-contact .separator {
        display: inline;
        font-size: 0.5rem;
        color: var(--gray-400);
    }

    .modal-body ul {
        columns: 1;
    }

    /* Contact info - under titles, phone & email on same line */
    .modal-contact {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin-top: 2px;
    }

    .modal-contact .contact-text {
        display: inline;
    }

    .modal-contact .contact-icon {
        display: none;
    }

    .modal-contact .separator {
        display: inline;
        font-size: 0.6rem;
        color: var(--gray-400);
    }

    .modal-contact .contact-link {
        color: var(--gray-600);
        font-size: 0.7rem;
    }

    /* Hide LinkedIn on mobile */
    .modal-contact .contact-link[href*="linkedin"],
    .modal-contact .contact-link[href*="linkedin"] + .separator {
        display: none;
    }

    .modal-contact .separator:last-of-type {
        display: none;
    }
}

/* ===================================
   Team Bios (full bios on the page; "Read full bio" links scroll here)
   =================================== */
.team-bios {
    padding: var(--space-4xl) 0;
    background-color: #f7f5f2;
}

.team-bios .bio {
    background: var(--white);
    border-radius: 12px;
    max-width: 950px;
    margin: 0 auto var(--space-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.team-bios .bio:last-child {
    margin-bottom: 0;
}

.team-member-photo {
    cursor: pointer;
}

/* Phones: show the photo in the on-page bios (the old pop-up rule above hides .modal-photo).
   The photo sits above the name, so the name, title and contact lines keep their full width. */
@media (max-width: 768px) {
    .team-bios .modal-photo,
    .team-bios .modal-photo img {
        display: block;
        width: 96px !important;
        height: 125px !important;
    }

    .team-bios .modal-photo {
        margin-bottom: var(--space-sm);
    }

    /* Show LinkedIn in the on-page bios too (the old pop-up rule hid it), on its own line.
       No close button here, so the extra right padding meant for it isn't needed. */
    .team-bios .modal-header {
        padding-right: 32px;
    }

    .team-bios .modal-contact {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    /* Very narrow phones: let a long title wrap instead of being cut off */
    .team-bios .modal-title {
        white-space: normal;
    }

    .team-bios .modal-contact .contact-link[href*="linkedin"] {
        display: block;
        flex-basis: 100%;
    }
}
