/* ============================================
   THE FRACTIONAL ECONOMIST - MAIN STYLESHEET
   Professional economic consulting website
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Brand Color Scheme
       Sourced from "The Fractional Economist Logos & Style Guide 3_26".
       --color-primary   #0d2133  deep navy      (headings, footer, hero)
       --color-secondary #1a4a7a  mid navy       (gradients, logo squares)
       --color-accent    #2567a8  bright blue    (CTAs, accents - from logo mark)
       --color-brand-light #8ab5d9 light blue    (logo mark, dark-bg text)
       --color-brand-pale  #d9e3ed pale blue     (logo mark, tints) */
    --color-primary: #0d2133;
    --color-secondary: #1a4a7a;
    --color-accent: #2567a8;
    --color-brand-light: #8ab5d9;
    --color-brand-pale: #d9e3ed;
    /* Lightened tint of --color-brand-light, for small text on the navy hero
       gradient. The brand blue itself measures 4.37:1 there, just under the
       4.5:1 WCAG AA floor for text below 18.66px; this tint measures 5.5:1. */
    --color-brand-light-tint: #a9c9e6;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F4F7FA;
    --color-text: #22303C;
    --color-text-secondary: #55677A;
    --color-cta: #2567a8;
    --color-cta-hover: #1a4a7a;
    --color-border: #DCE5EE;
    --color-error: #C0392B;

    /* Typography - Libre Caslon Text is the brand typeface (style guide p.2) */
    --font-heading: 'Libre Caslon Text', 'Libre Baskerville', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', 'Segoe UI', sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;
    --section-padding-mobile: 60px;
    --container-padding: 40px;
    --container-padding-tablet: 30px;
    --container-padding-mobile: 20px;

    /* Transitions */
    --transition-base: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 48px;
    line-height: 1.2;
}

h2 {
    font-size: 36px;
    line-height: 1.3;
}

h3 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 22px;
    font-weight: 600;
}

p {
    margin-bottom: 1.2rem;
}

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

a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

strong {
    font-weight: 700;
}

/* ============================================
   SECTION HEADING ACCENT
   Subtle decorative underline accent for major
   section h2 headings to add visual polish.
   ============================================ */
.section-heading-accent {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

/* Left-aligned variant (for non-centered headings) */
.section-heading-accent.text-left::after {
    left: 0;
    transform: none;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding) 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--color-text-secondary);
}

/* Centered subheading text used under section h2 elements */
.section-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-intro-wide {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.section-intro-narrow {
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Top margin for grid containers when no section-intro precedes them */
.mt-3 {
    margin-top: 3rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* ============================================
   SKIP NAVIGATION (Accessibility)
   ============================================ */
.skip-to-main {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--color-primary);
    color: #FFFFFF;
    padding: 10px 20px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    font-size: 16px;
    transition: top var(--transition-base);
}

.skip-to-main:focus {
    top: 0;
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
    background-color: #FFFFFF;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow var(--transition-base);
}

.navbar.scrolled {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Logo / Brand - primary logo lockup on white nav bar */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
    transition: opacity var(--transition-base);
}

.logo:hover {
    text-decoration: none;
}

.logo:hover img {
    opacity: 0.82;
}

.logo:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Desktop Navigation Links */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 0.5rem 0;
    transition: color var(--transition-base);
    position: relative;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--color-primary);
    text-decoration: none;
}

/* Active page underline indicator */
.nav-link[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-primary);
}

/* Green CTA button in nav */
.nav-cta {
    background-color: var(--color-cta);
    color: #FFFFFF;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-base);
    display: inline-block;
}

.nav-cta:hover {
    background-color: var(--color-cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 103, 168, 0.3);
    text-decoration: none;
    color: #FFFFFF;
}

/* Hamburger Menu Button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 3px 0;
    transition: all var(--transition-base);
    display: block;
    border-radius: 2px;
}

/* Hamburger X animation when active */
.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    text-align: center;
    min-height: 44px;
    min-width: 44px;
}

.btn:hover {
    text-decoration: none;
}

/* Primary CTA - green */
.btn-primary {
    background-color: var(--color-cta);
    color: #FFFFFF;
    border-color: var(--color-cta);
}

