/* ===================================================================
   Barker Consulting — "Editorial Code"
   Warm light panels with decorative IDE-styled code blocks.
   The code IS the imagery.
   =================================================================== */

:root {
    /* Backgrounds — warm off-white */
    --bg-base: #F7F6F4;
    --bg-surface: #EFEEE9;
    --bg-elevated: #E8E6E1;

    /* Text */
    --text-primary: #2C2F33;
    --text-secondary: #5C6168;
    --text-tertiary: #8A8F96;

    /* Brand */
    --accent: #3A7CA5;
    --accent-hover: #2E6584;
    --accent-subtle: rgba(58, 124, 165, 0.08);

    /* IDE / Code block palette (Son of Obsidian) */
    --code-bg: #22282A;
    --code-fg: #F1F2F3;
    --code-keyword: #93C763;
    --code-string: #EC7600;
    --code-type: #678CB1;
    --code-comment: #66747B;
    --code-gutter: #3E4549;
    --code-highlight: rgba(255, 255, 255, 0.04);

    /* Layout */
    --content-width: 64rem;
    --gutter: 2rem;
}

/* === Reset === */

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

/* === Base === */

html {
    font-size: 16px;
    min-height: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === Typography === */

h1, h2, h3 {
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p {
    max-width: 42em;
}

p + p {
    margin-top: 1em;
}

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

a:hover,
a:focus-visible {
    color: var(--accent-hover);
}

/* === Header === */

header {
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
}

.site-brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-brand:hover,
.site-brand:focus-visible {
    color: var(--text-primary);
    text-decoration: none;
}

.site-brand .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--code-bg);
    color: var(--code-keyword);
    font-size: 0.8rem;
    font-family: "Cascadia Code", "Fira Code", "SF Mono", "Consolas", monospace;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
}

.site-brand .brand-accent {
    color: var(--accent);
    font-weight: 700;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

header nav ul a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

header nav ul a:hover,
header nav ul a:focus-visible {
    color: var(--text-primary);
    background: var(--accent-subtle);
    text-decoration: none;
}

/* === Main === */

main {
    flex: 1;
}

/* === Panels — alternating full-width sections === */

.panel {
    width: 100%;
    padding: 5rem var(--gutter);
    overflow: hidden;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .panel {
        padding: 3rem var(--gutter);
    }
}

.panel-content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.panel-white {
    background: #FFFFFF;
}

.panel-base {
    background: var(--bg-base);
}

/* === Split layout — text + code side by side === */

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-width: 0;
}

.split > * {
    min-width: 0;
}

.split-text h2 {
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.split-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 100%;
}

.split-text .label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* === Hero === */

.hero {
    padding-top: 6rem;
    padding-bottom: 6rem;
    position: relative;
}

.hero .panel-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.25rem;
    line-height: 1.08;
    margin-bottom: 1rem;
}

.hero-text h1 .accent {
    color: var(--accent);
}

.hero-text .tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-text .cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(58, 124, 165, 0.3);
}

.cta-primary:hover,
.cta-primary:focus-visible {
    background: var(--accent-hover);
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 124, 165, 0.35);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

/* === Code Window — IDE-styled decorative blocks === */

.code-window {
    background: var(--code-bg);
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 20px 40px rgba(0, 0, 0, 0.12);
    font-family: "Cascadia Code", "Fira Code", "SF Mono", "Consolas", monospace;
    font-size: 0.82rem;
    line-height: 1.7;
}

