/*
Theme Name: Cadence
Theme URI: https://agile2006.org/
Author: Cadence
Description: Editorial theme for Cadence, a publication on agile practice.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: cadence
*/

:root {
  --ink: #eef6f0;
  --muted: #9aafa2;
  --paper: #0b0d0c;
  --card: #141816;
  --line: #2d3b33;
  --accent: #d6ff3c;
  --accent-dark: #c6f531;
  --pine: #5eead4;
  --on-accent: #10140a;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --wrap: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
a:hover { color: #fff; }
::selection { background: var(--accent); color: var(--on-accent); }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }
.screen-reader {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.header-bar { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 650; font-size: 28px; letter-spacing: -0.03em; }
.brand .custom-logo { width: 36px; height: 36px; }
.mark {
  width: 14px; height: 14px; border-radius: 2px; background: var(--accent);
  box-shadow: 4px 4px 0 0 var(--pine); flex: none;
}
.nav-toggle {
  display: none; margin-left: auto; background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 15px; cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--accent); }
.header-search { display: flex; gap: 6px; }
.header-search input {
  width: 150px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px;
  padding: 7px 12px; font: inherit; font-size: 14px;
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
  border: 0; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 7px 12px;
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.header-search button:hover { background: #edff8a; }

.hero { padding: 56px 0 12px; }
.kicker { color: var(--pine); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 { font-family: var(--serif); font-weight: 560; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 16px; }
.intro { max-width: 680px; font-size: 19px; color: var(--muted); }
.intro p { margin: 0 0 12px; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 28px; }
.cats a {
  text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 650;
}
.cats a:hover { border-color: var(--accent); color: var(--accent-dark); }
.cats small { color: var(--muted); font-weight: 500; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 8px 0 16px; }
.section-head h2 { font-family: var(--serif); font-size: 32px; font-weight: 560; margin: 0; }
.section-head a { font-size: 15px; font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card a.thumb { display: block; aspect-ratio: 16/9; background: #1a221c; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  display: flex; align-items: flex-end; height: 100%; padding: 14px; color: var(--accent);
  font-family: var(--serif); font-size: 28px; background:
    radial-gradient(circle at 85% 15%, rgba(94, 234, 212, 0.22), transparent 42%),
    linear-gradient(160deg, #18201b, #101410);
}
.card-body { padding: 16px 16px 18px; }
.card-body .meta { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card-body h3 { font-family: var(--serif); font-size: 24px; line-height: 1.15; font-weight: 560; margin: 6px 0 8px; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--accent-dark); }
.card-body p { margin: 0; color: var(--muted); font-size: 15.5px; }

.pager { display: flex; gap: 14px; justify-content: center; margin: 28px 0; font-weight: 700; }
.pager a, .pager span { text-decoration: none; }

.page-head { padding: 42px 0 8px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); line-height: 1.05; font-weight: 560; margin: 0 0 8px; letter-spacing: -0.03em; }
.entry { max-width: 720px; padding-bottom: 48px; }
.entry h2, .entry h3 { font-family: var(--serif); font-weight: 560; line-height: 1.2; letter-spacing: -0.02em; }
.entry h2 { font-size: 32px; margin: 1.4em 0 0.4em; }
.entry h3 { font-size: 24px; }
.entry p, .entry li { font-size: 18px; }
.entry ul, .entry ol { padding-left: 1.2em; }
.entry blockquote { margin: 1.2em 0; padding: 0 0 0 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.entry img { border-radius: 12px; }
.hero-img { margin: 0 0 22px; border-radius: 16px; max-height: 460px; width: 100%; object-fit: cover; }
.byline { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

.contact-form { display: grid; gap: 10px; max-width: 520px; margin-top: 18px; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 12px; font: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form button {
  justify-self: start; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px;
  padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer;
}
.contact-form button:hover { background: #edff8a; }
.note { background: #18241c; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 36px; padding: 28px 0 40px; background: #080a09; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.site-footer strong { font-family: var(--serif); font-size: 22px; font-weight: 560; }
.site-footer p { color: var(--muted); margin: 8px 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: var(--ink); font-weight: 650; text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); }

.empty { color: var(--muted); }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--card);
    border-bottom: 1px solid var(--line); padding: 8px 16px 16px; flex-direction: column; align-items: stretch;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 8px; }
  .header-search input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  body { font-size: 17px; }
}