.btn-primary:hover {
    background-color: var(--color-cta-hover);
    border-color: var(--color-cta-hover);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 103, 168, 0.3);
}

/* Secondary - outlined blue */
.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

/* Arrow variant - "Read Full Bio ->" style link-button */
.btn-arrow {
    text-transform: none;
    letter-spacing: 0;
    font-size: 17px;
}

/* Button focus state for keyboard navigation */
.btn:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* Full-width button variant */
.btn-full-width {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #FFFFFF;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle radial gradient overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%),
        radial-gradient(circle at 60% 80%, rgba(255,255,255,0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: #FFFFFF;
    font-size: 52px;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* Role / title line beneath the hero h1 (e.g. "Founder and Chief Economist").
   Deliberately subordinate to the name: letterspaced caps in the brand light
   blue, which is the style guide's designated light-on-dark pairing (the same
   blue the logo uses for "Economist" on navy). */
.hero .hero-role {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    /* letter-spacing adds a trailing space that shifts centred text left;
       an equal indent re-centres it optically */
    text-indent: 0.18em;
    color: var(--color-brand-light-tint);
    margin-bottom: 1.5rem;
}

/* Tuck the role line up under the name rather than floating between blocks */
.hero h1 + .hero-role {
    margin-top: -0.85rem;
}

.hero .subtitle {
    font-size: 22px;
    color: var(--color-border);
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* White-outlined secondary button in hero context */
.hero .btn-secondary {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.hero .btn-secondary:hover {
    background-color: #FFFFFF;
    color: var(--color-primary);
}

/* ============================================
   HERO - Abstract decorative SVG graphic
   Positioned at the bottom of the hero section
   to suggest data/economic analysis lines.
   ============================================ */
.hero-graphic {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    z-index: 0;
}

.hero-graphic svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   CARDS & GRID LAYOUTS
   ============================================ */

/* 2-column grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* 3-column grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* 4-item grid (displayed as 2x2) */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Base Card - enhanced hover with border-color transition */
.card {
    background: #FFFFFF;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-smooth),
                box-shadow var(--transition-smooth),
                border-color var(--transition-smooth);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent line revealed on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition-smooth);
    border-radius: 8px 8px 0 0;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(13, 33, 51, 0.14);
    border-color: rgba(13, 33, 51, 0.18);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.card h4 {
    color: var(--color-primary);
    margin-bottom: 0.8rem;
}

.card p {
    color: var(--color-text-secondary);
    font-size: 17px;
}

/* Card icon circle */
.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #FFFFFF;
    font-size: 24px;
    transition: transform var(--transition-smooth), background-color var(--transition-smooth);
}

/* Icon gently scales up when card is hovered */
.card:hover .card-icon {
    transform: scale(1.08);
    background-color: var(--color-secondary);
}

/* SVG icons inside card-icon */
.card-icon svg {
    width: 28px;
    height: 28px;
    stroke: #FFFFFF;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   SERVICES GRID (Home page - 5 cards)
   Uses CSS grid with auto-fill so the last
   card row is centered when there's an odd
   number of cards.
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* The 5th card (last-child in a 3-col grid)
   is centered by starting at column 2.
   nth-child(3n+2) matches positions 2, 5, 8...
   so card 5 as :last-child triggers this rule. */
.services-grid .service-card:last-child:nth-child(3n+2) {
    grid-column: 2;
}

/* ============================================
   SERVICE CARDS (Home page overview)
   ============================================ */
.service-card {
    text-align: left;
    position: relative;
    display: block; /* anchor tag reset */
    color: inherit;
}

.service-card:hover {
    text-decoration: none;
    color: inherit;
}

.service-card h3 {
    color: var(--color-primary);
    /* Smooth color transition on hover */
    transition: color var(--transition-base);
}

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

.service-card p {
    color: var(--color-text-secondary);
}

/* "Learn More" arrow span */
.service-card .learn-more {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    text-decoration: none;
    font-size: 16px;
    transition: color var(--transition-base);
}

/* Arrow pseudo-element with smooth slide animation */
.service-card .learn-more::after {
    content: '\2192';
    margin-left: 0.4rem;
    display: inline-block;
    transition: transform var(--transition-smooth),
                margin-left var(--transition-smooth);
}

.service-card:hover .learn-more {
    color: var(--color-accent);
}

.service-card:hover .learn-more::after {
    transform: translateX(6px);
    margin-left: 0.5rem;
}

/* Custom Solutions card (last service card on home page) */
.card-highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #FFFFFF;
}

.card-highlight h3 {
    color: #FFFFFF;
}

.card-highlight p {
    color: var(--color-border);
}

.card-highlight .learn-more {
    color: #FFFFFF;
}

/* ============================================
   ABOUT PREVIEW SECTION (Home page)
   ============================================ */
.about-preview {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

/* Headshot frame.
   The source headshot is a transparent-background cut-out, so it sits on a
   soft brand-tinted backdrop rather than floating on the page. The rounded
   square echoes the squares in the logo mark. */
.about-preview-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: 55% 50%;
    background: linear-gradient(160deg, var(--color-brand-pale) 0%, #eaf1f7 45%, #ffffff 100%);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(13, 33, 51, 0.1);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.about-preview-image:hover {
    box-shadow: 0 8px 30px rgba(13, 33, 51, 0.16);
    transform: scale(1.01);
}

.about-preview-content h3 {
    margin-bottom: 1.5rem;
}

/* ============================================
   PRACTICE AREAS / BADGES
   ============================================ */
.practice-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.badge {
    background-color: var(--color-bg-alt);
    color: var(--color-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--color-border);
    transition: all var(--transition-smooth);
    display: inline-block;
}

.badge:hover {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 33, 51, 0.2);
}

/* ============================================
   CTA SECTION (bottom of pages)
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #FFFFFF;
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    color: #FFFFFF;
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: var(--color-border);
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.cta-contact {
    margin-top: 2.5rem;
}

.cta-contact a {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 600;
    margin: 0 1.5rem;
    text-decoration: none;
}

.cta-contact a:hover {
    color: var(--color-border);
    text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-about h3 {
    color: #FFFFFF;
    margin-bottom: 1rem;
    font-size: 20px;
}

/* Light-application logo for the navy footer */
.footer-logo {
    height: 62px;
    width: auto;
    margin-bottom: 1.25rem;
}

.footer-about p {
    color: var(--color-brand-pale);
    font-size: 16px;
}

.footer-links h4,
.footer-contact h4 {
    color: #FFFFFF;
    font-size: 18px;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a,
.footer-contact a {
    color: var(--color-border);
    text-decoration: none;
    font-size: 16px;
    transition: color var(--transition-base);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.footer-contact p {
    color: var(--color-border);
    margin-bottom: 0.7rem;
    font-size: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-border);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 0;
}

/* LinkedIn icon in footer */
.footer-linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-linkedin-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    vertical-align: middle;
}

/* ============================================
   SERVICES PAGE - Engagement Models
   ============================================ */
.engagement-card {
    text-align: center;
}

.engagement-card h3 {
    margin-bottom: 1rem;
}

/* Pricing text within engagement cards */
.engagement-pricing {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary) !important;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ============================================
   SERVICES PAGE - Detailed Service Blocks
   ============================================ */
.service-detail {
    background: #FFFFFF;
    padding: 3rem;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--color-primary);
    transition: box-shadow var(--transition-smooth), border-left-color var(--transition-smooth);
}

.service-detail:hover {
    box-shadow: 0 6px 24px rgba(13, 33, 51, 0.12);
    border-left-color: var(--color-accent);
}

.service-detail h3 {
    font-size: 32px;
    margin-bottom: 1.5rem;
}

.service-detail .service-description {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 2rem;
}

.service-detail h4 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.service-detail ul {
    list-style: none;
    padding-left: 0;
}

.service-detail li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.8rem;
    color: var(--color-text-secondary);
}

.service-detail li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-cta);
    font-weight: bold;
    font-size: 18px;
}

