/* =====================================================================
   GDC COMMUNITY  |  Appearance > Customize > Additional CSS  |  THE FRAME (rarely changes)
   =====================================================================
   Replace EVERYTHING in the Additional CSS box with this file.

   Contains the parts that stay the same for a long time:
     1) Fonts, colors, spacing, page background
     2) Header, menus and the icon strip
     3) The news article page
     4) The footer

   Things you are likely to change (news cards, hidden items, embed card)
   are separate WPCode snippets, so they can be switched on and off.
   ===================================================================== */

/* =========================================================
   1) FOUNDATION: fonts, colors, spacing, page background
   ========================================================= */

/* H1 font: Optimus Princeps (never force caps in usage) */
@font-face{
  font-family: "Optimus Princeps";
  src:
    local("Optimus Princeps"),
    local("OptimusPrinceps"),
    url("/wp-content/uploads/fonts/Optimus%20Princeps.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
h1,
h1.wp-block-heading,
.entry-content h1{
  font-family: "Optimus Princeps", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .01em;
}

/* H2 font: Wrong Time Wrong Place */
@font-face{
  font-family: "Wrong Time Wrong Place";
  src:
    local("Wrong Time Wrong Place Regular"),
    local("Wrong Time Wrong Place"),
    url("/wp-content/uploads/fonts/Wrong%20time%2C%20wrong%20place.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
h2, h2.wp-block-heading, .entry-content h2{
  font-family: "Wrong Time Wrong Place", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .01em;
}

/* Shared values */
:root{
  /* page background */
  --gc-bg: #111111;

  /* layout + brand */
  --gc-gutter: clamp(16px, 4vw, 48px);
  --gc-accent: #d8322b;   /* red: only for the important things (hover on menus, links, buttons, glow) */
  --gc-bone: #ece4d3;     /* bone white: text and light details */
  --gc-logo: 110px;
  --gc-header-pad: 10px;

  /* side margins ("rails") and gaps between cards.
     Same 200px as before on a 1920px screen, smaller on narrower screens */
  --rail: clamp(16px, 10.4vw, 200px);
  --gap:  clamp(12px, 2vw, 20px);

  /* card look (news cards, figures, embeds) */
  --card-bg: rgba(15,15,15,.40);
  --card-bdr: rgba(255,255,255,.18);
  --card-radius: 12px;

  /* footer colors */
  --gdc-bg: var(--gc-bg);
  --gdc-fg: #e8e6de;
  --gdc-line: #2a2826;
}

/* News posts use narrower side margins, so the article is wider */
body.single-post{
  --rail: clamp(24px, 3vw, 56px);
  --gap:  clamp(12px, 1.8vw, 18px);
}

/* Paint the whole canvas dark (not pure black) */
html, body, .wp-site-blocks{ background: var(--gc-bg) !important; }

html, body{ margin: 0; } /* seam avoidance baseline */

/* =========================================================
   2) HEADER AND MENUS
   ========================================================= */

/* Header values */
:root{
  /* top utility bar */
  --util-h: 34px;
  --util-bg: #222;
  --util-fg: #eaeaea;
  --util-div: rgba(255,255,255,.25);

  /* icon strip */
  --subnav-h: 56px;
  --subnav-icon: 40px;
  --subnav-pad-x: 8px;
  --subnav-bg: #fff;
  --subnav-border: #eaeaea;
  --subnav-hover: rgba(0,0,0,.04);
  --subnav-text: #111;
}

/* Hide default theme header if the hook renders it */
.site-header{ display: none; }

/* =========================================================
   A) UTILITY BAR (not sticky on homepage)
   ========================================================= */

.gc-utility.alignfull{
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw; max-width: 100vw;
  background: var(--util-bg); color: var(--util-fg);
  font-size: 16px; line-height: 1;
  position: static !important; top: auto !important; z-index: auto !important;
}
.gc-utility .alignwide{ padding-inline: var(--gc-gutter); }
.gc-utility__inner{
  min-height: var(--util-h);
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px;
}
.gc-utility__brand img{ display: block; max-height: 80px; width: auto; }
.gc-utility__list{
  margin: 0; padding: 0; list-style: none;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gc-utility__list li + li{ border-left: 1px solid var(--util-div); padding-left: 12px; }
.gc-utility__list a{ color: var(--util-fg); text-decoration: none; opacity: .9; }
.gc-utility__list a:hover{ opacity: 1; text-decoration: underline; }


/* =========================================================
   B) HEADER (sticky, centered logo; search left; menus right)
   ========================================================= */

.gc-header{
  position: sticky !important;
  top: 0 !important;  /* always flush to top */
  z-index: 50;
  background: #ececec;
  padding-block: var(--gc-header-pad);
  margin-bottom: 0 !important;
  border-bottom: 0 !important;
}
.gc-header.alignfull{
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  width: 100vw; max-width: 100vw;
}
.gc-header .alignwide{ padding-inline: var(--gc-gutter); }

/* Header bar as grid (anchors mega panel) */
.gc-headerBar{
  position: relative; overflow: visible;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 70px;
}
.gc-header__left, .gc-header__center, .gc-header__right{
  position: static !important; transform: none !important;
}
.gc-header__left{ justify-self: start; display:flex; align-items:center; gap:14px; }
.gc-header__center{ justify-self: center; display:flex; align-items:center; }
.gc-header__right{ justify-self: end; display:flex; align-items:center; gap:24px; }
.gc-header__logo img{ height: var(--gc-logo); width: auto; display:block; }

/* Search (custom form) */
.gc-search{ display:flex; align-items:center; gap:6px; }
.gc-search .search-field{
  width: min(360px, 100%); background:#ececec; color:#111;
  border:1px solid #d9d9d9; border-radius:6px; padding:.55rem .75rem;
}
.gc-search .search-field:focus{ outline:2px solid var(--gc-accent); border-color:var(--gc-accent); }
.gc-search .search-submit{
  background:#ececec; border:0; border-radius:6px;
  padding:.5rem .6rem; line-height:1; display:inline-flex; align-items:center; justify-content:center;
}


/* =========================================================
   C) MEGA MENU (full-bleed under header)
   ========================================================= */

.gc-mega{ display:flex; align-items:center; gap:24px; }
.gc-mega__item{ position: static; }
.gc-mega__toggle{
  display:inline-block; padding:8px 4px;
  text-decoration:none; color:#111; font-weight:600; letter-spacing:.02em;
}
.gc-mega__toggle:hover{ color: var(--gc-accent); }

.gc-mega__panel{
  position:absolute; top:100%;
  left: calc(-1 * (50vw - 50%));
  right: calc(-1 * (50vw - 50%));
  width:auto; max-width:none; margin:0;
  background:#f7f7f7; border-top:1px solid #e6e6e6; border-radius:0; box-shadow:none;
  padding:28px 0; z-index:70;
  display:none; opacity:0; pointer-events:none; transition:opacity .15s ease;
}
.gc-mega__panel::before{ content:""; position:absolute; top:-10px; left:0; right:0; height:10px; }
.gc-mega__item:hover .gc-mega__panel,
.gc-mega__item:focus-within .gc-mega__panel,
.gc-mega__item.is-open .gc-mega__panel{
  display:block; opacity:1; pointer-events:auto;
}

.gc-mega__grid{
  max-width:1280px; margin:0 auto; padding:0 var(--gc-gutter);
  display:grid; grid-template-columns:1.15fr 1fr 1fr;
  column-gap:40px; row-gap:18px;
}
.gc-mega__col + .gc-mega__col{ border-left:1px solid #e6e6e6; padding-left:32px; }
.gc-mega__col h4{
  margin:0 0 14px; font-size:14px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}
.gc-mega__col ul{ margin:0; padding:0; list-style:none; }
.gc-mega__col li + li{ margin-top:12px; }


/* =========================================================
   D) SUBNAV ICON STRIP + BLENDING
   ========================================================= */

.gc-subnav.alignfull{
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  width:100vw; max-width:100vw; background:#ececec;
  border-top:1px solid var(--subnav-border); border-bottom:1px solid var(--subnav-border);
  isolation:isolate; /* ensures mix-blend-mode behaves */
}
.gc-subnav .alignwide{ padding-inline: clamp(12px,3vw,28px); padding-block: 0; }
.gc-subnav__list{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:repeat(auto-fit, minmax(90px,1fr));
  align-items:center; height: var(--subnav-h);
  overflow: visible;
}
.gc-subnav__label{ display:none !important; }
.gc-subnav__link{
  display:flex; align-items:center; justify-content:center;
  height:100%; padding:0 var(--subnav-pad-x); color:var(--subnav-text);
  text-decoration:none; line-height:1; background: transparent !important;
}
.gc-subnav__link:hover,
.gc-subnav__link:focus{ background: transparent !important; box-shadow: none !important; }

/* Icons: multiply so white bg disappears over dark */
.gc-subnav__link img, .gc-subnav__link svg{
  height:min(var(--subnav-icon), calc(var(--subnav-h) - 10px));
  width:auto; display:block; object-fit:contain;
  mix-blend-mode: multiply;
  transition: transform .18s ease, filter .18s ease;
}
.gc-subnav__link:hover img,
.gc-subnav__link:focus-visible img,
.gc-subnav__link:hover svg,
.gc-subnav__link:focus-visible svg{
  transform: scale(1.06);
  filter: contrast(1.04);
}

/* Mega menu link styling (no blue/white, no underline) */
.gc-header .gc-mega__panel a,
.gc-header .gc-mega__panel a:visited{
  color: #2a2a2a !important;        /* neutral dark grey */
  text-decoration: none !important;  /* kill underline */
}

/* Hover/active/focus: use your accent, still no underline */
.gc-header .gc-mega__panel a:hover,
.gc-header .gc-mega__panel a:active,
.gc-header .gc-mega__panel a:focus-visible{
  color: var(--gc-accent, #d8322b) !important;
  text-decoration: none !important;
  outline: none;                     /* remove default blue outline */
}

/* Optional: accessible focus ring without underline */
.gc-header .gc-mega__panel a:focus-visible{
  box-shadow: 0 0 0 2px rgba(216, 50, 43, .55);
  border-radius: 4px;
}

/* =========================================================
   3) NEWS ARTICLE PAGE
   ========================================================= */

/* =========================================================
   ARTICLE / BODY (post layout utilities)
   ========================================================= */

.gdc-article, .gdc-body{
  --sand: #d9d3c4;
  --bone: #eee9de;
  --char: #111111;
  --char-2:#0b0b0b;
  --bdr:  rgba(255,255,255,.18);

  color: var(--bone);
  background: var(--char);
}
.has-gdc-char-background-color{ background-color: var(--char) !important; } /* token for Cover */

.gdc-article .wp-block-cover__inner-container{
  max-width: 1360px;
  padding: 28px var(--rail) 22px;
}
.gdc-body{
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--rail) 52px;
}

.gdc-body p, .gdc-body li{ color: var(--bone); }
.gdc-article h1{ text-transform: none; margin: .25rem 0 1rem; color: var(--bone); }
.gdc-body h2{ margin: 2rem 0 1rem; color: var(--bone); }
.gdc-dek{ font-size: clamp(18px,1.6vw,20px); opacity:.95; }

.gdc-meta{ gap:10px; }
.gdc-meta__dot{ opacity:.6; margin:0; }
.gdc-tag{
  margin:0; padding:2px 10px;
  border:1px solid var(--bdr); border-radius:999px;
  background: rgba(255,255,255,.04);
}

.gdc-columns{ gap: var(--gap); }
.gdc-tight{ gap: clamp(10px,1.5vw,14px) !important; }

/* Stack-built figure/card */
.gdc-figure{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  padding: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gdc-figure:hover{ border-color:rgba(236,228,211,.75); box-shadow:0 10px 30px rgba(0,0,0,.35); }
.gdc-figure img{ width:100%; height:auto; display:block; border-radius:8px; }
.gdc-caption{ margin:.5rem 0 0; font-size:.9rem; color:#cfc9bf; }

.gdc-pullquote{ margin: 2rem 0; padding-left:1rem; border-left:3px solid var(--sand); }
.gdc-pullquote p{ color: var(--bone); font-size: clamp(18px,1.5vw,22px); }

.gdc-callout{
  background: rgba(255,255,255,.04);
  border:1px solid var(--bdr);
  border-radius:12px;
  padding: 1rem 1.25rem;
}
.gdc-checks{ padding-left:1.2rem; }
.gdc-checks li{ margin:.4rem 0; }

/* Links inside article body */
.gdc-body a{ color: var(--bone); text-decoration:none; border-bottom:1px solid var(--sand); }
.gdc-body a:hover{ color:#fff; border-color:var(--gc-accent); }

/* CTA buttons */
.gdc-ctas{ gap:12px; margin-top: 1rem; }
.gdc-btn .wp-block-button__link{
  background: var(--sand); color:#111; border:1px solid var(--sand);
  border-radius: 10px; padding:.7rem 1rem;
}
.gdc-btn .wp-block-button__link:hover{ filter:brightness(1.05); }
.gdc-btn--ghost .wp-block-button__link{
  background: transparent; color: var(--sand); border-color: var(--sand);
}
.gdc-btn--ghost .wp-block-button__link:hover{ color:#fff; border-color:var(--gc-accent); }

.gdc-row{ gap: 10px; } /* flex rows spacing */

/* Single news post layout: flush hero, hero text, links */
/* Remove any top gaps so Cover touches the header */
.single-post .site-main,
.single-post .content-area,
.single-post .inside-article,
.single-post .entry-content{
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.single-post .is-layout-flow > *:first-child,
.single-post .wp-block-post-content > *:first-child,
.single-post .entry-content > *:first-child{ margin-top: 0 !important; }
.single-post .entry-content > .wp-block-cover.alignfull:first-child{ margin-top: 0 !important; }

/* Post hero layout (title bottom-left; compact meta) */
.post-hero .wp-block-cover__inner-container{
  display:flex; flex-direction:column;
  justify-content:flex-end; align-items:flex-start;
  row-gap: 0;
}
.post-hero .wp-block-post-title{
  margin: 0 0 6px !important; line-height: 1.1;
}
.post-hero__meta{
  margin: 0 !important;
  column-gap: 6px; row-gap: 0;
  align-items: baseline; flex-wrap: nowrap;
}
.post-hero__meta .wp-block-post-date,
.post-hero__meta .wp-block-post-terms{
  font-size: 14px; color: #dcd7c0; opacity: .95;
}
.post-hero__meta .wp-block-post-terms .wp-block-post-terms__separator{
  margin: 0 .35em;
}

/* Single-post links: white + underline on hover, use H1 font */
.single-post .entry-content a,
.single-post .wp-block-post-content a,
.single-post .post-hero__meta .wp-block-post-terms a,
.single-post .wp-block-post-terms a{
  color:#fff; text-decoration:none;
  text-underline-offset: 2px; -webkit-text-decoration-skip-ink:auto; text-decoration-skip-ink:auto;
  font-family: "Optimus Princeps", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-transform: none; letter-spacing: .01em;
}
.single-post .entry-content a:hover,
.single-post .entry-content a:focus-visible,
.single-post .wp-block-post-content a:hover,
.single-post .wp-block-post-content a:focus-visible,
.single-post .post-hero__meta .wp-block-post-terms a:hover,
.single-post .post-hero__meta .wp-block-post-terms a:focus-visible,
.single-post .wp-block-post-terms a:hover,
.single-post .wp-block-post-terms a:focus-visible{
  color:#fff; text-decoration: underline; text-decoration-thickness:.08em;
}

/* Buttons shouldn’t get underlines */
.single-post .wp-block-button__link,
.single-post a[class*="button"],
.single-post a.wp-element-button{ text-decoration: none !important; }

/* =========================================================
   4) FOOTER
   ========================================================= */

/* =========================================================
   FOOTER (dark + rails)
   ========================================================= */


footer,
.site-footer,
.wp-block-template-part[id*="footer"],
.wp-block-template-part[name*="footer"] {
  background: var(--gdc-bg) !important;
  color: var(--gdc-fg);
  border-top: 0 !important;
  box-shadow: none !important;
}
footer .wp-block-group,
footer .wp-block-columns,
footer .wp-block-column,
footer .is-layout-constrained { background: transparent !important; }

footer .alignwide,
footer .wp-block-group.is-layout-constrained {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--rail);
}
footer a { color: var(--gdc-fg); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer h1, footer h2, footer h3, footer .wp-block-heading { color: var(--gdc-fg); }
footer hr, footer .wp-block-separator {
  border-color: var(--gdc-line); background: var(--gdc-line); color: var(--gdc-line); opacity: .4;
}
footer .wp-block-social-links .wp-block-social-link a { color: var(--gdc-fg); }

/* Sub-pixel hairline prevention */
.wp-site-blocks, footer{ transform: translateZ(0); }