/* ═══════════════════════════════════════════════════
   Neil Dunlop Consulting — Bold Design System
   Shared styles for all pages
   ═══════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    --accent: #0CABA8;
    --accent-dark: #099E9B;
    --accent-glow: rgba(12, 171, 168, 0.15);

    --bg-deep: #0F1419;
    --bg-deep-mid: #171E26;
    --bg-deep-light: #1E2832;
    --bg-cream: #FAF9F6;
    --bg-cream-dark: #F0EFE9;

    --text-dark: #0F1419;
    --text-mid: #4A5568;
    --text-light: #8896A6;
    --text-on-dark: #C8D0DA;

    --border-dark: rgba(255,255,255,0.08);
    --border-light: #E2E0DA;

    --card-bg: white;
    --card-role: var(--accent);
}

/* Logo with icon */
.logo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.logo-icon {
    position: relative;
    top: -2px;
}
.logo-icon rect {
    fill: var(--accent);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-cream);
    -webkit-font-smoothing: antialiased;
}

/* ─── Grain texture ─── */
.grain::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ─── Header ─── */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 1.25rem 2.5rem;
    transition: background 0.4s, backdrop-filter 0.4s;
}

header.scrolled {
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(12px);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
}

.nav-links { display: flex; align-items: center; gap: 2.5rem; }

.nav-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}
.nav-links a:hover { color: white; }
.nav-links a.active { color: white; }

.nav-cta {
    color: var(--accent) !important;
    font-weight: 700 !important;
    border: 1.5px solid var(--accent);
    padding: 0.6rem 1.5rem;
    transition: all 0.3s !important;
}
.nav-cta:hover {
    background: var(--accent) !important;
    color: white !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: white;
    margin: 6px 0;
    transition: 0.3s;
}

/* ─── Section Utilities ─── */
.section-dark {
    background: var(--bg-deep);
    color: white;
    position: relative;
}

.section-cream {
    background: var(--bg-cream);
    position: relative;
}

.section-grey {
    background: var(--bg-cream-dark);
    position: relative;
}

.section-accent {
    background: var(--accent);
    position: relative;
}

.section-pad { padding: 7rem 2.5rem; }
.section-pad-sm { padding: 5rem 2.5rem; }

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-inner-narrow {
    max-width: 800px;
    margin: 0 auto;
}

/* ─── Kickers ─── */
.section-kicker {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-kicker::before {
    content: '';
    width: 30px;
    height: 1.5px;
}

.section-dark .section-kicker { color: var(--accent); }
.section-dark .section-kicker::before { background: var(--accent); }
.section-cream .section-kicker { color: var(--accent); }
.section-cream .section-kicker::before { background: var(--accent); }
.section-grey .section-kicker { color: var(--accent); }
.section-grey .section-kicker::before { background: var(--accent); }
.section-accent .section-kicker { color: rgba(255,255,255,0.7); }
.section-accent .section-kicker::before { background: rgba(255,255,255,0.5); }

/* ─── Headings ─── */
.section-heading {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1px;
}

.section-dark .section-heading { color: white; }
.section-cream .section-heading { color: var(--text-dark); }
.section-grey .section-heading { color: var(--text-dark); }
.section-accent .section-heading { color: white; }

.heading-xl { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.heading-lg { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* ─── Prose ─── */
.prose-dark p { color: var(--text-on-dark); font-size: 1.1rem; line-height: 1.85; margin-bottom: 1.5rem; font-weight: 300; }
.prose-light p { color: var(--text-mid); font-size: 1.1rem; line-height: 1.85; margin-bottom: 1.5rem; }

.prose-dark h3,
.prose-light h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
    letter-spacing: -0.3px;
}
.prose-dark h3 { color: white; font-size: 1.3rem; }
.prose-light h3 { color: var(--text-dark); font-size: 1.25rem; }

/* ─── Services Grid ─── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-dark);
    margin-top: 3.5rem;
}

.service-card {
    background: var(--bg-deep-mid);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 3px;
    background: var(--accent);
    transition: width 0.4s;
}
.service-card:hover::before { width: 100%; }
.service-card:hover { background: var(--bg-deep-light); }

.service-card .service-icon {
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
    line-height: 1;
    opacity: 0.8;
}

.service-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.service-card p {
    color: var(--text-on-dark);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
    flex-grow: 1;
}

.service-card .card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s;
}
.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ─── Stats Band ─── */
.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat-item {
    padding: 3.5rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ─── Track Record Cards ─── */
.track-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.track-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-left: 4px solid var(--accent);
    transition: all 0.3s;
}
.track-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.track-card h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.track-card .role {
    font-size: 0.8rem;
    color: var(--card-role);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.track-card p {
    font-size: 0.98rem;
    color: var(--text-mid);
    line-height: 1.75;
}

/* ─── Image Break ─── */
.image-break {
    height: 350px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}
.image-break::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent-overlay, rgba(12, 171, 168, 0.35)) 0%, rgba(15, 20, 25, 0.7) 100%);
}

