/* ============================================================
   WordPress core classes + theme additions for the OPF theme.
   Loaded immediately after style.css on every page.
   ============================================================ */

/* `--head` is referenced by the converted markup but was never declared
   in the source :root block. Alias it to the heading font stack. */
:root{--head:var(--font-head)}

/* ---------- Accessibility ---------- */
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}
.screen-reader-text:focus{background:#fff;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto;clip-path:none;color:var(--green-2);display:block;font-size:.9rem;font-weight:700;height:auto;left:6px;line-height:normal;padding:14px 22px;text-decoration:none;top:6px;width:auto;z-index:100000}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:3px;border-radius:6px}

/* ---------- Navigation (menu output is a <ul>, the source used bare <a>) ---------- */
nav.links ul{display:contents;list-style:none}
nav.links li{list-style:none}
nav.links.is-open{display:flex;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;padding:10px 24px 20px;background:rgba(11,29,19,.98);border-bottom:1px solid rgba(255,255,255,.1);backdrop-filter:blur(16px)}
nav.links.is-open ul{display:flex;flex-direction:column}
nav.links.is-open a{padding:13px 0;border-bottom:1px solid rgba(255,255,255,.07)}
nav.links.is-open a::after{display:none}
.menu-toggle[aria-expanded="true"]{color:var(--lime)}
nav.links a.current-menu-item-link,nav.links li.current-menu-item>a{color:#fff}
nav.links li.current-menu-item>a::after{width:100%}

/* ---------- WordPress alignment + caption classes ---------- */
.alignleft{float:left;margin:.4em 1.6em 1em 0}
.alignright{float:right;margin:.4em 0 1em 1.6em}
.aligncenter{clear:both;margin-left:auto;margin-right:auto}
.alignwide{margin-left:-60px;margin-right:-60px;max-width:none;width:auto}
.alignfull{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);max-width:100vw;width:100vw}
.wp-caption{max-width:100%}
.wp-caption img{margin:0 auto}
.wp-caption-text,.wp-element-caption{font-size:.85rem;color:var(--muted);text-align:center;padding:10px 4px}
.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:26px 0}
.gallery-item img{border-radius:12px}
.sticky .entry-title::after{content:" *";color:var(--olive)}
.bypostauthor{display:block}
@media(max-width:980px){.alignwide{margin-left:0;margin-right:0}}

