/*
Theme Name:   Atlantis County
Theme URI:    https://capitoltechsolutions.com/
Author:       Capitol Tech Solutions
Description:  Demonstration theme for the fictional County of Atlantis, California. Built to showcase website and PDF accessibility remediation. This theme INTENTIONALLY contains accessibility defects — see docs/DEFECT-MANIFEST.md before changing anything.
Version:      1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License:      Proprietary – internal demo use only
Text Domain:  atlantis-county
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --navy:       #0b3c5d;
  --navy-dark:  #072a42;
  --teal:       #1d7874;
  --teal-light: #e3f1ef;
  --sand:       #f6f1e7;
  --gold:       #d9a441;
  --ink:        #1f2a33;
  --muted:      #5b6b78;
  --line:       #d9e1e7;
  --white:      #ffffff;
  --alert:      #b4432e;

  --radius:     10px;
  --shadow:     0 6px 20px rgba(11, 60, 93, .10);
  --max:        1200px;

  --font-sans:  "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --font-serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

/* DEMO DEFECT D-T03 (WCAG 2.4.7): focus indicators removed globally. */
a:focus, button:focus, input:focus, select:focus, .nav-toggle:focus { outline: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
  margin: 1.6em 0 .6em;
}
h1 { font-size: 2.4rem; margin-top: 0; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ==========================================================================
   Demo banner (kept accessible on purpose — this must always be readable)
   ========================================================================== */
.demo-banner {
  background: #2b2b2b;
  color: #ffffff;
  text-align: center;
  font-size: .85rem;
  padding: 6px 16px;
}
.demo-banner strong { color: #ffd479; }

/* ==========================================================================
   Top utility bar
   ========================================================================== */
.topbar { background: var(--navy-dark); color: #cfe0ec; font-size: .875rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; flex-wrap: wrap; }
.topbar a { color: #ffffff; text-decoration: none; }
.topbar-links { display: flex; gap: 20px; flex-wrap: wrap; }

.topbar-search { display: flex; }
.topbar-search input {
  border: 0; border-radius: 6px 0 0 6px; padding: 6px 10px; width: 210px; font: inherit; font-size: .85rem;
}
.topbar-search button {
  border: 0; border-radius: 0 6px 6px 0; background: var(--gold); padding: 0 10px; cursor: pointer;
  display: flex; align-items: center;
}

/* ==========================================================================
   Header + navigation
   ========================================================================== */
.site-header { background: var(--white); border-bottom: 4px solid var(--gold); position: relative; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand img { width: 68px; height: 68px; }
.brand-name { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; line-height: 1.1; display: block; }
.brand-sub { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); display: block; margin-top: 3px; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: block; padding: 12px 14px; color: var(--navy); text-decoration: none; font-weight: 600; border-radius: 6px;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { background: var(--teal-light); color: var(--teal); }

/* Dropdowns open on hover only. DEMO DEFECT D-T07 (WCAG 2.1.1): sub-menus are not keyboard reachable. */
.primary-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--white);
  box-shadow: var(--shadow); border-radius: 0 0 8px 8px; padding: 6px; flex-direction: column;
}
.primary-nav li:hover > .sub-menu { display: flex; }

.nav-toggle { display: none; font-size: 1.8rem; color: var(--navy); cursor: pointer; padding: 6px 10px; user-select: none; }

/* ==========================================================================
   Alert ticker — DEMO DEFECT D-T08 (WCAG 2.2.2): auto-scrolling, no pause control.
   ========================================================================== */
.alert-ticker { background: var(--alert); color: #fff; overflow: hidden; white-space: nowrap; font-size: .95rem; }
.alert-ticker .ticker-track { display: inline-block; padding: 9px 0; animation: ticker 32s linear infinite; padding-left: 100%; }
.alert-ticker span { margin-right: 80px; }
.alert-ticker b { color: #ffe08a; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; color: #fff; min-height: 460px; display: flex; align-items: center;
  background: var(--navy) url("assets/img/hero.jpg") center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,42,66,.85) 0%, rgba(7,42,66,.35) 65%, rgba(7,42,66,0) 100%); }
.hero .container { position: relative; width: 100%; }
.hero h1 { color: #fff; font-size: 3rem; max-width: 640px; margin: 0 0 12px; }
.hero p { font-size: 1.2rem; max-width: 560px; margin: 0 0 26px; color: #e6f0f6; }

.hero-finder { display: flex; gap: 10px; max-width: 520px; background: rgba(255,255,255,.12); padding: 10px; border-radius: var(--radius); backdrop-filter: blur(3px); }
.hero-finder select { flex: 1; padding: 12px; font: inherit; border-radius: 6px; border: 0; }

/* ==========================================================================
   Quick links
   ========================================================================== */
.quick-links { margin-top: -60px; position: relative; z-index: 5; }
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.quick-tile {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 12px; text-align: center;
  text-decoration: none; color: var(--navy); font-weight: 600; transition: transform .15s ease, box-shadow .15s ease;
  border-top: 4px solid var(--teal);
}
.quick-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(11,60,93,.18); color: var(--teal); }
.quick-tile svg { width: 40px; height: 40px; margin: 0 auto 10px; display: block; stroke: var(--teal); }
.quick-tile.is-gold { border-top-color: var(--gold); }

/* ==========================================================================
   Home sections
   ========================================================================== */
.section { padding: 64px 0; }
.section-sand { background: var(--sand); }
.section-title { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }

.meeting-list { list-style: none; margin: 0; padding: 0; }
.meeting-list li { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.date-chip { background: var(--navy); color: #fff; border-radius: 8px; text-align: center; min-width: 64px; padding: 6px 4px; line-height: 1.1; }
.date-chip .m { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; display: block; }
.date-chip .d { font-size: 1.6rem; font-weight: 700; font-family: var(--font-serif); display: block; }
.meeting-list .meta { color: var(--muted); font-size: .9rem; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.news-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 1.2rem; margin: 0; }
.news-card h3 a { color: var(--navy); text-decoration: none; }
.news-card .date { color: var(--muted); font-size: .85rem; }
.news-card .more { margin-top: auto; font-weight: 600; }

.stat-strip { background: var(--navy); color: #fff; }
.stat-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 40px; padding-bottom: 40px; text-align: center; }
.stat-strip .n { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 700; color: var(--gold); display: block; }
.stat-strip .l { font-size: .95rem; color: #d4e3ee; }

/* ==========================================================================
   Interior pages
   ========================================================================== */
.page-banner { background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 100%); color: #fff; padding: 44px 0 38px; }
.page-banner h1 { color: #fff; margin: 0; }
.breadcrumbs { font-size: .875rem; margin-bottom: 10px; color: #cfe3ea; }
.breadcrumbs a { color: #fff; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 48px 0 72px; }
.page-layout.full { grid-template-columns: minmax(0, 1fr); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 8px; margin: 1.2em 0; }
.entry-content blockquote { border-left: 4px solid var(--gold); margin: 1.5em 0; padding: .5em 1.2em; background: var(--sand); }

.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content table tr:first-child td,
.entry-content thead th { background: var(--navy); color: #fff; font-weight: 700; }
.entry-content tbody tr:nth-child(even) td { background: #f7fafb; }

.btn {
  display: inline-block; background: var(--teal); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: 8px;
  font-weight: 700; border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-dark); }

.callout { background: var(--teal-light); border-radius: var(--radius); padding: 22px 24px; margin: 1.5em 0; }
.callout-warn { background: #fdf1e3; border-left: 5px solid var(--gold); }

/* DEMO DEFECT D-C14 (WCAG 1.4.3): "fine print" class used in content is low contrast. */
.fine-print { color: #a3adb5; font-size: .8rem; }

.sidebar .widget { background: var(--sand); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.sidebar .widget h2 { font-size: 1.15rem; margin: 0 0 10px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }

.simple-form { display: grid; gap: 12px; max-width: 520px; }
.simple-form input, .simple-form select { padding: 11px 12px; border: 1px solid #c9d3da; border-radius: 6px; font: inherit; }
.simple-form .req { border-color: #d9534f; }

.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.4em; }
.post-list article { display: grid; grid-template-columns: 280px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 6px; font-size: 1.45rem; }
.post-list h2 a { color: var(--navy); text-decoration: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: #d4e3ee; font-size: .95rem; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 54px 0 36px; }
.site-footer h2 { color: #fff; font-size: 1.1rem; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-brand img { width: 64px; margin-bottom: 10px; }

.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.social svg { width: 18px; height: 18px; fill: #fff; }

/* DEMO DEFECT D-T10 (WCAG 1.4.3): legal bar text fails contrast on navy. */
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .82rem; color: #3f6a8a; }
.footer-legal a { color: #4f7a99; }
.footer-legal .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; padding: 10px; }
  .primary-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .stat-strip .container { grid-template-columns: repeat(2, 1fr); }
  .post-list article { grid-template-columns: 1fr; }
  .topbar-search input { width: 150px; }
}
@media (max-width: 560px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.25rem; }
  .brand img { width: 52px; height: 52px; }
}