/* ============================================
   SERVICES PAGE - Process Steps
   ============================================ */
.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    position: relative;
}

/* Arrow between steps (desktop) */
.process-step:not(:last-child)::after {
    content: '\2192';
    position: absolute;
    right: -1.2rem;
    top: 2rem;
    color: var(--color-primary);
    font-size: 24px;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 1rem;
    font-family: var(--font-body);
    transition: transform var(--transition-smooth), background-color var(--transition-smooth);
}

.process-step:hover .step-number {
    transform: scale(1.1);
    background-color: var(--color-accent);
}

.process-step h3 {
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.process-step p {
    font-size: 15px;
    color: var(--color-text-secondary);
}

/* ============================================
   ABOUT PAGE - Bio Section
   ============================================ */
.about-hero-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 3rem;
}

/* About-page headshot - same treatment as the home-page preview */
.about-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: 55% 50%;
    background: linear-gradient(160deg, var(--color-brand-pale) 0%, #eaf1f7 45%, #ffffff 100%);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(13, 33, 51, 0.1);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.about-image:hover {
    box-shadow: 0 10px 35px rgba(13, 33, 51, 0.18);
    transform: scale(1.01);
}

.bio-content {
    font-size: 18px;
    line-height: 1.8;
}

.bio-content p {
    margin-bottom: 1.5rem;
}

