/* ═══════════════════════════════════════════════
   OCF Base 3 — Global Design System
   ═══════════════════════════════════════════════
   Plugin injects semantic design tokens as CSS vars:
     --ocf-heading, --ocf-body, --ocf-accent, etc.
   Everything below references those directly.
   ═══════════════════════════════════════════════ */


/* ─── NON-TOKEN GLOBALS ─── */
:root {
    /* Fluid Type Scale (clamp: min, preferred, max) */
    --text-xs:   clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
    --text-sm:   clamp(0.8125rem, 0.775rem + 0.2vw, 0.9375rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
    --text-xl:   clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl:  clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --text-3xl:  clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
    --text-4xl:  clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-hero: clamp(2.25rem, 1.3rem + 3.25vw, 3.5rem);

    /* Border Radius */
    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   16px;
    --radius-full: 9999px;

    /* Shadows (tinted with heading color) */
    --shadow-sm:  0 1px 3px  color-mix(in srgb, var(--ocf-heading) 5%, transparent);
    --shadow:     0 4px 16px color-mix(in srgb, var(--ocf-heading) 8%, transparent);
    --shadow-lg:  0 12px 40px color-mix(in srgb, var(--ocf-heading) 12%, transparent);

    /* Preset style hooks */
    --button-radius: var(--radius);
    --button-border-width: 0;
    --button-border-color: transparent;
    --button-shadow: none;
    --button-shadow-hover: none;
    --button-transform-hover: translateY(0);
    --button-letter-spacing: 0.15em;
    --button-text-transform: uppercase;

    --card-radius: var(--radius);
    --card-radius-lg: var(--radius-lg);
    --card-border-width: 1px;
    --card-border-color: color-mix(in srgb, var(--ocf-border-light) 30%, transparent);
    --card-border-color-subtle: color-mix(in srgb, var(--ocf-border-light) 6%, transparent);
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-lg);
    --card-transform-hover: translateY(-2px);

    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.3s;
    --duration-slow: 0.5s;
}


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

/* ─── Base ─── */
html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 6rem;
}

body {
    font-family: var(--ocf-font-body), system-ui, sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--ocf-body);
    background-color: var(--ocf-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 5rem;
}

@media (min-width: 1024px) {
    body { padding-top: 6rem; }
}

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

body.admin-bar {
    margin-top: 0 !important;
}

::selection {
    background-color: var(--ocf-accent-hover);
    color: var(--ocf-bg);
}

a {
    color: inherit;
    text-decoration: none;
}


/* ═══════════════════════════════════════════════
   GLOBAL LAYOUT
   ═══════════════════════════════════════════════ */

.container-global {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 640px) {
    .container-global { padding-left: 2rem; padding-right: 2rem; }
}

@media (min-width: 1024px) {
    .container-global { padding-left: 3rem; padding-right: 3rem; }
}

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 640px) {
    .section-padding { padding-top: 5rem; padding-bottom: 5rem; }
}

@media (min-width: 1024px) {
    .section-padding { padding-top: 6rem; padding-bottom: 6rem; }
}

.section-padding .section-padding { padding-top: 0; padding-bottom: 0; }
.section-padding .container-global .container-global { padding-left: 0; padding-right: 0; }

.page-section--default { background: var(--ocf-bg); }
.page-section--alt { background: var(--ocf-bg-alt); }

.page-content-narrow {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.page-featured-media {
    margin-bottom: 3rem;
}

.page-featured-media img,
.page-featured-media .wp-post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.page-content-body {
    margin-bottom: 4rem;
}

.not-found-panel {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.not-found-text {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}


/* ═══════════════════════════════════════════════
   GLOBAL TYPOGRAPHY
   ═══════════════════════════════════════════════ */

.eyebrow {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--ocf-label);
    margin-bottom: 0.75rem;
}

.heading-section {
    font-family: var(--ocf-font-heading), Georgia, serif;
    font-weight: 600;
    color: var(--ocf-heading);
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.heading-section.size-lg { font-size: var(--text-3xl); }
h2.heading-section.size-lg { font-size: clamp(1.625rem, 1.2rem + 1.65vw, 2.25rem); }
.heading-section.size-xl { font-size: var(--text-hero); }

.text-body {
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--ocf-body);
}

.text-label {
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ocf-label);
}

.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;
}


