/*
Theme Name: Lenny Peters Foundation
Author: Forcefield Web Development
Author URI: https://forcefieldnc.com
Version: 1.0
Description: Custom theme for the Lenny Peters Foundation, built on Forcefield Stratum.
*/

/* ── Fonts ── */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

/* ── Tokens ── */
:root {
    --navy: #143754;
    --blue: #296195;
    --sky: #84bee6;
    --accent: #00adef;
    --grey: #f1f3f4;
    --ink: #2b3a48;
    --white: #fff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --header-h: 104px;
    --radius: 14px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }

/* ── Base ── */
html {
    overscroll-behavior-y: none;
    background: #000;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--blue);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.125rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

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

.ff-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Buttons & links ── */
.ff-btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ff-btn-primary { background: var(--blue); color: #fff; }
.ff-btn-primary:hover { background: var(--navy); }

.lpf-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    transition: gap 0.2s;
}
.lpf-more svg { width: 26px; height: 12px; flex: none; }
.lpf-more:hover { gap: 12px; }
.lpf-more--light { color: #fff; }

/* ── Reveal on scroll ──
   Only hidden when JS is running (html.js), so content never disappears
   without it. Opacity + transform only: no layout shift. */
html.js .ff-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.js .ff-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html.js .ff-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Skip link / a11y ── */
.ff-skip-link,
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal;
}
.ff-skip-link:focus {
    clip: auto;
    display: block;
    height: auto;
    width: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100000;
    padding: 15px 23px;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #000;
    color: #fff;
}
.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 22px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.25s ease;
}
.site-header.is-scrolled .header-container { padding-top: 10px; padding-bottom: 10px; }

.logo-wrap { display: block; line-height: 0; }
.logo-wrap img {
    width: auto;
    height: 60px;
    transition: height 0.25s ease;
}
.site-header.is-scrolled .logo-wrap img { height: 44px; }

.nav-right { display: flex; align-items: center; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}
.main-nav li { position: relative; }
.main-nav a {
    display: block;
    padding: 8px 0;
    font-size: 0.9375rem;
    text-decoration: none;
    color: #fff;
    transition: color 0.2s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a { color: var(--sky); }

.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: -20px;
    min-width: 240px;
    padding: 10px 0;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .sub-menu a { padding: 8px 20px; font-size: 0.875rem; white-space: nowrap; }

/* Hamburger */
.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: transform 0.25s, opacity 0.25s;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    padding: 80px 32px 40px;
    background: #000;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1100;
}
.mobile-drawer.is-open { transform: translateX(0); }
.drawer-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}
.drawer-nav a {
    display: block;
    padding: 12px 0;
    font-size: 1.125rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.drawer-nav .sub-menu a {
    padding-left: 18px;
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1050;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

/* Logged-in admin bar sits above the sticky header */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ── Generic page ── */
.page-banner {
    background: var(--blue);
    color: #fff;
    padding: 56px 0;
}
.page-banner h1 { color: #fff; font-size: 2.5rem; }
.page-banner .entry-meta { margin-top: 10px; font-size: 0.875rem; opacity: 0.85; }

.entry-content {
    max-width: 860px;
    padding: 56px 0 80px;
}
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 { margin-top: 1.75em; font-size: 1.75rem; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content a { color: var(--blue); }
.entry-content a:hover { color: var(--accent); }
.entry-content blockquote {
    padding: 8px 0 8px 24px;
    border-left: 4px solid var(--sky);
    color: var(--blue);
    font-size: 1.125rem;
}
.entry-content img { border-radius: 8px; }
/* Imported posts carry fixed-size video embeds (1200x675 iframes) */
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
}
.entry-content figure, .entry-content table { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { padding: 8px 12px; border-bottom: 1px solid #dde3e8; text-align: left; }
.entry-content .wp-video, .entry-content .wp-video-shortcode { max-width: 100% !important; }
.entry-content .alignleft { float: left; margin: 0 28px 20px 0; }
.entry-content .alignright { float: right; margin: 0 0 20px 28px; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

/* ── Footer ── */
.site-footer {
    background: var(--navy);
    color: #fff;
    padding: 48px 0 32px;
    font-size: 0.875rem;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}
.footer-address { line-height: 1.7; }
.footer-address a { text-decoration: none; }
.footer-address a:hover { color: var(--sky); }
.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 18px;
}
.footer-social a {
    display: block;
    width: 22px;
    height: 22px;
    color: #fff;
    transition: color 0.2s;
}
.footer-social a:hover { color: var(--sky); }
.footer-social svg { width: 100%; height: 100%; display: block; }
.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 36px;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--sky); }
.footer-nav .sub-menu { display: none; }
.footer-logo { margin: 32px auto 0; width: fit-content; }
.footer-logo img { height: 56px; width: auto; }
.footer-copy {
    margin-top: 36px;
    text-align: center;
    font-size: 0.8125rem;
}
.footer-credit {
    margin-top: 8px;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.6;
}
.footer-credit a { text-decoration: none; }

/* ── 404 ── */
.error-404 { padding: 80px 0; text-align: center; max-width: 600px; margin: 0 auto; }
.error-404 h1 { margin-bottom: 16px; }
.error-404 p { margin-bottom: 28px; }
.error-404 .search-form { margin-top: 32px; display: flex; gap: 8px; justify-content: center; }
.error-404 .search-form input[type="search"] { padding: 10px 14px; border: 1px solid #ccd; border-radius: 6px; width: 260px; }
.error-404 .search-form input[type="submit"] { padding: 10px 18px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; cursor: pointer; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .ff-container, .header-container { padding-left: 28px; padding-right: 28px; }
    .main-nav { gap: 26px; }
}

@media (max-width: 768px) {
    :root { --header-h: 76px; }
    h1 { font-size: 2.125rem; }
    h2 { font-size: 1.75rem; }
    .ff-container, .header-container { padding-left: 20px; padding-right: 20px; }
    .header-container { padding-top: 14px; padding-bottom: 14px; }
    .logo-wrap img { height: 48px; }
    #site-navigation { display: none; }
    .hamburger { display: flex; }
    .page-banner { padding: 40px 0; }
    .page-banner h1 { font-size: 1.875rem; }
    .entry-content { padding: 36px 0 56px; }
    .footer-top { flex-direction: column; gap: 28px; }
    .footer-nav ul { gap: 6px 24px; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .logo-wrap img { height: 42px; }
    .entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 20px; }
}
