/*
Theme Name: Cheeky Possum
Theme URI: https://cheekypossum.au
Author: Alice & Oscar (Human Liaison: Jim Vincent)
Author URI: https://cheekypossum.au
Description: The official online headquarters of Alice and Oscar, two brushtail possums operating from a veranda in Fairfield, Brisbane. A warm, hand-built theme — part wildlife diary, part deadpan bureaucracy. Zero plugins required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cheeky-possum
*/

/* ============================================================
   Cheeky Possum — Design System
   "The Veranda at 4:30 a.m."
   ============================================================ */

:root {
  /* Palette */
  --ink:        #16130f;   /* warm near-black (the photo background)     */
  --ink-2:      #241f18;   /* raised dark surfaces                        */
  --paper:      #f7f1e6;   /* warm paper-cream body                       */
  --paper-2:    #fffaf0;   /* raised card surface                         */
  --carrot:     #e0722a;   /* the accent — a carrot                       */
  --carrot-dk:  #b9591c;
  --leaf:       #5f7d5a;   /* gum-leaf green (secondary)                  */
  --leaf-dk:    #3f5545;
  --fur:        #8d8072;   /* possum fur grey-brown                       */
  --fur-lt:     #b7ab99;
  --pink:       #c8776b;   /* nose pink                                   */

  --text:       #2b241c;   /* body ink on paper                           */
  --text-soft:  #6a5f50;   /* muted ink                                   */
  --text-onink: #efe7d6;   /* body on dark                                */
  --text-onink-soft:#b7ac97;
  --line:       #e3d8c4;   /* hairlines on paper                          */
  --line-ink:   #3a3126;   /* hairlines on dark                           */

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;

  /* Space & shape */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(22,19,15,.06), 0 8px 26px rgba(22,19,15,.09);
  --shadow-lg: 0 2px 6px rgba(22,19,15,.08), 0 20px 50px rgba(22,19,15,.16);
}

/* ---------- Reset-ish base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--carrot-dk); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--carrot); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 .5em; }
h3 { font-size: 1.3rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }
.narrow { max-width: var(--wrap-narrow); }
.section { padding-block: clamp(48px, 8vw, 96px); }
.center { text-align: center; }

/* Little type flourishes */
.kicker {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--carrot-dk);
  margin: 0 0 .9em;
}
.lede { font-size: 1.2rem; color: var(--text-soft); }
.dropcap::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.4em;
  line-height: .72;
  padding: .06em .12em 0 0;
  color: var(--carrot-dk);
}