/* ═══════════════════════════════════════════════
   GLOBAL BUTTONS
   ═══════════════════════════════════════════════ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--ocf-accent);
    color: var(--ocf-bg);
    padding: 1rem 2rem;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: var(--button-text-transform);
    letter-spacing: var(--button-letter-spacing);
    text-decoration: none;
    border: var(--button-border-width) solid var(--button-border-color);
    border-radius: var(--button-radius);
    box-shadow: var(--button-shadow);
    transition: all var(--duration) ease;
}

.btn-primary:hover {
    background-color: var(--ocf-accent-hover);
    box-shadow: var(--button-shadow-hover);
    transform: var(--button-transform-hover);
}

.btn-primary svg,
.btn-primary i {
    width: 1rem;
    height: 1rem;
    transition: transform var(--duration) ease;
}

.btn-primary:hover svg,
.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ocf-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--ocf-secondary);
    padding-bottom: 2px;
    transition: all var(--duration) ease;
}

.btn-secondary:hover {
    color: var(--ocf-accent-hover);
    border-bottom-color: var(--ocf-accent-hover);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: color-mix(in srgb, var(--ocf-heading-alt) 10%, transparent);
    color: var(--ocf-bg);
    padding: 1rem 2rem;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: var(--button-text-transform);
    letter-spacing: var(--button-letter-spacing);
    text-decoration: none;
    border: 1px solid var(--ocf-border-alt);
    border-radius: var(--button-radius);
    box-shadow: var(--button-shadow);
    transition: all var(--duration) ease;
}

.btn-ghost:hover {
    background-color: color-mix(in srgb, var(--ocf-heading-alt) 15%, transparent);
    border-color: color-mix(in srgb, var(--ocf-heading-alt) 20%, transparent);
    box-shadow: var(--button-shadow-hover);
    transform: var(--button-transform-hover);
}


/* ═══════════════════════════════════════════════
   GLOBAL CARD
   ═══════════════════════════════════════════════ */

.card {
    background: var(--ocf-bg);
    border: var(--card-border-width) solid var(--card-border-color-subtle);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    transition: all var(--duration-slow) ease;
}

.card:hover {
    border-color: var(--ocf-border);
    box-shadow: var(--card-shadow-hover);
    transform: var(--card-transform-hover);
}

@media (min-width: 640px) { .card { padding: 2.5rem; } }
@media (min-width: 1024px) { .card { padding: 3rem; } }


/* ═══════════════════════════════════════════════
   GLOBAL DIVIDERS
   ═══════════════════════════════════════════════ */

.divider {
    width: 4rem;
    height: 1px;
    background-color: var(--ocf-divider);
}

.divider-light {
    width: 100%;
    height: 1px;
    background-color: color-mix(in srgb, var(--ocf-border-light) 6%, transparent);
}


/* ═══════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease),
                transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Kill reveal animation on first two sections after any hero/header */
.page-header + * .reveal,
.page-header + * .reveal.visible,
.page-header + * + * .reveal,
.page-header + * + * .reveal.visible,
.ocf-hero + * .reveal,
.ocf-hero + * .reveal.visible,
.ocf-hero + * + * .reveal,
.ocf-hero + * + * .reveal.visible,
.ocf-article-hero + * .reveal,
.ocf-article-hero + * .reveal.visible,
.ocf-article-hero + * + * .reveal,
.ocf-article-hero + * + * .reveal.visible,
.ocf-detail-hero + * .reveal,
.ocf-detail-hero + * .reveal.visible,
.ocf-detail-hero + * + * .reveal,
.ocf-detail-hero + * + * .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

@keyframes scroll-pulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
}


/* ═══════════════════════════════════════════════
   PROSE (for single post/service long-form content)
   ═══════════════════════════════════════════════ */

.prose {
    font-size: var(--text-base);
    line-height: 1.72;
    color: var(--ocf-body);
}

.prose h2, .prose h3, .prose h4 {
    font-family: var(--ocf-font-heading), Georgia, serif;
    color: var(--ocf-heading);
    font-weight: 600;
    line-height: 1.22;
    margin-top: 1.55em;
    margin-bottom: 0.55em;
}

.prose h2 { font-size: clamp(1.45rem, 1.15rem + 0.9vw, 1.9rem); }
.prose h3 { font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.45rem); }
.prose h4 { font-size: var(--text-lg); }

.prose p { margin-bottom: 1em; }

.prose ul, .prose ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose li { margin-bottom: 0.5em; }
.prose li p { margin: 0.35em 0 0; }

.prose a {
    color: var(--ocf-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover { color: var(--ocf-accent-hover); }

.prose img {
    border-radius: var(--radius);
    margin: 2em 0;
}

.prose blockquote {
    border-left: 3px solid var(--ocf-accent);
    padding-left: 1.5em;
    margin: 1.75em 0;
    font-style: italic;
    color: var(--ocf-heading);
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--ocf-border-light);
    margin: 1.9em 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: var(--text-sm);
}

.prose th,
.prose td {
    border: 1px solid var(--ocf-border-light);
    padding: 0.8rem 0.9rem;
    text-align: left;
    vertical-align: top;
}

.prose th {
    color: var(--ocf-heading);
    background: var(--ocf-bg-alt);
    font-weight: 600;
}

