/*
Theme Name: Editorial Pilot
Description: Editorial homepages and locale-specific profiles for a WordPress network.
Version: 1.2.1
Requires PHP: 8.1
*/

:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
body {
  --paper: #f6f8fc; --surface: #fff; --ink: #152743; --muted: #41536f;
  --line: #d8e4f3; --dark: #132c53; --feature: #e6eefc; --accent: #f3c76b;
  --accent-ink: #202536; --photo-x: 0%; --photo-y: 0%;
  --head: "Inter", system-ui, sans-serif;
  margin: 0; color: var(--ink); background: var(--paper);
  font: 1rem/1.56 "Inter", system-ui, sans-serif;
}
body.pilot-rally {
  --paper: #f7f5f4; --ink: #251c20; --muted: #55454a; --line: #e9dadc;
  --dark: #211b20; --feature: #f0e5e6; --accent: #bc2347; --accent-ink: #fff;
  --photo-x: 100%; --photo-y: 0%;
}
body.pilot-turf {
  --paper: #f4f5ee; --ink: #172f27; --muted: #42564b; --line: #d7dfd4;
  --dark: #162e24; --feature: #e3ebd8; --accent: #c7dc8f; --accent-ink: #1b2d20;
  --photo-x: 0%; --photo-y: 50%; --head: Georgia, "Times New Roman", serif;
}
body.pilot-river {
  --paper: #f0f7f7; --ink: #12353b; --muted: #415d65; --line: #d4e6e8;
  --dark: #073d49; --feature: #dceff0; --accent: #f6cc69; --accent-ink: #162b2e;
  --photo-x: 100%; --photo-y: 50%;
}
body.pilot-gallery {
  --paper: #f9f5ec; --surface: #fffcf7; --ink: #342a26; --muted: #64564e;
  --line: #e7dbc9; --dark: #302527; --feature: #efe6d9; --accent: #246967; --accent-ink: #fff;
  --photo-x: 0%; --photo-y: 100%; --head: Georgia, "Times New Roman", serif;
}
body.pilot-ledger {
  --paper: #f5f6f8; --ink: #242b3b; --muted: #4d5669; --line: #e0e4ed;
  --dark: #262f49; --feature: #ebeef8; --accent: #344a9a; --accent-ink: #fff;
}
body.pilot-studio {
  --paper: #f3f5fa; --ink: #202942; --muted: #445575; --line: #dce3f2;
  --dark: #243353; --feature: #e4eafa; --accent: #67d0bf; --accent-ink: #122e33;
}
body.pilot-culture {
  --paper: #fbf6f2; --ink: #3e2625; --muted: #684c49; --line: #edddd4;
  --dark: #452632; --feature: #f5e5e4; --accent: #983653; --accent-ink: #fff;
  --head: Georgia, "Times New Roman", serif;
}
body.pilot-civic { --paper:#f8f6ef; --ink:#313529; --muted:#515845; --line:#e7e5d6;
  --dark:#263c35; --feature:#eaf0e4; --accent:#d8d9a1; --accent-ink:#222e27; }
body.pilot-food { --paper:#fbf6f1; --ink:#3e2b1f; --muted:#644c3d; --line:#eddfd2;
  --dark:#473022; --feature:#f2e7d6; --accent:#ad4e2d; --accent-ink:#fff; }
.photo-stadium .hero-photo,.photo-casino .hero-photo,.photo-trail .hero-photo,.photo-craft .hero-photo,.photo-architecture .hero-photo,.photo-gallery .hero-photo { background-image:url(editorial-sport.png); }
.photo-desk .hero-photo,.photo-travel .hero-photo,.photo-family .hero-photo,.photo-digital .hero-photo,.photo-library .hero-photo,.photo-food .hero-photo { background-image:url(editorial-places.png); }
.photo-stadium .hero-photo,.photo-desk .hero-photo { --photo-x:0%; --photo-y:0%; }
.photo-casino .hero-photo,.photo-travel .hero-photo { --photo-x:100%; --photo-y:0%; }
.photo-trail .hero-photo,.photo-family .hero-photo { --photo-x:0%; --photo-y:50%; }
.photo-craft .hero-photo,.photo-digital .hero-photo { --photo-x:100%; --photo-y:50%; }
.photo-architecture .hero-photo,.photo-library .hero-photo { --photo-x:0%; --photo-y:100%; }
.photo-gallery .hero-photo,.photo-food .hero-photo { --photo-x:100%; --photo-y:100%; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--head); line-height: 1.09; }
img { display: block; width: 100%; height: auto; border-radius: .4rem; }
.shell { width: min(1160px, calc(100% - clamp(1.75rem, 7vw, 5rem))); margin: 0 auto; }
.skip-link { position: absolute; z-index: 10; inset-inline-start: 1rem; inset-block-start: .4rem; background: var(--surface); padding: .65rem 1rem; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--dark); color: #fff; }
.header-row, .footer-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.masthead { display: inline-flex; align-items: center; gap: .65rem; font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 750; text-decoration: none; line-height: 1.16; }
.brand-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid #ffffff78; border-radius: 5px; font-size: .76rem; letter-spacing: .03em; }
.primary-nav ul, .footer-row ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a, .footer-row nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .89rem; font-weight: 600; text-decoration: none; }
.primary-nav a:hover, .primary-nav [aria-current], .footer-row a:hover { text-decoration: underline; text-underline-offset: .35em; }
.menu-toggle { background: transparent; border: 1px solid #ffffff78; border-radius: 5px; color: #fff; font: inherit; min-height: 44px; padding: .35rem .65rem; cursor: pointer; }
.primary-nav .menu-item { position: relative; }
.primary-nav .sub-menu { display: none; position: absolute; z-index: 2; inset-inline-start: 0; min-width: 11rem; background: var(--dark); padding: .35rem .75rem; }
.primary-nav .menu-item:hover > .sub-menu, .primary-nav .menu-item:focus-within > .sub-menu { display: block; }
.hero {
  margin: clamp(1.4rem, 5vw, 4rem) 0 clamp(2.4rem, 6vw, 5rem);
  background: var(--feature); border: 1px solid var(--line); border-radius: 12px;
  display: grid; grid-template-columns: 1fr 1.08fr; align-items: center;
  gap: clamp(1.25rem, 4vw, 3.5rem); padding: clamp(1.25rem, 3.8vw, 3.25rem);
}
.hero h1 { font-size: clamp(2.25rem, 4.8vw, 4.1rem); letter-spacing: -.045em; }
.eyebrow { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 760; color: var(--muted); margin-bottom: .65rem; }
.hero-description { max-width: 44ch; color: var(--muted); margin-top: 1rem; }
.button { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .55rem .85rem; text-decoration: none; font-weight: 740; background: var(--accent); color: var(--accent-ink); border-radius: 5px; margin-top: 1.2rem; }
.button:hover { text-decoration: underline; text-underline-offset: .3em; }
.hero-photo { width: 100%; aspect-ratio: 2.25; border-radius: 6px; background-color: var(--dark); background-image: url(editorial-photos.png); background-size: 200% 300%; background-position: var(--photo-x) var(--photo-y); background-repeat: no-repeat; }
.pilot-rally .hero { border-radius: 0; grid-template-columns: .85fr 1.15fr; border-top: 5px solid var(--accent); }
.pilot-rally .hero-photo, .pilot-rally .card { border-radius: 0; }
.pilot-turf .hero { border-radius: 0; }
.pilot-river .hero { grid-template-columns: 1fr; gap: 1.4rem; }
.pilot-river .hero-copy { display: grid; justify-items: start; }
.pilot-river .hero-description { max-width: 65ch; }
.pilot-river .hero-photo { max-width: 800px; }
.pilot-gallery .hero { background: transparent; border: 0; padding-inline: 0; grid-template-columns: .9fr 1.1fr; }
.pilot-gallery .hero-photo { border-radius: 0; outline: 1px solid var(--line); outline-offset: 7px; }
.sections { display: grid; gap: clamp(1.65rem, 4vw, 3.25rem); margin-bottom: 4rem; }
.section-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem .9rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); margin-bottom: .85rem; }
.section-title h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); letter-spacing: -.035em; }
.section-title a { font-size: .87rem; font-weight: 700; text-underline-offset: .22em; }
.feed-grid, .directory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.feed-grid:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
.feed-grid:has(> :only-child) { grid-template-columns: 1fr; }
.card { min-width: 0; padding: clamp(.9rem, 2vw, 1.5rem); border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.card h2, .card h3 { font-size: clamp(1.23rem, 2vw, 1.58rem); letter-spacing: -.015em; }
.card h2 a, .card h3 a { text-decoration-thickness: .06em; text-underline-offset: .16em; }
.card a:hover { color: var(--muted); }
.card-date { color: var(--muted); font-size: .75rem; margin: .25rem 0 .6rem; font-variant-numeric: tabular-nums; }
.excerpt, .directory-grid .card p { margin-top: .65rem; color: var(--muted); font-size: .96rem; }
.feed-collections .card { border-inline-start: 4px solid var(--dark); }
.site-footer { padding: 1.45rem 0; background: var(--dark); color: #fff; }
.footer-row { align-items: flex-start; min-height: 38px; }
.footer-brand { font-weight: 720; text-decoration: none; }
.footer-row p { font-size: .85rem; margin-top: .25rem; }
.page-frame, .directory-intro { padding-top: clamp(1.25rem, 4vw, 3.6rem); }
.page-frame, .directory-grid { padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.directory-intro { margin-bottom: 1.35rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: 1.25rem; color: var(--muted); font-size: .9rem; }
.breadcrumbs a, .article-content a { text-underline-offset: .2em; }
.archive-intro, .related, .article-content { margin-bottom: 2.2rem; }
.article-content { max-width: 750px; }
.archive-intro h1, .article-content h1, .directory-intro h1 { font-size: clamp(2rem, 5.6vw, 3.55rem); letter-spacing: -.036em; margin-bottom: .7rem; }
.article-content p+p, .article-content h2 { margin-top: 1.1rem; }
.article-content h2 { font-size: 1.5rem; margin-bottom: .55rem; }
.article-content .intro { font-size: 1.13rem; color: var(--muted); margin-bottom: 1.1rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.5rem; }
.page-numbers { border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: .25rem; padding-inline: .45rem; }
.page-numbers.current { background: var(--dark); color: #fff; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (max-width: 720px) {
  .header-row { flex-wrap: wrap; min-height: 64px; padding-block: .55rem; gap: .45rem; }
  .primary-nav { flex-basis: 100%; border-top: 1px solid #ffffff60; }
  .primary-nav ul { display: block; }
  .primary-nav .sub-menu { display: block; position: static; padding: 0 .8rem; }
  .hero, .pilot-rally .hero, .pilot-gallery .hero { grid-template-columns: 1fr; }
  .hero h1 { letter-spacing: -.035em; }
  .feed-grid, .feed-grid:has(> :last-child:nth-child(2)), .directory-grid { grid-template-columns: 1fr; }
  .footer-row { display: block; }
}
