/*
Theme Name: Gary J J Spate
Theme URI: https://garyjjspate.com
Author: Gary J J Spate
Description: A warm, friendly custom theme for garyjjspate.com — a big two-column hero, rounded card grids for the portfolio and each blog category (Film & Television, Writing, Theatre, Personal).
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gjs
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root{
  /* Warm cream surfaces */
  --gjs-cream:    #FAF3E8;
  --gjs-cream-2:  #F0E4CE;
  --gjs-white:    #FFFFFF;

  /* Text */
  --gjs-ink:      #2B2620;
  --gjs-ink-soft: #6B6155;

  /* Accents */
  --gjs-terracotta:  #E2632C;
  --gjs-terracotta-2:#C9501E;
  --gjs-teal:        #2F6B63;
  --gjs-teal-2:      #24544D;

  /* Poster-card background palette (cycles per card) */
  --gjs-card-a: #C9B7EC; /* lavender */
  --gjs-card-b: #F2DE4E; /* yellow */
  --gjs-card-c: #EC8B63; /* coral */
  --gjs-card-d: #9BC97C; /* green */

  /* Tag pill palette (cycles per tag) */
  --gjs-pill-pink:     #F14F93;
  --gjs-pill-lavender: #C7B6EE;
  --gjs-pill-red:      #E2472F;
  --gjs-pill-teal:     #33ACA0;
  --gjs-pill-dark:     #211C16;

  /* Type */
  --gjs-font-display: "Fredoka", sans-serif;
  --gjs-font-body: "Nunito", sans-serif;

  --gjs-radius: 20px;
  --gjs-radius-sm: 12px;
  --gjs-max: 1180px;
  --gjs-shadow: 0 14px 32px -12px rgba(43,38,32,.18);
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
body{
  margin:0;
  background:var(--gjs-cream);
  color:var(--gjs-ink);
  font-family:var(--gjs-font-body);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{ font-family:var(--gjs-font-display); font-weight:600; margin:0 0 .4em; line-height:1.15; }
p{ margin:0 0 1em; }
.gjs-container{ max-width:var(--gjs-max); margin:0 auto; padding:0 28px; }
:focus-visible{ outline:3px solid var(--gjs-terracotta); outline-offset:3px; }
button{ font-family:inherit; }
.screen-reader-text{ position:absolute !important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden; }

/* Reusable pill button */
.gjs-btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--gjs-font-display); font-weight:600; font-size:16px;
  background:var(--gjs-terracotta); color:var(--gjs-white);
  padding:14px 28px; border-radius:999px;
  box-shadow:var(--gjs-shadow);
  transition:transform .15s ease, background .15s ease;
}
.gjs-btn:hover, .gjs-btn:focus-visible{ background:var(--gjs-terracotta-2); transform:translateY(-2px); }

/* Small rotated "stamp" badge — the signature motif, reused in the hero and on every card */
.gjs-stamp{
  display:inline-block;
  font-family:var(--gjs-font-display); font-weight:600; font-size:12px; letter-spacing:.04em;
  background:var(--gjs-teal); color:var(--gjs-white);
  padding:6px 14px; border-radius:999px;
  transform:rotate(-4deg);
  box-shadow:0 6px 14px -6px rgba(47,107,99,.6);
}
.gjs-stamp--terracotta{ background:var(--gjs-terracotta); box-shadow:0 6px 14px -6px rgba(226,99,44,.6); }

/* =========================================================
   NAV
   ========================================================= */
.gjs-nav{
  background:var(--gjs-cream);
  border-bottom:2px solid var(--gjs-cream-2);
  position:sticky; top:0; z-index:20;
}
.gjs-nav__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 28px;
}
.gjs-nav__brand{
  font-family:var(--gjs-font-display); font-weight:600;
  font-size:22px; color:var(--gjs-ink);
}
.gjs-nav__brand span{ color:var(--gjs-terracotta); }
.gjs-nav__logo{ line-height:0; }
.gjs-nav__logo img{ max-height:48px; width:auto; }
.gjs-nav__logo a{ display:inline-block; }
.gjs-nav__menu{ list-style:none; display:flex; gap:8px; margin:0; padding:0; align-items:center; }
.gjs-nav__menu a{
  font-family:var(--gjs-font-display); font-weight:600; font-size:15px;
  color:var(--gjs-ink); padding:10px 18px; border-radius:999px;
  transition:background .15s ease, color .15s ease;
}
.gjs-nav__menu a:hover, .gjs-nav__menu a:focus-visible{ background:var(--gjs-cream-2); color:var(--gjs-terracotta-2); }
.gjs-nav__toggle{ display:none; background:none; border:2px solid var(--gjs-ink); color:var(--gjs-ink); padding:8px 14px; border-radius:999px; }