/* Dotted "official form" rule */
.rule-dotted { border: 0; border-top: 2px dotted var(--line); margin: 2.2rem 0; }
.paw-divider { text-align: center; color: var(--fur); letter-spacing: .5em; margin: 2rem 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .72em 1.25em; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary { background: var(--carrot); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--carrot-dk); color:#fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { background: rgba(224,114,42,.12); color: var(--carrot-dk); }
.on-ink .btn-ghost { color: var(--text-onink); }
.on-ink .btn-ghost:hover { background: rgba(255,255,255,.08); color:#fff; }

/* ============================================================
   Header / navigation
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,241,230,.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.2rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__logo { width: 42px; height: 42px; flex: none; }
.brand__name { display:block; font-family: var(--serif); font-weight: 600; font-size: 1.28rem; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.brand__tag { display:block; font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-top: 4px; white-space: nowrap; }

.nav { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a {
  text-decoration: none; color: var(--text); font-weight: 500; font-size: .96rem;
  padding: .5em .8em; border-radius: 999px; white-space: nowrap;
}
.nav a:hover, .nav .current-menu-item > a, .nav .current_page_item > a { background: rgba(224,114,42,.13); color: var(--carrot-dk); }

.nav-toggle { display:none; background:none; border:0; cursor:pointer; padding:.4em; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
    padding: .5rem clamp(18px,5vw,40px) 1rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8em .6em; border-radius: 10px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background:
    radial-gradient(120% 100% at 78% 8%, rgba(224,114,42,.14), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--text-onink);
  overflow: clipped;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(52px, 8vw, 92px); }
.hero h1 { color: #fff; }
.hero .lede { color: var(--text-onink-soft); }
.hero__portrait {
  position: relative; justify-self: center;
  width: min(420px, 100%); aspect-ratio: 1; border-radius: 50%;
  padding: 10px; background: conic-gradient(from 200deg, var(--carrot), var(--leaf), var(--carrot));
  box-shadow: var(--shadow-lg);
}
.hero__portrait img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; background: #000; }
.hero__badge {
  position: absolute; bottom: -7%; right: 2%;
  background: var(--paper-2); color: var(--ink);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .04em;
  padding: .55em .85em; border-radius: 12px; box-shadow: var(--shadow-lg);
  transform: rotate(-3deg); border: 1px solid var(--line);
  max-width: 220px; line-height: 1.4;
}
.hero__badge b { color: var(--carrot-dk); }
.hero__cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero__cta { justify-content: center; }
  .hero__badge { right: 4%; }
}

/* ============================================================
   Status ledger  (the running-gag widgets)
   ============================================================ */
.ledger {
  background: var(--ink);
  border-top: 3px solid var(--carrot);
  color: var(--text-onink);
}
.ledger__head { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom: 1.4rem; }
.ledger__head h2 { color: #fff; margin: 0; }
.ledger__stamp {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--carrot); border: 1.5px solid var(--carrot); border-radius: 6px; padding: .35em .6em;
  transform: rotate(-2deg);
}
.ledger__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.gauge {
  background: linear-gradient(180deg, var(--ink-2), #1b1710);
  border: 1px solid var(--line-ink); border-radius: var(--radius);
  padding: 1.05rem 1.1rem; position: relative;
}
.gauge__label { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-onink-soft); margin: 0 0 .5rem; }
.gauge__value { font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: #fff; margin: 0; }
.gauge__value small { font-size: .9rem; color: var(--text-onink-soft); font-family: var(--sans); }
.gauge__note { font-size: .82rem; color: var(--text-onink-soft); margin: .55rem 0 0; }
.gauge__bar { height: 8px; border-radius: 999px; background: var(--line-ink); overflow: hidden; margin-top: .7rem; }
.gauge__bar span { display:block; height:100%; border-radius:999px; background: linear-gradient(90deg, var(--carrot), #f0a35a); }

/* status pill colours */
.pill { display:inline-block; font-family: var(--mono); font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; padding:.32em .6em; border-radius:999px; }
.pill--ok    { background: rgba(95,125,90,.22);  color:#a9c9a2; border:1px solid var(--leaf); }
.pill--warn  { background: rgba(224,114,42,.18);  color:#f0a35a; border:1px solid var(--carrot); }
.pill--alert { background: rgba(200,80,60,.18);    color:#e79080; border:1px solid #b8564a; }

/* A gauge that spans two columns (e.g. the multi-clock Possum Time panel) */
.gauge--wide { grid-column: span 2; }
@media (max-width: 520px){ .gauge--wide { grid-column: span 1; } }

/* Possum time clocks */
.clock { display:grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .8rem 1.2rem; }
.clock__zone { text-align:left; }
.clock__zone time { font-family: var(--serif); font-size:1.5rem; color:#fff; }
.clock__zone span { display:block; font-family: var(--mono); font-size:.64rem; letter-spacing:.1em; text-transform:uppercase; color: var(--text-onink-soft); }

/* ============================================================
   Cards / dispatches
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 3/2; background: var(--ink); overflow:hidden; }
.card__media img { width:100%; height:100%; object-fit: cover; }
.card__body { padding: 1.1rem 1.3rem 1.4rem; display:flex; flex-direction:column; flex:1; }
.card__meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .5rem; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.card__title { font-size: 1.3rem; margin: 0 0 .4rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--carrot-dk); }
.card__excerpt { color: var(--text-soft); font-size: .96rem; margin:0 0 1rem; }
.card__more { margin-top:auto; font-weight:600; font-size:.9rem; text-decoration:none; }

/* byline chip */
.byline { display:inline-flex; align-items:center; gap:.4em; }
.byline__dot { width:8px; height:8px; border-radius:50%; background: var(--carrot); }
.byline--alice .byline__dot { background: var(--carrot); }
.byline--oscar .byline__dot { background: var(--leaf); }
.byline--human .byline__dot { background: var(--fur); }

/* ============================================================
   Profile cards — Meet Alice & Oscar
   ============================================================ */
.profiles { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 28px; }
.profile {
  background: var(--paper-2); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.8rem; box-shadow: var(--shadow); position:relative; overflow:hidden;
}
.profile::before { content:""; position:absolute; inset:0 0 auto 0; height:6px; }
.profile--alice::before { background: var(--carrot); }
.profile--oscar::before { background: var(--leaf); }
.profile__name { display:flex; align-items:baseline; gap:.6rem; margin-top:.4rem; }
.profile__name h3 { margin:0; font-size:1.7rem; }
.profile__role { font-family: var(--mono); font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-soft); }
.profile__role--alice { color: var(--carrot-dk); }
.profile__role--oscar { color: var(--leaf-dk); }
.profile dl { display:grid; grid-template-columns:auto 1fr; gap:.35rem 1rem; margin: 1.1rem 0 0; font-size:.95rem; }
.profile dt { font-family: var(--mono); font-size:.7rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-soft); align-self:center; }
.profile dd { margin:0; }

/* ============================================================
   Article / single dispatch
   ============================================================ */
.article { }
.article__header { padding-block: clamp(40px,6vw,72px) 0; }
.entry-content { font-size: 1.1rem; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content img { border-radius: var(--radius); box-shadow: var(--shadow); margin-block: 1.4rem; }
.entry-content blockquote {
  margin: 1.6rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--carrot);
  font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--text-soft);
}
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: .4rem; }

/* The signature "claim vs observed" split */
.ledger-split { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin: 1.8rem 0; }
.ledger-split > div { border-radius: var(--radius); padding: 1.1rem 1.3rem; border:1px solid var(--line); }
.ledger-split .claim   { background: #fbf1e6; border-color:#f0d9bd; }
.ledger-split .observed{ background: #eef2ea; border-color:#d5e2cf; }
.ledger-split h4 { font-family: var(--mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; margin:0 0 .5rem; }
.ledger-split .claim h4 { color: var(--carrot-dk); }
.ledger-split .observed h4 { color: var(--leaf-dk); }
.ledger-split p:last-child { margin-bottom:0; }
@media (max-width:620px){ .ledger-split { grid-template-columns:1fr; } }

/* ============================================================
   Callout / email cards (Write to Alice & Oscar)
   ============================================================ */
.mailcards { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px; }
.mailcard { background: var(--paper-2); border:1px solid var(--line); border-radius: var(--radius-lg); padding:1.6rem; box-shadow: var(--shadow); text-align:center; }
.mailcard__addr { font-family: var(--mono); font-size:1.02rem; color: var(--ink); margin:.4rem 0 1rem; word-break: break-all; }
.callout { background: var(--ink); color: var(--text-onink); border-radius: var(--radius-lg); padding: clamp(1.4rem,4vw,2.4rem); }
.callout h2 { color:#fff; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: var(--text-onink-soft); padding-block: clamp(40px,6vw,72px) 32px; border-top:3px solid var(--carrot); }
.site-footer a { color: var(--text-onink); }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 2.4rem; }
.footer-brand { display:flex; align-items:center; gap:.7rem; margin-bottom:.9rem; }
.footer-brand img { width:40px; height:40px; }
.footer-brand b { font-family:var(--serif); font-size:1.2rem; color:#fff; }
.footer-col h4 { color:#fff; font-family:var(--mono); font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; margin-bottom:.8rem; }
.footer-col ul { list-style:none; margin:0; padding:0; }
.footer-col li { margin-bottom:.4rem; }
.footer-col a { text-decoration:none; }
.footer-col a:hover { color: var(--carrot); }
.footer-legal { border-top:1px solid var(--line-ink); padding-top:1.4rem; font-size:.84rem; display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
@media (max-width:720px){ .footer-grid { grid-template-columns:1fr; gap:24px; } }

/* ============================================================
   Utility / misc
   ============================================================ */
.section--paper2 { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: 2.2rem; }
.section-head.center { margin-inline:auto; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:32px; align-items:center; }
@media (max-width:760px){ .grid-2 { grid-template-columns:1fr; } }
.skip-link { position:absolute; left:-9999px; }
.skip-link:focus { left:12px; top:12px; background:#fff; padding:.6em 1em; border-radius:8px; z-index:100; }
.pagination { display:flex; gap:.6rem; justify-content:center; margin-top:2.4rem; }
.pagination .page-numbers { padding:.5em .9em; border-radius:10px; border:1px solid var(--line); text-decoration:none; color:var(--text); }
.pagination .current { background: var(--carrot); color:#fff; border-color:var(--carrot); }

/* Fact / info box for About page */
.factbox { background:#eef2ea; border:1px solid #d5e2cf; border-left:4px solid var(--leaf); border-radius: var(--radius); padding:1.2rem 1.4rem; margin:1.6rem 0; }
.factbox h4 { color: var(--leaf-dk); font-family:var(--mono); font-size:.74rem; letter-spacing:.1em; text-transform:uppercase; margin:0 0 .5rem; }
.factbox p:last-child { margin-bottom:0; }

/* ============================================================
   Comments — the in-character "notes" thread (Alice ↔ Oscar)
   ============================================================ */
.cp-comments { margin-top: 2.6rem; }
.cp-comments__title { font-family: var(--mono); font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color: var(--text-soft); margin:0 0 1rem; }
.cp-comments__list { list-style:none; margin:0; padding:0; }
.cp-comment { background: var(--paper-2); border:1px solid var(--line); border-left:4px solid var(--fur); border-radius: var(--radius); padding:1.1rem 1.3rem; margin:0 0 1rem; }
.cp-comment--oscar { border-left-color: var(--leaf); }
.cp-comment--alice { border-left-color: var(--carrot); }
.cp-comment .children { list-style:none; margin:1rem 0 0; padding-left:1.4rem; }
.cp-comment__meta { font-family: var(--mono); font-size:.7rem; letter-spacing:.06em; text-transform:uppercase; color: var(--text-soft); margin:0 0 .55rem; display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.cp-comment__content { font-size:1rem; }
.cp-comment__content p:last-child { margin-bottom:0; }