.image-break-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-break-quote {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: white;
    text-align: center;
    max-width: 700px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* ─── Differentiators ─── */
.diff-items { margin-top: 3.5rem; }

.diff-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-dark);
    align-items: start;
}
.diff-item:last-child { border-bottom: none; }

.diff-num {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    opacity: 0.4;
    letter-spacing: -2px;
}

.diff-item h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.diff-item p {
    color: var(--text-on-dark);
    font-size: 1.02rem;
    line-height: 1.8;
    font-weight: 300;
}

/* ─── Involves Grid (service pages) ─── */
.involves-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    max-width: 800px;
}

.involves-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
    padding: 0.6rem 0;
}

.section-dark .involves-item { color: var(--text-on-dark); }
.section-cream .involves-item,
.section-grey .involves-item { color: var(--text-mid); }

.involves-arrow {
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.55em;
    position: relative;
    top: -0.1em;
}

/* ─── Example Block ─── */
.example-block {
    background: var(--bg-deep-mid);
    border-left: 4px solid var(--accent);
    padding: 2rem 2.5rem;
    margin: 0 0 1.5rem;
}

.section-cream .example-block,
.section-grey .example-block {
    background: white;
}

.example-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.example-block p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0;
}
.section-dark .example-block p { color: var(--text-on-dark); }
.section-cream .example-block p,
.section-grey .example-block p { color: var(--text-mid); }

/* ─── Tags ─── */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tag {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.section-dark .tag {
    background: var(--bg-deep-light);
    color: var(--text-on-dark);
    border: 1px solid var(--border-dark);
}
.section-cream .tag,
.section-grey .tag {
    background: var(--bg-cream-dark);
    color: var(--text-mid);
    border: 1px solid var(--border-light);
}

/* ─── Related Services ─── */
.related-services {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-dark);
}

.section-cream .related-services,
.section-grey .related-services {
    border-top-color: var(--border-light);
}

.related-services p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.related-services a {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-right: 1.5rem;
    transition: opacity 0.3s;
}
.related-services a:hover { opacity: 0.7; }

/* ─── Pull Quote ─── */
.pull-quote {
    border-left: 4px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
}
.pull-quote p {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.3px;
}
.section-dark .pull-quote p { color: white; }
.section-cream .pull-quote p,
.section-grey .pull-quote p { color: var(--text-dark); }

/* ─── Highlight Box ─── */
.highlight-box {
    background: var(--bg-deep-mid);
    border: 1px solid var(--accent);
    padding: 2rem 2.5rem;
    margin: 2rem 0;
}
.section-cream .highlight-box,
.section-grey .highlight-box {
    background: var(--bg-cream-dark);
}
.highlight-box p {
    font-size: 1.1rem;
    line-height: 1.75;
}
.section-dark .highlight-box p { color: var(--text-on-dark); }
.section-cream .highlight-box p,
.section-grey .highlight-box p { color: var(--text-mid); }

/* ─── Page Hero (subpages) ─── */
.page-hero {
    background: var(--bg-deep);
    color: white;
    padding: 10rem 2.5rem 5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -20%; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}
.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.page-hero .hero-icon {
    color: var(--accent);
    margin-bottom: 2rem;
    display: block;
    opacity: 0.7;
}
.page-hero h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}
.page-hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-on-dark);
    line-height: 1.75;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ─── CTA Section ─── */
.cta-section {
    background: linear-gradient(135deg, var(--bg-deep) 0%, #0D1117 100%);
    padding: 7rem 2.5rem;
    text-align: center;
}
.cta-content { max-width: 700px; margin: 0 auto; }

.cta-heading {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.15;
}

.cta-text {
    color: rgba(255,255,255,0.65);
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: white;
    color: var(--bg-deep);
    padding: 1.15rem 2.8rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}
.cta-btn:hover {
    background: var(--bg-cream);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* ─── Primary Button (accent fill) ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--accent);
    color: white;
    padding: 1.1rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateX(4px);
}