/* ---------- Editor content typography ---------- */
.entry-content>*+*{margin-top:22px}
.entry-content h2{font-size:1.6rem;margin:42px 0 4px}
.entry-content h3{font-size:1.25rem;margin:32px 0 4px}
.entry-content h4{font-size:1.06rem;margin:26px 0 4px}
.entry-content ul,.entry-content ol{padding-left:24px}
.entry-content li{margin-bottom:8px}
.entry-content img,.entry-content figure img{border-radius:14px}
.entry-content blockquote{border-left:4px solid var(--green);background:var(--surface-2);border-radius:0 14px 14px 0;padding:20px 24px;font-family:var(--font-head);font-size:1.1rem}
.entry-content blockquote p+p{margin-top:14px}
.entry-content table{width:100%;border-collapse:collapse;font-size:.94rem}
.entry-content th,.entry-content td{border:1px solid var(--line);padding:10px 14px;text-align:left}
.entry-content th{background:var(--surface-2);font-family:var(--font-head)}
.entry-content pre{background:#0b1d13;color:#dfeae4;padding:18px 20px;border-radius:14px;overflow-x:auto;font-size:.9rem}
.entry-content code{background:var(--surface-2);border:1px solid var(--line);border-radius:6px;padding:2px 6px;font-size:.9em}
.entry-content pre code{background:none;border:0;padding:0}
.entry-content a:not(.btn){color:var(--green-2);text-decoration:underline;text-underline-offset:3px}
.entry-content a:not(.btn):hover{color:var(--olive)}

/* ---------- Generic page header (page.php / archive.php / search.php / 404.php) ---------- */
.page-hero{background:linear-gradient(160deg,#0d2715,#17491f);color:#fff;padding:66px 0 58px}
.page-hero h1{font-size:clamp(1.9rem,4vw,3rem);margin-bottom:12px}
.page-hero p{color:#a9c3b1;max-width:70ch}
.page-hero .eyebrow{color:var(--lime)}
.page-hero .eyebrow::before{background:var(--lime)}
.page-hero .crumb{font-size:.86rem;color:#cfe0d8;margin-bottom:14px}
.page-hero .crumb a:hover{color:var(--lime)}
.page-body{max-width:820px;margin:0 auto;padding:56px 24px 76px}
.page-body.wide{max-width:var(--max)}
.post-thumb{border-radius:22px;overflow:hidden;border:1px solid var(--line);box-shadow:0 26px 56px var(--shadow-lg);margin-bottom:34px}
.post-thumb img{width:100%;height:clamp(220px,36vw,440px);object-fit:cover}

/* ---------- Post / archive cards ---------- */
.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:26px}
.pcard-post{background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;display:flex;flex-direction:column;transition:transform .25s,box-shadow .25s,border-color .25s}
.pcard-post:hover{transform:translateY(-6px);border-color:rgba(42,157,71,.4);box-shadow:0 20px 44px var(--shadow)}
.pcard-post .thumb-img{height:190px;overflow:hidden;background:var(--surface-2)}
.pcard-post .thumb-img img{width:100%;height:100%;object-fit:cover;transition:transform .6s}
.pcard-post:hover .thumb-img img{transform:scale(1.06)}
.pcard-post .body{padding:22px 24px 26px;display:flex;flex-direction:column;gap:10px;flex:1}
.pcard-post .date{font-size:.8rem;color:var(--muted);letter-spacing:.04em}
.pcard-post h2,.pcard-post h3{font-size:1.1rem;line-height:1.3}
.pcard-post p{font-size:.94rem;color:var(--muted)}
.pcard-post .more{margin-top:auto;font-family:var(--font-head);font-weight:700;font-size:.86rem;color:var(--green-2)}

/* ---------- Pagination, post navigation, comments, search ---------- */
.pagination{margin-top:46px}
.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pagination .page-numbers{display:grid;place-items:center;min-width:42px;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);font-family:var(--font-head);font-weight:600;font-size:.9rem;transition:.2s}
.pagination .page-numbers:hover{border-color:var(--green)}
.pagination .page-numbers.current{background:var(--accent-grad);color:#04140c;border-color:transparent}
.post-nav{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;max-width:760px;margin:0 auto;padding:0 24px 40px}
.post-nav a{font-family:var(--font-head);font-weight:600;font-size:.92rem;color:var(--green-2)}
.comments-area{max-width:760px;margin:0 auto;padding:10px 24px 70px}
.comments-area h2,.comments-area h3{font-size:1.35rem;margin-bottom:20px}
.comment-list{list-style:none;display:flex;flex-direction:column;gap:18px;margin-bottom:34px}
.comment-list ol.children{list-style:none;padding-left:26px;margin-top:18px;display:flex;flex-direction:column;gap:18px}
.comment-body{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:20px 22px}
.comment-meta{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:.86rem;color:var(--muted)}
.comment-author img{border-radius:50%}
.comment-form input[type=text],.comment-form input[type=email],.comment-form input[type=url],.comment-form textarea,.search-form input[type=search]{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 16px;font:inherit;font-size:.96rem;color:var(--text)}
.comment-form p{margin-bottom:16px}
.comment-form label{display:block;font-size:.86rem;font-weight:600;margin-bottom:6px}
.comment-form .submit{border:0;cursor:pointer;display:inline-flex;align-items:center;padding:12px 22px;border-radius:12px;font-family:var(--font-head);font-weight:700;font-size:.92rem;background:var(--accent-grad);color:#04140c;box-shadow:0 8px 22px rgba(42,157,71,.28)}
.search-form{display:flex;gap:10px;max-width:520px}
.search-form .btn{flex:0 0 auto;border:0;cursor:pointer}

/* ---------- 404 ---------- */
.nf{text-align:center;padding:90px 24px 110px}
.nf .code{font-family:var(--font-head);font-weight:800;font-size:clamp(4rem,14vw,9rem);line-height:1;background:var(--accent-grad-2);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.nf p{color:var(--muted);max-width:52ch;margin:14px auto 28px}

/* ---------- Admin bar offset for the sticky header ---------- */
.admin-bar header.nav{top:32px}
@media(max-width:782px){.admin-bar header.nav{top:46px}}

/* ---------- Reduced motion ----------
   Scoped deliberately. The reveal-on-scroll transitions are switched off so
   content appears immediately rather than sliding in - that helps and costs
   nothing. The brand animations (marquee, hero float, slow zoom, orbit rings)
   ARE the design, so they keep running.

   A blanket `*{animation-duration:.001ms!important}` here would silently
   freeze the marquee and every other motion on the site for anyone whose OS
   has "reduce motion" turned on, which is a much bigger change than it looks.

   If you later want strict WCAG 2.2.2 behaviour (stop all auto-playing
   motion), uncomment the block marked STRICT below. */
@media (prefers-reduced-motion: reduce) {
  html{scroll-behavior:auto}
  .reveal,.jreveal{opacity:1 !important;transform:none !important;transition:none !important}

  /* STRICT - uncomment to stop every animation as well:
  .marquee-track,.hero-bg img,.hv-img,.hv-badge,.oring,.figure .fbadge,.donut{
    animation:none !important
  }
  */
}