/* Dropdown sub-menus (bold, same type treatment as the rest of the nav) */
.gjs-nav__menu li{ position:relative; }
.gjs-nav__menu .menu-item-has-children > a{ padding-right:34px; }
.gjs-submenu-toggle{
  position:absolute; top:50%; right:6px; transform:translateY(-50%);
  background:none; border:0; padding:6px; cursor:pointer;
  color:var(--gjs-ink); line-height:0;
}
.gjs-submenu-toggle svg{ width:11px; height:11px; transition:transform .15s ease; display:block; }
.sub-menu{
  list-style:none; margin:0; padding:10px; margin-top:8px;
  position:absolute; top:100%; left:0; min-width:220px;
  background:var(--gjs-white); border-radius:var(--gjs-radius-sm);
  box-shadow:var(--gjs-shadow);
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s ease;
  z-index:30;
}
.sub-menu li{ width:100%; }
.sub-menu a{
  display:block; width:100%;
  font-family:var(--gjs-font-display); font-weight:600; font-size:15px;
  color:var(--gjs-ink); padding:10px 16px; border-radius:var(--gjs-radius-sm);
  white-space:nowrap;
}
.sub-menu a:hover, .sub-menu a:focus-visible{ background:var(--gjs-cream-2); color:var(--gjs-terracotta-2); }

@media (min-width:781px){
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu,
  .menu-item-has-children.is-open > .sub-menu{
    opacity:1; visibility:visible; transform:translateY(0);
  }
  .menu-item-has-children.is-open > .gjs-submenu-toggle svg{ transform:rotate(180deg); }
}

@media (max-width:780px){
  .gjs-nav__menu{ display:none; }
  .gjs-nav__toggle{ display:inline-block; }
  .gjs-nav.is-open .gjs-nav__menu{
    display:flex; flex-direction:column; gap:6px; align-items:stretch; text-align:center;
    position:absolute; top:100%; left:0; right:0;
    background:var(--gjs-cream); padding:16px 28px 24px;
    border-bottom:2px solid var(--gjs-cream-2);
  }
  .gjs-nav__menu .menu-item-has-children > a{ padding-right:44px; }
  .sub-menu{
    position:static; opacity:1; visibility:visible; transform:none;
    box-shadow:none; background:var(--gjs-cream-2);
    display:none; margin:6px 0 0;
  }
  .menu-item-has-children.is-open > .sub-menu{ display:block; }
  .menu-item-has-children.is-open > .gjs-submenu-toggle svg{ transform:rotate(180deg); }
}

/* =========================================================
   HERO — full-screen image, big stacked headline (Aardvark-style)
   ========================================================= */
.gjs-hero-full{
  position:relative;
  min-height:92vh;
  display:flex;
  align-items:flex-end;
  background-color:var(--gjs-ink);
  background-image:linear-gradient(135deg, var(--gjs-teal) 0%, var(--gjs-teal-2) 100%);
  background-size:cover;
  background-position:center;
  overflow:hidden;
}
.gjs-hero-full__overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,18,14,.05) 0%, rgba(20,18,14,.35) 55%, rgba(20,18,14,.8) 100%);
}
.gjs-hero-full__content{
  position:relative; z-index:1;
  padding:80px 28px 90px;
  width:100%;
}
.gjs-hero-full__title{
  font-family:var(--gjs-font-display); font-weight:700;
  text-transform:uppercase;
  color:var(--gjs-white);
  font-size:clamp(38px, 8.5vw, 110px);
  line-height:1.02;
  margin-bottom:36px;
  text-shadow:0 4px 24px rgba(0,0,0,.25);
}
.gjs-hero-full__title span{ display:block; }
.gjs-hero-full__hint{
  color:rgba(255,255,255,.75);
  font-size:14px; margin:16px 0 0;
}

@media (max-width:600px){
  .gjs-hero-full{ min-height:80vh; }
  .gjs-hero-full__content{ padding:56px 22px 64px; }
}

/* =========================================================
   MAIN SURFACE
   ========================================================= */
