/* ==========================================================================
   Font faces — locally hosted Google Fonts
   ========================================================================== */

@font-face {
    font-family: 'Source Sans 3';
    src: url('/Fonts/SourceSans3/SourceSans3.ttf') format('truetype');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans 3';
    src: url('/Fonts/SourceSans3/SourceSans3-Italic.ttf') format('truetype');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('/Fonts/SourceCodePro/SourceCodePro.ttf') format('truetype');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('/Fonts/SourceCodePro/SourceCodePro-Italic.ttf') format('truetype');
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
}

/* ==========================================================================
   CSS custom properties — design tokens from design guide
   ========================================================================== */

:root {
    /* Primary colours */
    --color-bg: #FAFAF8;
    --color-surface: #F2F1ED;
    --color-card: #FFFFFF;
    --color-border: #DDDDD8;
    --color-border-hover: #B5B5B0;

    /* Text colours */
    --color-text-primary: #1A1A18;
    --color-text-secondary: #555550;
    --color-text-tertiary: #8A8A84;

    /* Accent colours */
    --color-accent: #367739;
    --color-accent-light: #E1F5EE;
    --color-accent-mid: #1d9e1d;
    --color-accent-blue: #18a582;
    --color-accent-blue-light: #E6F1FB;

    /* Typography */
    --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;
    --font-mono: 'Source Code Pro', Consolas, 'Courier New', monospace;

    /* Layout */
    --max-width: 880px;
    --page-padding: 24px;
    --section-padding: 48px;
    --card-radius: 8px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text-secondary);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-accent-mid);
}

/* ==========================================================================
   Grid background
   ========================================================================== */

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

/* ==========================================================================
   Page wrapper
   ========================================================================== */

.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.nav-logo:hover {
    color: var(--color-text-primary);
}

.nav-logo-accent {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

.lang-switch-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 8px 6px;
    min-width: 28px;
    text-align: center;
    transition: color 0.15s ease;
    text-transform: uppercase;
}

.lang-switch-link:hover {
    color: var(--color-text-primary);
}

.lang-switch-link.is-active {
    color: var(--color-text-primary);
    font-weight: 600;
}

.lang-switch-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.lang-switch-sep {
    color: var(--color-border);
    user-select: none;
}


/* ==========================================================================
   Hero section
   ========================================================================== */

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

.hero-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.hero-text {
    flex: 1;
    min-width: 0;
    max-width: 560px;
}

.hero-text h1 {
    font-size: 2.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 640px;
}

.hero-text h2 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
    margin-bottom: 16px;
}

.hero-text p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 520px;
}

/* Profile card */
.hero-profile {
    flex-shrink: 0;
    width: 220px;
}

.profile-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: border-color 0.15s ease;
}

.profile-card:hover {
    border-color: var(--color-border-hover);
}

.profile-avatar {
    width: 144px;
    height: 144px;
    border-radius: 50%;
    border: 5px solid var(--color-border);
    object-fit: cover;
    background: var(--color-surface);
}

.profile-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.profile-location {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.profile-location i {
    margin-right: 3px;
}

/* ==========================================================================
   Content sections
   ========================================================================== */

.content-section {
    padding: var(--section-padding) 0;
    border-top: 1px solid var(--color-border);
}

.section-inner {
    max-width: 100%;
}

/* Section headings */
.content-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.content-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
    margin-top: 28px;
}

.content-section h3:first-child,
.content-section h2 + h3 {
    margin-top: 0;
}

/* Body text */
.content-section p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
}

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

/* Lists */
.content-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.content-section ul li {
    position: relative;
    padding: 8px 0 8px 20px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    border-bottom: 1px solid var(--color-surface);
}

.content-section ul li:last-child {
    border-bottom: none;
}

.content-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

/* Nested lists — answers in Q&A style */
.content-section ul ul {
    margin: 4px 0 0;
    padding: 0;
}

.content-section ul ul li {
    padding-left: 16px;
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    border-bottom: none;
}

.content-section ul ul li::before {
    width: 4px;
    height: 4px;
    top: 13px;
    background-color: var(--color-accent-mid);
}

/* Links inside sections */
.content-section a {
    font-weight: 500;
    color: var(--color-accent);
    transition: color 0.15s ease;
}

.content-section a:hover {
    color: var(--color-accent-mid);
}

/* CTA button — contact section (last content-section) */
.content-section:last-of-type a {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--color-accent);
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.content-section:last-of-type a:hover {
    background-color: var(--color-accent-mid);
    color: #FFFFFF;
}

/* Sub-content keyword pills section removed in productized services pivot.
   Rules targeting .hero + .content-section were removed because they
   applied unintended pill styling to the packages section which now
   follows the hero directly. */

/* ==========================================================================
   Value-for-customers — 3-column card grid
   The markdown produces: h2, h3, ul, h3, ul, h3, ul.
   We place each h3+ul pair into its own column via nth-of-type selectors.
   ========================================================================== */

.section-cards .section-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 0 16px;
}

.section-cards .section-inner > h2 {
    grid-column: 1 / -1;
    grid-row: 1;
}

.section-cards .section-inner > h3:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.section-cards .section-inner > h3:nth-of-type(2) { grid-column: 2; grid-row: 2; }
.section-cards .section-inner > h3:nth-of-type(3) { grid-column: 3; grid-row: 2; }