/* ============================================
   ABOUT PAGE - Expertise Grid
   ============================================ */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.expertise-column h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 26px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.expertise-column ul {
    list-style: none;
    padding: 0;
}

.expertise-column li {
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: 0.8rem;
    color: var(--color-text);
    font-size: 17px;
}

.expertise-column li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 24px;
    line-height: 1;
}

/* ============================================
   ABOUT PAGE - Vision Section
   ============================================ */
.vision-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

/* ============================================
   ABOUT PAGE - Publications placeholder
   ============================================ */
.publications-card {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CONTACT PAGE - Layout
   ============================================ */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-form-wrapper {
    background: #FFFFFF;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.contact-form-intro {
    margin-bottom: 2rem;
}

/* ============================================
   CONTACT PAGE - Form Styles
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-size: 16px;
}

/* Required field asterisk */
.form-group label.required::after {
    content: ' *';
    color: var(--color-error);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: border-color var(--transition-base);
    background-color: #FFFFFF;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 33, 51, 0.1);
}

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

/* Form validation error state */
.form-error {
    color: var(--color-error);
    font-size: 14px;
    margin-top: 0.3rem;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--color-error);
}

.form-group.error .form-error {
    display: block;
}

/* Form success message */
.form-success {
    background-color: #D5F4E6;
    color: #1E7E46;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: none;
    border: 1px solid #A3E4C1;
}

.form-success.show {
    display: block;
}

/* Form error banner (shown on submission failure) */
.form-error-banner {
    background-color: #FDEDED;
    color: #C0392B;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: none;
    border: 1px solid #F5C6CB;
}

.form-error-banner.show {
    display: block;
}

/* ============================================
   CONTACT PAGE - Sidebar Info
   ============================================ */
.contact-info {
    background: var(--color-bg-alt);
    padding: 2.5rem;
    border-radius: 8px;
    height: fit-content;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-info-intro {
    margin-bottom: 2rem;
}

.contact-method {
    margin-bottom: 2rem;
}

.contact-method h4 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: var(--color-text);
    font-size: 17px;
    word-break: break-all;
}

.contact-method a:hover {
    color: var(--color-primary);
}

.contact-response-note {
    margin-top: 2rem;
    font-size: 16px;
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ============================================
   CONTACT PAGE - Consultation Process
   Fixed: selector targets h2 to match the
   actual heading element in the HTML.
   ============================================ */
.consultation-process {
    background: var(--color-bg-alt);
    padding: 3rem;
    border-radius: 8px;
}

.consultation-process h2 {
    margin-bottom: 1rem;
}

.consultation-process-intro {
    margin-bottom: 2rem;
}

.consultation-process ul {
    list-style: none;
    padding: 0;
}

.consultation-process li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
    font-size: 17px;
}

.consultation-process li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-cta);
    font-weight: bold;
    font-size: 20px;
}

/* ============================================
   CONTACT PAGE - Confidentiality Card
   Fixed: selector targets h2 to match the
   actual heading element in the HTML.
   ============================================ */
.confidentiality-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    background: var(--color-bg-alt);
}

.confidentiality-card h2 {
    margin-bottom: 1rem;
}

.confidentiality-card p {
    margin-bottom: 0;
}

