/* ================================================================
   Wholeview Collaborative — site styles
   Design principles: clean, professional, accessible (WCAG AA),
   warm and approachable for families navigating ABA / special ed.
   ================================================================ */

/* ── Custom properties ──────────────────────────────────────────── */
:root {
    --color-primary:    #1D6A7A;
    --color-primary-dk: #134E5C;
    --color-accent:     #C07A48;   /* Clay — warmer, earthier than amber */
    --color-accent-dk:  #A5622F;
    --color-text:       #17272D;   /* Deep teal-black */
    --color-muted:      #5E7880;
    --color-bg:         #ffffff;
    --color-bg-alt:     #EAF2F4;   /* Light teal wash */
    --color-bg-dark:    #134E5C;
    --color-border:     #CDE0E5;
    --color-hero-overlay: rgba(13, 46, 54, 0.5);

    --font-display: 'DM Serif Display', Georgia, serif;   /* Hero h1 only */
    --font-body:    'Inter', system-ui, sans-serif;

    --radius:    3px;
    --radius-lg: 6px;
    --shadow:    0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.09);

    --nav-height: 3.75rem;
    --max-w: 1140px;
    --max-w-prose: 700px;
}

/* ── Reset / base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-top: var(--nav-height);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
a:hover { color: var(--color-primary-dk); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--color-text);
    text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); }

p { margin-top: 0; margin-bottom: 1rem; }

/* ── Skip link ───────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Navigation ──────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.navbar { height: 100%; }

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    text-decoration: none;
    flex-shrink: 0;
}
.logo-text {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.primary-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-muted);
    text-decoration: none;
    border-radius: var(--radius);
    letter-spacing: 0.005em;
    transition: color 0.12s;
}
.nav-link:hover { background: transparent; color: var(--color-text); }
.nav-link.active, .nav-link[aria-current="page"] {
    color: var(--color-text);
    background: transparent;
    font-weight: 600;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
}
.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .primary-nav {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem;
        gap: 0.125rem;
        box-shadow: var(--shadow-lg);
    }
    .primary-nav.is-open { display: flex; }
    .nav-link { font-size: 1rem; padding: 0.6rem 0.75rem; }
}

/* ── Hero (home page) ────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    background-color: var(--color-primary-dk);
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: left;
    overflow: hidden;
}

/* Dot texture on the right half — decorative, not critical */
.hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 55%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-hero-overlay);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0;
    padding: 5rem 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);   /* Only place display serif is used */
    font-weight: 400;
    color: #fff;
    font-size: clamp(2.5rem, 6.5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-top: 0;
}

.hero .lead {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: rgba(255,255,255,.82);
    max-width: 520px;
    margin: 0 0 2.25rem;
    line-height: 1.75;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-primary:hover {
    background: var(--color-accent-dk);
    border-color: var(--color-accent-dk);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.7);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,.15);
    border-color: #fff;
    color: #fff;
}

/* ── Section utility ─────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt { background: var(--color-bg-alt); }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.prose {
    max-width: var(--max-w-prose);
    margin: 0 auto;
}

/* ── Page header (non-home pages) ────────────────────────────────── */
.page-header {
    background: var(--color-bg-dark);
    color: #fff;
    padding: 4rem 0 3rem;
    position: relative;
    background-size: cover;
    background-position: center;
}
.page-header-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-hero-overlay);
}
.page-header-content {
    position: relative;
    z-index: 1;
    text-align: left;
}
.page-header h1 {
    color: #fff;
    margin-top: 0;
    letter-spacing: -0.025em;
}
.page-header .lead {
    color: rgba(255,255,255,.88);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Content blocks ──────────────────────────────────────────────── */
.block {
    padding: 0 0 2rem;
}
.block img { border-radius: var(--radius); }

/* ── Archive listing ─────────────────────────────────────────────── */
.archive-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2rem;
}

.post-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    border: none;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 1.875rem 0;
    transition: opacity 0.15s;
    overflow: visible;
}
.post-card:hover { opacity: 0.7; transform: none; box-shadow: none; }

/* Small thumbnail on the right */
.post-card-img {
    order: 2;
    flex-shrink: 0;
    width: 120px;
}
.post-card-img img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
}

.post-card-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.post-card-body h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 0;
    margin-bottom: 0.375rem;
}
.post-card-body h3 a { text-decoration: none; color: var(--color-text); }
.post-card-body h3 a:hover { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }

.post-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    letter-spacing: 0.005em;
}
.post-meta a { color: var(--color-muted); }

.post-card-excerpt {
    flex: 1;
    font-size: 0.875rem;
    color: var(--color-muted);
    line-height: 1.65;
    margin-bottom: 0;
}

.post-read-more {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 0.5rem;
}
.post-read-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: background 0.15s, color 0.15s;
}
.page-item .page-link:hover { background: var(--color-bg-alt); }
.page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ── Post single ─────────────────────────────────────────────────── */
.post-content {
    padding: 3rem 0;
}
.post-content .container { max-width: var(--max-w-prose); }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
    background: var(--color-text);
    color: rgba(255,255,255,.75);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem 3rem;
    align-items: start;
}

.footer-brand strong {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.35rem;
}
.footer-brand p { font-size: 0.875rem; margin: 0; }

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}
.footer-nav a {
    color: rgba(255,255,255,.7);
    font-size: 0.875rem;
    text-decoration: none;
}
.footer-nav a:hover { color: #fff; }

.footer-copy {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: rgba(255,255,255,.45);
    margin: 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

@media (max-width: 600px) {
    .footer-container { grid-template-columns: 1fr; }
    .post-card { gap: 1rem; }
    .post-card-img { width: 80px; }
    .post-card-img img { width: 80px; height: 60px; }
}

/* ── HeroBlock (reusable block in pages) ─────────────────────────── */
.block-hero {
    padding: 0;
    margin-bottom: 2rem;
}

.block-hero .hero-block-inner {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.block-hero .hero-block-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 46, 54, 0.5);
}

.block-hero .hero-block-content {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    max-width: 680px;
    margin: 0 auto;
}

.block-hero h2 { color: #fff; margin-top: 0; }
.block-hero p { color: rgba(255,255,255,.88); margin-bottom: 1.5rem; }

/* ── Access denied ───────────────────────────────────────────────── */
.access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem 1.5rem;
}

/* ── Utility classes ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.lead { font-size: 1.2rem; line-height: 1.6; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

.row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.col-md-4 { flex: 1 1 260px; }
.col-md-6 { flex: 1 1 45%; }
.col-md-12 { flex: 1 1 100%; }

.g-4 { gap: 2rem; }