.section-cards .section-inner > ul:nth-of-type(1) { grid-column: 1; grid-row: 3; }
.section-cards .section-inner > ul:nth-of-type(2) { grid-column: 2; grid-row: 3; }
.section-cards .section-inner > ul:nth-of-type(3) { grid-column: 3; grid-row: 3; }

.section-cards .section-inner > h3 {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    padding: 16px 20px 8px;
    margin-top: 0;
    margin-bottom: 0;
}

.section-cards .section-inner > ul {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
    padding: 0 20px 16px;
    margin-bottom: 0;
    transition: border-color 0.15s ease;
}

.section-cards .section-inner > ul li {
    font-size: 0.8125rem;
    border-bottom-color: var(--color-border);
}

.section-cards .section-inner > ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Packages — 2-column service cards
   ========================================================================== */

.section-packages {
    padding-top: 56px;
    padding-bottom: 56px;
}

.section-packages .packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.section-packages .package-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--card-radius);
    padding: 28px;
    transition: border-color 0.15s ease;
    display: flex;
    flex-direction: column;
}

.section-packages a.package-card:hover {
    border-color: var(--color-border-hover);
}

.section-packages a.package-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.section-packages a.package-card p:last-child {
    transition: transform 0.15s ease;
}

.section-packages a.package-card:hover p:last-child {
    transform: translateX(2px);
}

.section-packages .package-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-top: 0;
    margin-bottom: 12px;
}

.section-packages .package-card p {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
}

.section-packages .package-card p:first-of-type {
    font-size: 0.875rem;
}

.section-packages .package-card p:last-child {
    margin-bottom: 0;
    margin-top: auto;
    padding-top: 16px;
    font-weight: 600;
    color: var(--color-accent);
}

.section-packages .package-card strong {
    color: var(--color-text-primary);
    font-size: 0.8125rem;
}

.section-packages .package-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.section-packages .package-card ul li {
    position: relative;
    padding: 6px 0 6px 16px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.section-packages .package-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

/* ==========================================================================
   Case study — narrative flow with accent labels
   ========================================================================== */

.case-study-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.case-study-pills .pill {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-card);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.section-case-study {
    padding-top: 56px;
}

.section-case-study .section-inner > h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-top: 32px;
    margin-bottom: 8px;
}

.section-case-study .section-inner > h2 + h3,
.section-case-study .section-inner > h3:first-of-type {
    margin-top: 0;
}

.section-case-study .section-inner > p {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 68ch;
}

.section-case-study .section-inner > ul {
    margin-top: 8px;
    font-size: 0.875rem;
    max-width: 68ch;
}

.section-case-study .section-inner > ul li {
    font-weight: 500;
    color: var(--color-text-primary);
}

/* ==========================================================================
   Contact section — booking CTA with dual buttons
   ========================================================================== */

.section-contact {
    padding-top: 64px;
    padding-bottom: 64px;
    background: var(--color-surface);
    margin-left: calc(-1 * var(--page-padding));
    margin-right: calc(-1 * var(--page-padding));
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    border-radius: 8px;
    border-top: none;
}

.section-contact h3 {
    margin-bottom: 16px;
}

.section-contact .section-inner > p:first-of-type {
    margin-bottom: 24px;
}

.section-contact .section-inner > p:nth-of-type(2),
.section-contact .section-inner > p:nth-of-type(3) {
    display: inline-block;
    margin-bottom: 0;
    margin-right: 12px;
}

.section-contact .section-inner > p a {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--color-accent);
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.section-contact .section-inner > p a:hover {
    background-color: var(--color-accent-mid);
    color: #FFFFFF;
}

.section-contact .section-inner > p + p + p a {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-border-hover);
}

.section-contact .section-inner > p + p + p a:hover {
    background-color: var(--color-accent);
    color: #FFFFFF;
    border-color: var(--color-accent);
}

/* ==========================================================================
   Nav — LinkedIn icon
   ========================================================================== */

.nav-linkedin i {
    margin-right: 4px;
    font-size: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    margin-top: 48px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    transition: color 0.15s ease;
}

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

/* ==========================================================================
   Responsive — tablet (600–879px)
   ========================================================================== */

@media (max-width: 879px) {
    .hero-content {
        flex-direction: column;
    }

    .hero-profile {
        width: 100%;
    }

    .profile-card {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .profile-avatar {
        width: 112px;
        height: 112px;
    }

    .section-cards .section-inner {
        display: block;
    }

    .section-cards .section-inner > h3 {
        margin-top: 16px;
    }

    .section-cards .section-inner > h3:first-of-type {
        margin-top: 0;
    }

    .section-packages .packages-grid {
        grid-template-columns: 1fr;
    }

    .section-contact .section-inner > p:nth-of-type(2),
    .section-contact .section-inner > p:nth-of-type(3) {
        display: block;
        margin-right: 0;
        margin-bottom: 12px;
    }
}

/* ==========================================================================
   Responsive — mobile (< 600px)
   ========================================================================== */

@media (max-width: 599px) {
    :root {
        --section-padding: 36px;
        --page-padding: 16px;
    }

    .nav-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-links {
        order: 3;
    }

    .hero-text h1 {
        font-size: 1.625rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Accessibility primitives */
.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    z-index: 100;
    padding: 8px 16px;
    background: var(--color-accent, #0F1110);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: top 120ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 8px;
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.section-case-studies-index a.case-study-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