/* ============================================
   SCROLL FADE-IN ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCROLL-TO-TOP BUTTON
   Appears after user scrolls 400px down.
   Smooth opacity + translate transition.
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(13, 33, 51, 0.3);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--transition-smooth),
                transform var(--transition-smooth),
                background-color var(--transition-base),
                box-shadow var(--transition-smooth);
    /* Hidden from interactive flow until visible */
    pointer-events: none;
    z-index: 900;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    background-color: var(--color-secondary);
    box-shadow: 0 6px 22px rgba(13, 33, 51, 0.4);
    transform: translateY(-3px);
}

.scroll-to-top:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
    .container {
        padding: 0 var(--container-padding-tablet);
    }

    .nav-container {
        padding: 0 var(--container-padding-tablet);
    }

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

    /* Services grid on tablet: 2 columns with last card centred */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reset the column-span centering rule for the 5th card at tablet width */
    .services-grid .service-card:last-child:nth-child(3n+2) {
        grid-column: auto;
    }

    /* Centre the truly last odd card if it falls in the first column */
    .services-grid .service-card:last-child:nth-child(2n - 1) {
        grid-column: 1 / -1;
        max-width: calc(50% - 1.25rem);
        margin: 0 auto;
    }

    .about-preview {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Hide arrows that wrap to next row */
    .process-step:nth-child(3)::after {
        display: none;
    }

    .about-hero-content {
        grid-template-columns: 300px 1fr;
        gap: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Mobile: 767px and below */
@media (max-width: 767px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 24px;
    }

    .container {
        padding: 0 var(--container-padding-mobile);
    }

    .nav-container {
        padding: 0 var(--container-padding-mobile);
    }

    .section {
        padding: var(--section-padding-mobile) 0;
    }

    /* --- Mobile Navigation --- */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #FFFFFF;
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: right var(--transition-base);
        box-shadow: -5px 0 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 0;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    /* Remove underline on active link in mobile menu */
    .nav-link[aria-current="page"]::after {
        display: none;
    }

    .logo img {
        height: 40px;
    }

    /* --- Hero Section --- */
    .hero {
        padding: 80px 0 60px;
    }

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

    .hero .hero-role {
        font-size: 13px;
        letter-spacing: 0.14em;
        text-indent: 0.14em;
    }

    .hero h1 + .hero-role {
        margin-top: -0.4rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-graphic {
        height: 60px;
    }

    /* --- Grid Layouts --- */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Services grid: single column on mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Reset any column-span centering rules on mobile */
    .services-grid .service-card:last-child:nth-child(3n+2),
    .services-grid .service-card:last-child:nth-child(2n - 1) {
        grid-column: auto;
        max-width: 100%;
        margin: 0;
    }

    .card {
        padding: 1.5rem;
    }

    /* --- About Preview --- */
    .about-preview {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-preview-image {
        max-width: 300px;
        margin: 0 auto;
    }

    /* --- Process Steps --- */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-step::after {
        display: none !important;
    }

    /* --- About Page --- */
    .about-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* --- Contact Page --- */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    /* --- CTA Section --- */
    .cta-section {
        padding: 60px 0;
    }

    .cta-contact a {
        display: block;
        margin: 1rem 0;
    }

    /* --- Footer --- */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* --- Service Details --- */
    .service-detail {
        padding: 2rem;
    }

    .service-detail h3 {
        font-size: 26px;
    }

    /* --- Scroll-to-top button smaller offset on mobile --- */
    .scroll-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 44px;
        height: 44px;
    }
}

/* Very Small Mobile: 480px and below */
@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 14px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero .subtitle {
        font-size: 16px;
    }

    .practice-areas {
        flex-direction: column;
    }

    .badge {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus indicators for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

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

/* Reduced Motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }

    .scroll-to-top {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--color-primary);
    }

    .btn-primary {
        border: 2px solid var(--color-cta-hover);
    }

    .badge {
        border-width: 3px;
    }

    .scroll-to-top {
        border: 2px solid #FFFFFF;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .skip-to-main,
    .cta-section,
    .btn,
    .scroll-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000000;
        background: #FFFFFF;
    }

    .hero {
        background: none;
        color: #000000;
        padding: 1rem 0;
    }

    .hero h1,
    .hero .hero-role,
    .hero .subtitle {
        color: #000000;
    }

    .section {
        padding: 1rem 0;
    }

    .footer {
        background: none;
        color: #000000;
        border-top: 1px solid #000000;
    }
}