.gjs-main{ background:var(--gjs-cream); }
.gjs-section{ padding:76px 28px; }
.gjs-section--alt{ background:var(--gjs-cream-2); }
.gjs-section__head{
  display:flex; justify-content:space-between; align-items:flex-end;
  gap:20px; margin-bottom:40px; flex-wrap:wrap;
}
.gjs-section__eyebrow{
  font-family:var(--gjs-font-display); font-weight:600;
  font-size:15px; color:var(--gjs-teal); margin-bottom:6px; display:block;
}
.gjs-section__title{ font-size:clamp(28px,4vw,40px); }
.gjs-section__sub{ color:var(--gjs-ink-soft); max-width:520px; }
.gjs-section__more{
  font-family:var(--gjs-font-display); font-weight:600; font-size:15px;
  color:var(--gjs-terracotta); white-space:nowrap;
  padding:10px 20px; border-radius:999px; border:2px solid var(--gjs-terracotta);
  transition:background .15s ease, color .15s ease;
}
.gjs-section__more:hover, .gjs-section__more:focus-visible{ background:var(--gjs-terracotta); color:var(--gjs-white); }

/* =========================================================
   POSTER CARDS — portfolio + blog posts share this pattern:
   a colorful tilted card with a poster/photo popping out the top,
   a round monogram badge, colorful tag pills, then title + excerpt.
   ========================================================= */
.gjs-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  row-gap:90px;
  column-gap:28px;
  padding-top:50px; /* room for the tilt + popped-out media */
}

/* Latest-post spotlight: full-width, text left / image right */
.gjs-spotlight{
  position:relative;
  background:var(--gjs-card-b);
  border-radius:var(--gjs-radius);
  padding:48px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
  box-shadow:var(--gjs-shadow);
}
.gjs-spotlight__tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.gjs-spotlight__date{
  font-family:var(--gjs-font-display); font-weight:600; font-size:12px;
  color:var(--gjs-ink); opacity:.65; margin-bottom:8px; display:block;
}
.gjs-spotlight__title{ font-size:clamp(26px,3vw,38px); color:var(--gjs-ink); margin-bottom:14px; }
.gjs-spotlight__title a::after{ content:""; position:absolute; inset:0; border-radius:var(--gjs-radius); }
.gjs-spotlight__excerpt{ font-size:17px; color:var(--gjs-ink); opacity:.8; margin-bottom:0; }
.gjs-spotlight__media{
  position:relative;
  aspect-ratio:4/3;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 16px 30px -10px rgba(0,0,0,.3);
  background:var(--gjs-white);
}
.gjs-spotlight__media img{ width:100%; height:100%; object-fit:cover; }
@media (max-width:780px){
  .gjs-spotlight{ grid-template-columns:1fr; padding:28px; }
}
.gjs-poster-card{
  position:relative;
  border-radius:26px;
  padding:0 20px 26px;
  display:flex; flex-direction:column;
  box-shadow:0 14px 26px -10px rgba(43,38,32,.3);
  transition:transform .2s ease, box-shadow .2s ease;
}
.gjs-poster-card:nth-child(4n+1){ background:var(--gjs-card-a); transform:rotate(-3deg); }
.gjs-poster-card:nth-child(4n+2){ background:var(--gjs-card-b); transform:rotate(2deg); }
.gjs-poster-card:nth-child(4n+3){ background:var(--gjs-card-c); transform:rotate(-2deg); }
.gjs-poster-card:nth-child(4n+4){ background:var(--gjs-card-d); transform:rotate(3deg); }
.gjs-poster-card:hover,
.gjs-poster-card:focus-within{ transform:rotate(0deg) translateY(-6px); box-shadow:0 20px 34px -10px rgba(43,38,32,.35); }

.gjs-poster-card__media-wrap{
  position:relative;
  width:80%;
  margin:-34px auto 16px;
}
.gjs-poster-card__media{
  aspect-ratio:2/3; border-radius:14px; overflow:hidden;
  background:var(--gjs-white);
  box-shadow:0 14px 24px -8px rgba(0,0,0,.35);
}
.gjs-poster-card__media img{ width:100%; height:100%; object-fit:cover; }
.gjs-poster-card__media-placeholder{
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--gjs-teal) 0%, var(--gjs-terracotta) 140%);
  color:var(--gjs-white); font-family:var(--gjs-font-display); font-weight:600; text-align:center; padding:14px; font-size:14px;
}
/* landscape media (blog post thumbnails) get a shorter frame than book/poster media */
.gjs-poster-card__media--wide{ aspect-ratio:4/3; }

.gjs-poster-card__badge{
  position:absolute; top:-12px; left:-12px; z-index:2;
  width:34px; height:34px; border-radius:50%;
  background:var(--gjs-white); color:var(--gjs-ink);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--gjs-font-display); font-weight:700; font-size:15px;
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}

