/*
Theme Name: ATBI Sector Desk
Theme URI: https://www.allthingsbeingisos.com/
Author: All Things Being ISOs
Description: A fast, accessible news theme for All Things Being ISOs.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: atbi
*/

:root {
  --atbi-blue: #176fc1;
  --atbi-blue-dark: #0f4e8a;
  --atbi-ink: #13212e;
  --atbi-muted: #5c6b77;
  --atbi-line: #d9e1e7;
  --atbi-soft: #edf3f7;
  --atbi-paper: #f5f8fa;
  --atbi-white: #ffffff;
  --atbi-radius: 14px;
  --atbi-shadow: 0 12px 30px rgba(19, 33, 46, .08);
  --atbi-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--atbi-paper);
  color: var(--atbi-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--atbi-blue); }
button, input { font: inherit; }
button { color: inherit; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  top: 8px; left: 8px; z-index: 10000; width: auto; height: auto; padding: 12px 16px;
  clip: auto; background: var(--atbi-white); color: var(--atbi-ink); border-radius: 6px;
}
.site-shell { width: min(calc(100% - 40px), var(--atbi-width)); margin-inline: auto; }

/* Header */
.site-header { position: relative; z-index: 20; background: var(--atbi-white); border-bottom: 1px solid var(--atbi-line); }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px 15px; }
.site-brand { display: flex; align-items: center; gap: 13px; min-width: 260px; }
.brand-mark {
  display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px;
  background: var(--atbi-blue); color: var(--atbi-white); border-radius: 12px;
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
}
.brand-copy strong { display: block; font-size: 1.28rem; line-height: 1.1; letter-spacing: -.03em; }
.brand-copy span { display: block; margin-top: 4px; color: var(--atbi-muted); font-size: .72rem; line-height: 1.2; }
.header-tools { display: flex; align-items: center; gap: 10px; }
.search-toggle, .menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  padding: 0; border: 1px solid var(--atbi-line); border-radius: 50%; background: var(--atbi-white); cursor: pointer;
}
.search-toggle:hover, .menu-toggle:hover { border-color: var(--atbi-blue); color: var(--atbi-blue); }
.menu-toggle { display: none; }
.header-search { position: relative; width: min(280px, 27vw); }
.header-search input {
  width: 100%; padding: 10px 42px 10px 14px; border: 1px solid var(--atbi-line); border-radius: 10px;
  background: var(--atbi-paper); color: var(--atbi-ink);
}
.header-search button {
  position: absolute; inset: 0 2px 0 auto; width: 40px; border: 0; background: transparent; color: var(--atbi-muted); cursor: pointer;
}
.primary-nav { display: flex; align-items: center; gap: 28px; min-height: 50px; font-size: .86rem; font-weight: 700; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 50px; border-bottom: 3px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .is-current { color: var(--atbi-blue); border-bottom-color: var(--atbi-blue); }
.standards-watch { background: var(--atbi-soft); border-bottom: 1px solid var(--atbi-line); }
.watch-inner { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: .8rem; }
.watch-label { color: var(--atbi-blue); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.watch-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-arrow { margin-left: auto; color: var(--atbi-blue); font-weight: 800; }

/* Shared */
.site-main { padding-block: 28px 56px; }
.eyebrow { color: var(--atbi-blue); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.story-meta { color: var(--atbi-muted); font-size: .75rem; }
.section-heading { display: flex; align-items: center; gap: 16px; margin: 30px 0 16px; }
.section-heading h2 { margin: 0; font-size: 1.28rem; line-height: 1.2; letter-spacing: -.025em; }
.section-heading::after { content: ""; height: 1px; flex: 1; background: var(--atbi-line); }
.section-link { color: var(--atbi-blue); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.story-image { overflow: hidden; background: #dce6ed; }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
a:hover .story-image img { transform: scale(1.025); }
.empty-image {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px;
  background: linear-gradient(135deg, #d8e8f4, #bcd5e7); color: var(--atbi-blue-dark); font-size: 1.4rem; font-weight: 800;
}

/* Front page */
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.topic-card {
  position: relative; min-height: 88px; padding: 16px 42px 15px 16px; background: var(--atbi-white);
  border: 1px solid var(--atbi-line); border-radius: 12px; box-shadow: 0 4px 14px rgba(19, 33, 46, .035);
}
.topic-card:hover { border-color: color-mix(in srgb, var(--atbi-blue) 45%, var(--atbi-line)); box-shadow: var(--atbi-shadow); }
.topic-card strong { display: block; font-size: .9rem; line-height: 1.2; }
.topic-card span { display: block; margin-top: 5px; color: var(--atbi-muted); font-size: .7rem; line-height: 1.25; }
.topic-card b { position: absolute; top: 14px; right: 15px; color: var(--atbi-blue); font-size: 1.05rem; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(330px, .66fr); gap: 22px; }
.lead-story {
  position: relative; min-height: 500px; overflow: hidden; border-radius: 17px; background: var(--atbi-ink); color: var(--atbi-white);
}
.lead-story > a { display: flex; min-height: 500px; align-items: flex-end; color: inherit; }
.lead-story .story-image { position: absolute; inset: 0; }
.lead-story .story-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,13,22,.06) 18%, rgba(4,13,22,.92) 92%); }
.lead-story-content { position: relative; z-index: 2; width: 100%; padding: 30px; }
.lead-story .eyebrow { color: #93caff; }
.lead-story h1 { max-width: 830px; margin: 8px 0 10px; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.03; letter-spacing: -.045em; }
.lead-story p { max-width: 720px; margin: 0 0 12px; color: #dce8ef; font-size: .96rem; line-height: 1.5; }
.lead-story .story-meta { color: #c7d5de; }
.side-stories { display: grid; gap: 13px; }
.side-story > a {
  display: grid; grid-template-columns: 126px 1fr; gap: 14px; min-height: 150px; padding: 12px;
  background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: 13px;
}
.side-story .story-image { min-height: 124px; border-radius: 9px; }
.side-story h2 { margin: 6px 0 8px; font-size: 1rem; line-height: 1.2; letter-spacing: -.02em; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { overflow: hidden; background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: var(--atbi-radius); }
.news-card .story-image { height: 190px; }
.news-card-content { padding: 16px; }
.news-card h3 { margin: 7px 0 9px; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.02em; }

/* Archives and search */
.archive-header { margin: 4px 0 26px; padding: 26px; background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: var(--atbi-radius); }
.archive-header h1 { margin: 4px 0 8px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.04em; }
.archive-header p { max-width: 760px; margin: 0; color: var(--atbi-muted); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 6px 11px; background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: 8px; }
.pagination .current { background: var(--atbi-blue); color: var(--atbi-white); border-color: var(--atbi-blue); }
.no-results { padding: 28px; background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: var(--atbi-radius); }

/* Single articles */
.article-shell { width: min(calc(100% - 40px), 900px); margin-inline: auto; }
.article-header { padding: 20px 0 24px; }
.breadcrumbs { margin-bottom: 18px; color: var(--atbi-muted); font-size: .75rem; }
.breadcrumbs a { color: var(--atbi-blue); }
.article-header h1 { margin: 8px 0 14px; font-size: clamp(2.35rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.article-deck { margin: 0 0 15px; color: var(--atbi-muted); font-size: 1.08rem; line-height: 1.55; }
.article-byline { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--atbi-muted); font-size: .78rem; }
.article-byline strong { color: var(--atbi-ink); }
.article-hero { width: min(calc(100% - 40px), 1100px); margin: 0 auto 34px; overflow: hidden; border-radius: 16px; background: #dce6ed; }
.article-hero img { width: 100%; max-height: 660px; object-fit: cover; }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; line-height: 1.78; }
.article-content > * { max-width: 760px; margin-inline: auto; }
.article-content p { margin-top: 0; margin-bottom: 1.25em; }
.article-content h2, .article-content h3, .article-content h4 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.13; letter-spacing: -.035em; }
.article-content h2 { margin-top: 2em; margin-bottom: .6em; font-size: 1.8rem; }
.article-content h3 { margin-top: 1.7em; margin-bottom: .55em; font-size: 1.4rem; }
.article-content a { color: var(--atbi-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-content ul, .article-content ol { padding-left: 1.35em; }
.article-content figure, .article-content > img { max-width: 980px; margin: 2em auto; }
.article-content figure img, .article-content > img { width: 100%; border-radius: 10px; }
.article-content blockquote { padding: 4px 0 4px 22px; border-left: 4px solid var(--atbi-blue); color: #354957; font-size: 1.2em; font-style: italic; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; margin: 34px auto 0; padding-top: 22px; border-top: 1px solid var(--atbi-line); }
.article-tags a { padding: 6px 10px; background: var(--atbi-soft); color: var(--atbi-blue-dark); border-radius: 999px; font-size: .72rem; font-weight: 700; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Pages */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; }
.page-card { padding: clamp(24px, 5vw, 54px); background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: var(--atbi-radius); }
.page-card h1 { margin: 0 0 22px; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.page-card h2 { margin-top: 1.7em; line-height: 1.15; }
.page-card a { color: var(--atbi-blue); text-decoration: underline; }
.page-aside { align-self: start; padding: 22px; background: var(--atbi-ink); color: var(--atbi-white); border-radius: var(--atbi-radius); }
.page-aside h2 { margin-top: 0; font-size: 1.2rem; }
.page-aside p { color: #cfdae1; font-size: .86rem; }

/* Footer */
.site-footer { margin-top: 24px; background: var(--atbi-ink); color: var(--atbi-white); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 40px; padding-block: 44px 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-copy { margin-top: 16px; max-width: 520px; color: #bdcbd4; font-size: .82rem; }
.footer-title { margin: 0 0 13px; color: #8fc6f3; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.footer-links { display: grid; gap: 8px; color: #e3ebf0; font-size: .82rem; }
.footer-bottom { padding-block: 18px; border-top: 1px solid #314453; color: #aebdc7; font-size: .7rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 22px; }

@media (max-width: 960px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-grid { grid-template-columns: 1fr; }
  .side-stories { grid-template-columns: repeat(3, 1fr); }
  .side-story > a { grid-template-columns: 1fr; }
  .side-story .story-image { min-height: 150px; }
  .archive-grid, .news-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; }
  .page-aside { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-shell, .article-shell, .article-hero { width: min(calc(100% - 28px), var(--atbi-width)); }
  .header-main { padding-block: 15px; }
  .site-brand { min-width: 0; }
  .brand-mark { width: 43px; height: 43px; flex-basis: 43px; }
  .brand-copy strong { font-size: 1.05rem; }
  .brand-copy span { display: none; }
  .header-search { display: none; position: absolute; top: 70px; left: 14px; right: 14px; z-index: 30; width: auto; padding: 12px; background: var(--atbi-white); border: 1px solid var(--atbi-line); border-radius: 12px; box-shadow: var(--atbi-shadow); }
  .header-search.is-open { display: block; }
  .search-toggle, .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; padding: 8px 0 16px; align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { min-height: 44px; border-bottom: 1px solid var(--atbi-line); }
  .watch-inner { min-height: 41px; }
  .watch-label { flex: 0 0 auto; }
  .lead-story, .lead-story > a { min-height: 450px; }
  .lead-story-content { padding: 23px; }
  .side-stories { grid-template-columns: 1fr; }
  .side-story > a { grid-template-columns: 115px 1fr; }
  .side-story .story-image { min-height: 120px; }
  .archive-grid, .news-grid, .related-grid { grid-template-columns: 1fr; }
  .news-card .story-image { height: 220px; }
  .article-header h1 { font-size: clamp(2.25rem, 11vw, 3.6rem); }
  .article-content { font-size: 1.04rem; }
  .article-content figure, .article-content > img { width: calc(100% + 12px); margin-left: -6px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