/* ─── Footer ─── */
footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-dark);
    color: var(--text-light);
    padding: 2rem 2.5rem;
    text-align: center;
}
footer p { font-size: 0.85rem; }
footer span { color: rgba(255,255,255,0.15); margin: 0 0.75rem; }

/* ════════════════════════════════════
   LIGHT MODE OVERRIDES
   ════════════════════════════════════ */
body.light-mode {
    --bg-deep: #FAF9F6;
    --bg-deep-mid: #F0EFE9;
    --bg-deep-light: #E8E6E0;
    --bg-cream: #FFFFFF;
    --bg-cream-dark: #F8F7F4;
    --text-on-dark: #4A5568;
    --border-dark: rgba(0,0,0,0.06);
    --card-bg: #FAF9F6;
}

body.light-mode .logo { color: var(--text-dark); }
body.light-mode header.scrolled { background: rgba(255,255,255,0.95); border-bottom: 1px solid rgba(0,0,0,0.06); }
body.light-mode .nav-links a { color: var(--text-mid); }
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active { color: var(--text-dark); }
body.light-mode .menu-toggle span { background: var(--text-dark); }

body.light-mode .section-dark { background: var(--bg-deep); color: var(--text-dark); }
body.light-mode .section-dark .section-heading { color: var(--text-dark); }

body.light-mode .page-hero { color: var(--text-dark); }
body.light-mode .page-hero h1 { color: var(--text-dark); }
body.light-mode .page-hero .subtitle { color: var(--text-mid); }

body.light-mode .service-card { background: var(--bg-deep-mid); }
body.light-mode .service-card:hover { background: var(--bg-deep-light); }
body.light-mode .service-card h3 { color: var(--text-dark); }
body.light-mode .service-card p { color: var(--text-mid); }

body.light-mode .stat-item { border-right-color: rgba(255,255,255,0.15); }

body.light-mode .diff-item h3 { color: var(--text-dark); }
body.light-mode .diff-item p { color: var(--text-mid); }

body.light-mode .cta-section { background: linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-deep-mid) 100%); }
body.light-mode .cta-heading { color: var(--text-dark); }
body.light-mode .cta-text { color: var(--text-mid); }
body.light-mode .cta-btn { background: var(--accent); color: white; }
body.light-mode .cta-btn:hover { background: var(--accent-dark); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }

body.light-mode footer { background: var(--bg-deep-mid); border-top-color: rgba(0,0,0,0.06); color: var(--text-mid); }
body.light-mode .grain::after { opacity: 0.015; }

body.light-mode .example-block { background: var(--bg-cream-dark); }
body.light-mode .section-dark .example-block p { color: var(--text-mid); }
body.light-mode .section-dark .involves-item { color: var(--text-mid); }
body.light-mode .section-dark .prose-dark p { color: var(--text-mid); }
body.light-mode .section-dark .prose-dark h3 { color: var(--text-dark); }
body.light-mode .pull-quote p { color: var(--text-dark) !important; }
body.light-mode .highlight-box { background: var(--bg-cream-dark); }
body.light-mode .section-dark .highlight-box p { color: var(--text-mid); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-band { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
    .involves-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    header { padding: 1rem 1.5rem; }
    .section-pad { padding: 5rem 1.5rem; }
    .section-pad-sm { padding: 3.5rem 1.5rem; }
    .page-hero { padding: 7rem 1.5rem 3.5rem; }
    .page-hero h1 { letter-spacing: -1px; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-band { grid-template-columns: 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding: 2rem 1.5rem; }
    .stat-item:last-child { border-bottom: none; }
    .diff-item { grid-template-columns: 50px 1fr; gap: 1.25rem; }
    .diff-num { font-size: 2.5rem; }
    .track-cards { grid-template-columns: 1fr; }
    .image-break { height: 250px; background-attachment: scroll; }
    .example-block { padding: 1.5rem 1.75rem; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(15, 20, 25, 0.98);
        padding: 1.5rem 2.5rem 2rem;
        gap: 0;
    }
    .nav-links.active a { padding: 0.85rem 0; }
}

@media (max-width: 480px) {
    header { padding: 0.85rem 1.5rem; }
}