.code-titlebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.code-dots span:first-child { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FEBC2E; }
.code-dots span:nth-child(3) { background: #28C840; }

.code-filename {
    font-size: 0.72rem;
    color: var(--code-comment);
    margin-left: 0.5rem;
}

.code-body {
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    tab-size: 4;
}

.code-body code {
    white-space: pre;
    color: var(--code-fg);
}

/* Syntax highlighting classes */
.kw { color: var(--code-keyword); }
.ty { color: var(--code-type); }
.str { color: var(--code-string); }
.cm { color: var(--code-comment); }
.nr { color: #FFCD22; }
.fn { color: #F1F2F3; }
.op { color: #E8E2B7; }

/* Stacked code windows — overlapping effect */

.code-stack {
    position: relative;
    padding: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.code-stack .code-window {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-stack .code-window:first-child {
    position: relative;
    z-index: 2;
}

.code-stack .code-window + .code-window {
    margin-top: -2rem;
    margin-left: 1.5rem;
    position: relative;
    z-index: 1;
    opacity: 0.7;
    transform: scale(0.97);
}

.code-stack:hover .code-window:first-child {
    transform: translateY(-3px);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 24px 48px rgba(0, 0, 0, 0.15);
}

.code-stack:hover .code-window + .code-window {
    opacity: 0.85;
    transform: scale(0.97) translateY(3px);
}

/* === Pipeline chart — project lifecycle inside a code window === */

.pipeline {
    list-style: none;
    padding: 1.25rem 1.5rem;
    margin: 0;
    font-family: "Cascadia Code", "Fira Code", "SF Mono", "Consolas", monospace;
    color: var(--code-fg);
    counter-reset: pipeline;
}

.pipeline-stage {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    column-gap: 0.85rem;
    padding: 0.55rem 0;
    position: relative;
}

.pipeline-stage + .pipeline-stage::before {
    content: "";
    position: absolute;
    left: 0.925rem;
    top: -0.55rem;
    width: 1px;
    height: 1.1rem;
    background: var(--code-gutter);
    transform: translateX(-0.5px);
}

.pipeline-num {
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--code-keyword);
    background: rgba(147, 199, 99, 0.08);
    border: 1px solid rgba(147, 199, 99, 0.3);
    border-radius: 6px;
}

.pipeline-name {
    color: var(--code-type);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.pipeline-note {
    color: var(--code-comment);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .pipeline-stage {
        grid-template-columns: auto 1fr;
        row-gap: 0.1rem;
    }

    .pipeline-note {
        grid-column: 2;
        white-space: normal;
    }
}

/* === Feature cards === */

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

.feature-card {
    padding: 1.75rem;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.panel-white .feature-card {
    background: var(--bg-base);
}

.feature-card:hover {
    border-color: rgba(58, 124, 165, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.feature-card .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: "Cascadia Code", "Fira Code", "SF Mono", "Consolas", monospace;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.925rem;
}

/* === CTA Banner === */

.cta-banner .panel-content {
    text-align: center;
}

.cta-banner h2 {
    margin-bottom: 0.75rem;
}

.cta-banner p {
    color: var(--text-secondary);
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

/* === Footer === */

footer {
    background: var(--code-bg);
    color: rgba(255, 255, 255, 0.5);
    margin-top: auto;
}

footer .footer-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

footer a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
    color: rgba(255, 255, 255, 0.8);
}

.footer-tagline {
    font-family: "Cascadia Code", "Fira Code", "SF Mono", "Consolas", monospace;
    font-size: 0.75rem;
    color: var(--code-comment);
}

/* === Page subtitle (Services, Contact) === */

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    max-width: 38em;
}

/* === Label (reusable section eyebrow) === */

.label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* === Service list === */

.service-list {
    list-style: none;
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.service-list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* === Walk-away statement (services) === */

.walkaway {
    margin-top: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

/* === Bio section (Who We Are) === */

.bio-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    align-items: start;
}

.bio-photo {
    width: 12rem;
    height: 12rem;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.bio-text h2 {
    margin-bottom: 0.25rem;
}

.bio-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.bio-text p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.bio-personal p {
    color: var(--text-secondary);
    max-width: 42em;
}

.scripture {
    margin-top: 2rem;
    padding: 1.5rem 1.75rem;
    background: var(--bg-base);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    max-width: 36em;
}

.scripture p {
    font-style: italic;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.scripture cite {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .bio-section {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

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

/* === Contact page === */

.contact-page {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--bg-base);
    border-radius: 10px;
    max-width: 28rem;
}

.contact-method + .contact-method {
    margin-top: 1.5rem;
}

.contact-method h3 {
    margin-bottom: 0.5rem;
}

.contact-link {
    font-size: 1.15rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.contact-method p {
    color: var(--text-secondary);
    font-size: 0.925rem;
}

/* === Prose (Privacy, legal content) === */

.prose {
    max-width: 42rem;
}

.prose h1 {
    margin-bottom: 0.5rem;
}

.prose .policy-effective {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.prose h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.prose h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.prose p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.prose ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.prose li {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.prose a {
    font-weight: 500;
}

/* === Error page === */

.error-page {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-code-window {
    max-width: 32rem;
    width: 100%;
}

.error-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* === Responsive === */

@media (max-width: 768px) {
    :root {
        --gutter: 1.25rem;
    }

    header nav {
        gap: 0.5rem 1rem;
    }

    header nav ul {
        gap: 0.75rem;
    }

    header nav ul a {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }

    .hero {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

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

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

    .hero-text .tagline {
        font-size: 1.05rem;
    }

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

    .cta-primary,
    .cta-secondary {
        justify-content: center;
        text-align: center;
    }

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

    .features {
        grid-template-columns: 1fr;
    }

    .code-stack .code-window + .code-window {
        margin-left: 0;
    }

    .code-body {
        font-size: 0.72rem;
        padding: 1rem;
    }

    footer .footer-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.4rem; }

    p {
        max-width: 100%;
    }

    .page-subtitle {
        max-width: 100%;
    }

    .code-stack {
        padding: 0;
    }

    .code-stack .code-window + .code-window {
        margin-top: -1rem;
    }
}

/* Narrow phones: iPhone SE (375), Galaxy S8+ (360), Fold 5 (344) */
@media (max-width: 430px) {
    :root {
        --gutter: 1rem;
    }

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

    .hero-text .tagline {
        font-size: 0.95rem;
    }

    .site-brand {
        font-size: 1.15rem;
    }

    .code-body {
        font-size: 0.65rem;
        padding: 0.75rem;
    }

    .code-titlebar {
        padding: 0.5rem 0.75rem;
    }

    .code-filename {
        font-size: 0.65rem;
    }

    .code-dots span {
        width: 8px;
        height: 8px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.25rem; }
}

/* === Print === */

/* Print-only elements hidden on screen */
.policy-version-print {
    display: none;
}

@page {
    margin: 1.25cm;
}

@media print {
    /* Hide non-content elements */
    header, footer, .cta-primary, .cta-secondary, .cta-banner,
    .code-window, .code-stack {
        display: none !important;
    }

    /* Base print typography */
    body {
        background: #FFFFFF;
        color: #000000;
        font-size: 11pt;
        line-height: 1.5;
        display: block;
    }

    main {
        display: block;
    }

    /* Panels */
    .panel {
        padding: 1.5rem 0;
        background: #FFFFFF !important;
        break-inside: avoid;
    }

    .panel-content {
        max-width: 100%;
    }

    /* Layouts go single-column */
    .split {
        display: block;
    }

    .features {
        display: block;
    }

    .feature-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #DDD;
        margin-bottom: 0.75rem;
    }

    /* Bio */
    .bio-section {
        display: block;
    }

    .bio-photo {
        float: left;
        width: 6rem;
        height: 6rem;
        margin: 0 1rem 0.5rem 0;
    }

    /* Keep these together */
    .scripture,
    .walkaway,
    .service-list {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Prose / Privacy */
    .prose {
        max-width: 100%;
    }

    .prose a {
        color: #000000;
        text-decoration: underline;
    }

    .prose ul {
        gap: initial;
    }

    .prose a[href^="mailto"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }

    .policy-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .policy-version-print {
        display: block;
        margin-top: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid #CCC;
        font-size: 0.8rem;
        color: #888;
    }
}