.gjs-poster-card__tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.gjs-pill{
  display:inline-block;
  font-family:var(--gjs-font-display); font-weight:600; font-size:12px;
  padding:6px 13px; border-radius:999px;
  background:var(--gjs-pill-dark); color:var(--gjs-white);
}
.gjs-pill:nth-of-type(5n+1){ background:var(--gjs-pill-pink);     color:#fff; }
.gjs-pill:nth-of-type(5n+2){ background:var(--gjs-pill-lavender);color:#2A2140; }
.gjs-pill:nth-of-type(5n+3){ background:var(--gjs-pill-red);     color:#fff; }
.gjs-pill:nth-of-type(5n+4){ background:var(--gjs-pill-teal);    color:#fff; }
.gjs-pill:nth-of-type(5n+5){ background:var(--gjs-pill-dark);    color:#fff; }

.gjs-poster-card__date{
  font-family:var(--gjs-font-display); font-weight:600; font-size:12px;
  color:var(--gjs-ink); opacity:.65; margin-bottom:8px; display:block;
}
.gjs-poster-card__title{
  font-size:23px; font-weight:700; color:var(--gjs-ink); margin-bottom:8px;
}
.gjs-poster-card__title a::after{ content:""; position:absolute; inset:0; border-radius:26px; }
.gjs-poster-card__excerpt{
  color:var(--gjs-ink); opacity:.75; font-size:15px; margin-bottom:0;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}

/* =========================================================
   GENERIC CONTENT (single/page/archive)
   ========================================================= */
.gjs-content{ padding:64px 28px; max-width:760px; margin:0 auto; }
.gjs-content .entry-title{ font-size:clamp(30px,5vw,46px); }
.gjs-content .entry-meta{
  font-family:var(--gjs-font-display); font-weight:600; font-size:14px;
  color:var(--gjs-ink-soft); margin-bottom:28px;
}
.gjs-content .entry-content{ font-size:18px; }
.gjs-content .entry-content img{ border-radius:var(--gjs-radius-sm); margin:1.4em 0; }
.gjs-archive-list{ list-style:none; margin:0; padding:0; }
.gjs-archive-list li{ padding:20px 0; border-bottom:1px solid var(--gjs-cream-2); }

.gjs-page-hero{
  background:var(--gjs-cream-2);
  padding:56px 28px;
  text-align:center;
}
.gjs-page-hero h1{ font-size:clamp(34px,6vw,56px); margin:0; }

.gjs-single-media{
  border-radius:var(--gjs-radius); overflow:hidden;
  box-shadow:var(--gjs-shadow); margin-bottom:28px;
}
.gjs-single-media img{ width:100%; height:auto; display:block; }

.gjs-credit-details{
  background:var(--gjs-cream-2);
  border-radius:var(--gjs-radius-sm);
  padding:22px 24px;
  margin:24px 0;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px 18px;
}
.gjs-credit-details__label{
  font-family:var(--gjs-font-display); font-weight:600; font-size:13px;
  letter-spacing:.04em; color:var(--gjs-ink-soft); white-space:nowrap;
  align-self:start; padding-top:2px;
}
.gjs-credit-details__value{ color:var(--gjs-ink); font-size:16px; }
.gjs-credit-details__value a{ color:var(--gjs-terracotta-2); font-weight:600; }
.gjs-credit-details__value a:hover, .gjs-credit-details__value a:focus-visible{ text-decoration:underline; }

/* Portfolio category filter tabs (All / Category / Category…) */
.gjs-filter-tabs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:40px; }
.gjs-filter-tab{
  font-family:var(--gjs-font-display); font-weight:600; font-size:14px;
  padding:10px 18px; border-radius:999px;
  background:var(--gjs-white); color:var(--gjs-ink);
  box-shadow:0 6px 14px -8px rgba(43,38,32,.25);
  transition:background .15s ease, color .15s ease;
}
.gjs-filter-tab span{ opacity:.6; margin-left:4px; }
.gjs-filter-tab:hover, .gjs-filter-tab:focus-visible{ background:var(--gjs-cream-2); }
.gjs-filter-tab.is-active{ background:var(--gjs-terracotta); color:var(--gjs-white); }
.gjs-filter-tab.is-active span{ opacity:.85; }

/* =========================================================
   FOOTER
   ========================================================= */
.gjs-footer{
  background:var(--gjs-teal);
  color:var(--gjs-white);
  padding:44px 28px;
  text-align:center;
  font-size:14px;
}
.gjs-footer a:hover, .gjs-footer a:focus-visible{ text-decoration:underline; }

.gjs-social{
  display:flex; justify-content:center; gap:12px;
  margin-bottom:22px;
}
.gjs-social__link{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,.14);
  color:var(--gjs-white);
  transition:background .15s ease, transform .15s ease;
}
.gjs-social__link:hover, .gjs-social__link:focus-visible{
  background:var(--gjs-terracotta);
  transform:translateY(-3px);
  text-decoration:none;
}
.gjs-social__link svg{ width:20px; height:20px; }

/* =========================================================
   ABOUT PAGE — chaptered timeline (used by the About page's
   custom HTML content, kept here so it can't be stripped by
   WordPress's content filtering the way an inline <style>
   tag inside page content sometimes is)
   ========================================================= */
.gjs-about-full{ width:100%; }

.gjs-about-intro{
  background:var(--gjs-cream-2);
  padding:64px 28px;
  text-align:center;
}
.gjs-about-eyebrow{
  font-family:var(--gjs-font-display); font-weight:600;
  color:var(--gjs-teal); font-size:15px; margin-bottom:12px;
}
.gjs-about-title{
  font-family:var(--gjs-font-display); font-weight:700;
  text-transform:uppercase; line-height:1.08;
  font-size:clamp(30px, 5vw, 54px);
  color:var(--gjs-ink); margin:0 auto 20px; max-width:800px;
}
.gjs-about-title .accent{ color:#109bc5; }
.gjs-about-facts{
  font-family:var(--gjs-font-body); font-size:16px;
  color:var(--gjs-ink-soft); margin-bottom:22px;
}
.gjs-about-tags{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }

.gjs-about-timeline{ max-width:760px; margin:0 auto; padding:64px 28px 24px; }
.gjs-about-chapter{
  position:relative;
  padding:0 0 56px 32px;
  border-left:3px solid var(--gjs-cream-2);
}
.gjs-about-chapter:last-child{ border-left-color:transparent; padding-bottom:0; }
.gjs-about-chapter::before{
  content:"";
  position:absolute; left:-9px; top:4px;
  width:15px; height:15px; border-radius:50%;
  background:var(--gjs-terracotta);
  border:3px solid var(--gjs-cream);
}
.gjs-about-chapter__badge{
  display:inline-block;
  font-family:var(--gjs-font-display); font-weight:600; font-size:13px;
  background:var(--gjs-terracotta); color:#fff;
  padding:5px 14px; border-radius:999px; margin-bottom:12px;
}
.gjs-about-chapter h2{
  font-family:var(--gjs-font-display); font-weight:700;
  font-size:clamp(22px,3vw,28px); color:var(--gjs-ink);
  margin:0 0 16px;
}
.gjs-about-chapter p{
  font-family:var(--gjs-font-body); font-size:17px; line-height:1.7;
  color:var(--gjs-ink); margin:0 0 1.1em;
}
.gjs-about-aside{
  margin:20px 0; padding:4px 0 4px 20px;
  border-left:3px solid var(--gjs-teal);
  font-family:var(--gjs-font-display); font-style:italic; font-weight:500;
  font-size:18px; color:var(--gjs-ink-soft);
}

.gjs-about-quote{
  background:var(--gjs-card-b); padding:72px 28px; text-align:center;
}
.gjs-about-quote blockquote{
  max-width:760px; margin:0 auto; font-family:var(--gjs-font-display);
  font-weight:600; font-size:clamp(20px,2.8vw,30px); color:var(--gjs-ink); line-height:1.4;
}
.gjs-about-quote cite{
  display:block; margin-top:20px; font-style:normal;
  font-family:var(--gjs-font-body); font-weight:700; font-size:15px;
  color:var(--gjs-ink); opacity:.7;
}

.gjs-about-cta{ padding:72px 28px; text-align:center; }
.gjs-about-cta h2{
  font-family:var(--gjs-font-display); font-weight:700;
  font-size:clamp(26px,3.6vw,36px); margin-bottom:14px; color:var(--gjs-ink);
}
.gjs-about-cta p{ color:var(--gjs-ink-soft); margin-bottom:28px; }
.gjs-about-cta__buttons{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.gjs-about-btn-outline{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--gjs-font-display); font-weight:600; font-size:16px;
  color:var(--gjs-terracotta); padding:14px 28px; border-radius:999px;
  border:2px solid var(--gjs-terracotta); text-decoration:none;
  transition:background .15s ease, color .15s ease;
}
.gjs-about-btn-outline:hover{ background:var(--gjs-terracotta); color:#fff; }

@media (max-width:600px){
  .gjs-about-chapter{ padding-left:24px; }
}
