/*
Theme Name: Fullerton Facts
Theme URI: https://fullertonfacts.com
Description: Hometown news theme for FullertonFacts.com with short-video strip, automatic Around Town feed and curated links.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fullerton-facts
*/

:root {
  /* Layout idea: built from the tower-seal logo. Navy masthead with the round seal, cream paper, terracotta accents, friendly rounded cards. */
  --paper: #f6f1e8;
  --surface: #fffdf9;
  --ink: #1b2a4b;
  --muted: #5d6577;
  --rule: #e4dccd;
  --navy: #1b2a4b;
  --accent: #c4573c;      /* terracotta dome */
  --accent-ink: #ffffff;
  --leaf: #4f7458;
  --sun: #ece2d0;         /* warm tan */
  --cream: #f2ede7;
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111a2e; --surface: #18233b; --ink: #f2ede7; --muted: #a9b1c1; --rule: #2a3754;
    --navy: #1b2a4b; --accent: #e0775a; --accent-ink: #111a2e; --leaf: #8fb796; --sun: #2a3754;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111a2e; --surface: #18233b; --ink: #f2ede7; --muted: #a9b1c1; --rule: #2a3754;
  --navy: #1b2a4b; --accent: #e0775a; --accent-ink: #111a2e; --leaf: #8fb796; --sun: #2a3754;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 18px; line-height: 1.6; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: -.005em; }
.kicker { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--leaf); text-decoration: none; }
.meta { font-family: var(--font-ui); font-size: 13px; color: var(--muted); }
.sample { font-family: var(--font-ui); font-size: 10px; text-transform: uppercase; border: 1px solid var(--muted); color: var(--muted); padding: 1px 5px; border-radius: 3px; margin-left: 6px; }

/* Top greeting strip */
.topbar { background: #142039; color: #eef2f7; font-family: var(--font-ui); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #eef2f7; text-decoration-color: var(--accent); }
.topbar b { color: #f0a58f; font-weight: 700; }

/* Masthead: the round tower seal on navy */
.masthead { position: relative; overflow: hidden; color: var(--cream); background:
  repeating-conic-gradient(from 0deg at 18% 50%, rgba(242,237,231,.06) 0deg 5deg, transparent 5deg 10deg),
  var(--navy); border-bottom: 6px solid var(--accent); }
.masthead .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 24px; text-decoration: none; color: var(--cream); min-width: 0; }
.brand:hover { color: var(--cream); }
.mark { flex: none; width: 148px; height: 148px; border-radius: 50%; display: block; }
.site-name { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -.01em; color: var(--cream); }
.tagline { font-family: var(--font-body); font-style: italic; color: #f0c9bc; margin-top: 8px; font-size: clamp(18px, 2vw, 24px); line-height: 1.25; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1; color: var(--cream); text-transform: uppercase; letter-spacing: .04em; }
.logo span { color: var(--accent); }
.mast-side { display: grid; gap: 10px; justify-items: end; }
.btn { display: inline-block; font-family: var(--font-ui); font-weight: 700; font-size: 15px; background: var(--accent); color: var(--accent-ink); border: 0; padding: 11px 20px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--accent-ink); filter: brightness(1.07); }
.btn.big { font-size: 17px; padding: 14px 26px; min-width: 210px; text-align: center; }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }
.btn.ghost:hover { color: var(--navy); background: var(--cream); }
.article .btn.ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }

nav.sections { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
nav.sections .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
nav.sections .nav-row > ul, nav.sections .nav-row > div:not(.nav-cta) { min-width: 0; overflow-x: auto; }
.nav-cta { display: none; gap: 8px; flex: none; }
.pill { display: inline-block; font-family: var(--font-ui); font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.pill.tip { background: var(--accent); color: #fff; }
.pill.news { background: var(--navy); color: var(--cream); }
.pill:hover { filter: brightness(1.1); color: #fff; }
/* Once the masthead scrolls away, the sticky menu bar carries the two buttons. */
nav.sections.stuck .nav-cta { display: flex; }
nav.sections ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; }
nav.sections a { display: block; padding: 8px 14px; margin: 8px 0; border-radius: 999px; font-family: var(--font-ui); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
nav.sections a:hover { background: var(--paper); color: var(--ink); }
nav.sections .current-menu-item a { background: var(--navy); color: #fff; }

/* "Did you know?" strip */
.ticker { background: var(--sun); color: var(--ink); font-family: var(--font-ui); font-size: 14px; overflow: hidden; }
.ticker .wrap { display: flex; gap: 14px; align-items: center; padding-top: 9px; padding-bottom: 9px; }
.ticker b { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; animation: scroll 45s linear infinite; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

main { padding: 34px 0 64px; }

/* Lead */
.lead-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.lead { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--rule), 0 8px 24px rgba(31,58,104,.08); }
.lead-photo { display: block; position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #2c406b, #c4573c); overflow: hidden; }
.lead-photo img, .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lead-body { padding: 22px 26px 26px; }
.lead h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.08; margin: 10px 0 10px; }
.lead h2 a { text-decoration: none; }
.lead p.dek { font-size: 20px; color: var(--muted); margin: 0 0 12px; max-width: 62ch; }
.secondary { display: grid; gap: 16px; align-content: start; }
.secondary article { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; border-left: 6px solid var(--leaf); }
.secondary article:first-child { border-left-color: var(--accent); }
.secondary h3 { font-size: 21px; line-height: 1.15; margin: 6px 0; }
.secondary h3 a { text-decoration: none; }
.secondary p { margin: 0 0 6px; color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Section headers: hand-lettered sign feel */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 54px 0 20px; }
.sec-head h2 { font-size: clamp(26px, 3vw, 34px); color: var(--navy); display: flex; align-items: center; gap: 12px; }
:root[data-theme="dark"] .sec-head h2 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sec-head h2 { color: var(--ink); } }
.sec-head h2::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 18px 0 0 var(--navy), 36px 0 0 #d9c7a8; margin-right: 40px; flex: none; }
.sec-head p { margin: 4px 0 0; font-style: italic; color: var(--muted); font-size: 17px; }
.sec-head a { font-family: var(--font-ui); font-weight: 600; font-size: 14px; white-space: nowrap; }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(5, minmax(170px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.video { position: relative; aspect-ratio: 9/16; border-radius: var(--radius); overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; min-width: 170px; border: 4px solid var(--surface); box-shadow: 0 6px 18px rgba(31,58,104,.14); }
.video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,20,40,.8)); z-index: 1; }
.video.v1 { background: linear-gradient(160deg, #34497a, #1b2a4b); }
.video.v2 { background: linear-gradient(160deg, #d9775c, #9c3f27); }
.video.v3 { background: linear-gradient(160deg, #6fae5f, #2f5e2c); }
.video.v4 { background: linear-gradient(160deg, #cdb48a, #8a6f45); }
.video.v5 { background: linear-gradient(160deg, #8fb9d6, #3d6a8f); }
.video img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video > *:not(img) { position: relative; z-index: 2; }
.video a.cover { position: absolute; inset: 0; z-index: 3; }
.play { position: absolute !important; top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }
.play::after { content: ""; border-left: 13px solid #1b2a4b; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.video .kicker { color: #f0a58f; }
.video h3 { font-size: 19px; line-height: 1.12; }
.share { display: flex; gap: 8px; margin-top: 10px; z-index: 4 !important; }
.share button { font-family: var(--font-ui); font-size: 12px; font-weight: 600; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.share button:hover { background: rgba(255,255,255,.32); }

/* Single featured video in the sidebar */
.video.feature { aspect-ratio: 4/5; min-width: 0; border: 0; box-shadow: none; }
.video.feature h3 { font-size: 20px; color: #fff; margin: 0; }

/* Around Town (Community) */
.community { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.c-card { background: var(--surface); border-radius: var(--radius); display: grid; grid-template-columns: 68px 1fr; gap: 14px; padding: 16px; box-shadow: 0 1px 0 var(--rule); }
.c-date { text-align: center; border-radius: 10px; background: var(--paper); padding: 8px 4px; font-family: var(--font-ui); align-self: start; border-top: 6px solid var(--accent); }
.c-date .m { display: block; font-size: 12px; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.c-date .d { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.05; }
.c-date .w { display: block; font-size: 11px; color: var(--muted); }
.c-card h3 { font-size: 18px; line-height: 1.2; margin: 6px 0 4px; }
.c-card h3 a { text-decoration: none; }
.c-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); font-family: var(--font-ui); }
.chip { display: inline-block; font-family: var(--font-ui); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e2e7f1; color: #1b2a4b; }
.chip.special { background: #f6dcd3; color: #9c3f27; }
.chip.meeting { background: #e2efdf; color: #2f5e2c; }
.chip.announcement { background: #efe3cc; color: #6b5328; }
:root[data-theme="dark"] .chip { filter: brightness(.9); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters a { font-family: var(--font-ui); font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 999px; text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.filters a.on { background: var(--navy); color: #fff; box-shadow: none; }
.empty { font-style: italic; color: var(--muted); }

/* Latest + rail */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 36px; }
.latest article { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 18px 0; border-bottom: 2px dotted var(--rule); }
.latest time { font-family: var(--font-ui); font-size: 13px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.latest h3 { font-size: 21px; line-height: 1.2; margin: 4px 0 6px; }
.latest h3 a { text-decoration: none; }
.latest p { margin: 0; color: var(--muted); font-size: 16px; max-width: 62ch; }

.rail { display: grid; gap: 22px; align-content: start; }
.box { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 var(--rule); }
.box.sunny { background: var(--navy); color: var(--cream); }
.box h3 { font-size: 20px; color: var(--navy); margin-bottom: 10px; }
.box.sunny h3 { color: var(--cream); }
.ledger { list-style: none; margin: 0; padding: 0; font-family: var(--font-ui); font-size: 14px; }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 2px dotted var(--rule); font-variant-numeric: tabular-nums; }
.ledger li:last-child { border-bottom: 0; }
.ledger span:last-child { font-weight: 700; text-align: right; color: var(--accent); }
.box form { display: grid; gap: 10px; }
.box label { font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.box input, .box textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 10px; width: 100%; }
.box textarea { min-height: 90px; resize: vertical; }
.notice { font-family: var(--font-ui); font-size: 14px; color: var(--leaf); font-weight: 600; margin: 0; }
.box p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--muted); }
.box.sunny p { color: #cfd5e2; }
.box.sunny .btn { background: var(--accent); color: #fff; }

/* Around the Web */
.curated { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.curated a { display: block; padding: 16px 18px; background: var(--surface); border-radius: var(--radius); text-decoration: none; box-shadow: 0 1px 0 var(--rule); }
.curated .src { font-family: var(--font-ui); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--leaf); }
.curated h3 { font-size: 18px; line-height: 1.25; margin: 6px 0 0; }
.curated a:hover h3 { color: var(--accent); }

/* Social links */
.social { display: flex; gap: 10px; align-items: center; }
.social-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.mast-social { justify-content: center; }
.mast-social .social-link { width: 40px; height: 40px; justify-content: center; border-radius: 50%; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(242,237,231,.5); }
.mast-social .social-link:hover { background: var(--cream); color: var(--navy); }
.foot-social { margin-top: 16px; flex-wrap: wrap; }
.foot-social .social-link { color: #fff; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.1); }
.foot-social .social-link:hover { background: var(--accent); color: #fff; }

/* Footer */
footer { background: var(--navy); color: #d4deeb; padding: 44px 0 34px; font-size: 15px; border-top: 6px solid var(--accent); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
footer .logo { font-size: 40px; color: #fff; }
footer h4 { font-family: var(--font-ui); text-transform: uppercase; font-size: 13px; letter-spacing: .06em; color: #f0a58f; margin: 0 0 10px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer a { color: #d4deeb; text-decoration-color: var(--accent); }
footer .mark { width: 96px; height: 96px; }
.foot-brand { display: flex; gap: 18px; align-items: center; }
.fine { font-family: var(--font-ui); font-size: 13px; color: #a9b7cb; margin-top: 12px; }
.madein { font-style: italic; color: #fff; margin: 10px 0 0; font-size: 17px; }

/* Single + archive */
.article { max-width: 720px; margin: 0 auto; background: var(--surface); border-radius: var(--radius); padding: 34px clamp(20px, 5vw, 48px); }
.article h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; margin: 10px 0 14px; color: var(--navy); }
:root[data-theme="dark"] .article h1 { color: var(--ink); }
.article .entry { font-size: 19px; line-height: 1.7; }
.article .entry img { height: auto; border-radius: 10px; }
.article .entry iframe { max-width: 100%; }
.article .entry h2, .article .entry h3 { margin: 1.4em 0 .4em; }
.article .facts { list-style: none; padding: 16px 20px; margin: 20px 0; background: var(--paper); border-radius: 10px; border-left: 6px solid var(--accent); font-family: var(--font-ui); font-size: 15px; display: grid; gap: 6px; }
.archive-list { display: grid; gap: 16px; }
.archive-list article { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 16px; background: var(--surface); border-radius: var(--radius); }
.archive-list .thumb { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, #2c406b, #c4573c); border-radius: 10px; overflow: hidden; }
.archive-list h2 { font-size: 22px; line-height: 1.18; margin: 4px 0 6px; }
.archive-list h2 a { text-decoration: none; }
.archive-list p { margin: 0; color: var(--muted); font-size: 16px; }
.pager { display: flex; justify-content: space-between; margin-top: 28px; font-family: var(--font-ui); font-weight: 600; font-size: 15px; }
.custom-logo-link img { max-height: 110px; width: auto; }
.screen-reader-text, .hp { position: absolute; left: -9999px; }

@media (max-width: 900px) {
  .lead-grid, .two-col { grid-template-columns: 1fr; }
  .community, .curated { grid-template-columns: 1fr 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  .masthead .wrap { grid-template-columns: 1fr; }
  .mast-side { justify-items: start; grid-auto-flow: column; justify-content: start; }
}
@media (max-width: 560px) {
  .mast-side { display: none; }
  .nav-cta { display: flex; }
  nav.sections .nav-row { flex-direction: column-reverse; align-items: stretch; gap: 0; }
  .nav-cta { padding-top: 8px; }
  .nav-cta .pill { flex: 1; text-align: center; }
  .community, .curated { grid-template-columns: 1fr; }
  .latest article, .archive-list article { grid-template-columns: 1fr; gap: 6px; }
  .videos { grid-template-columns: repeat(5, 62vw); }
  .mark { width: 92px; height: 92px; }
  .brand { gap: 14px; }
}
