/*
Theme Name: Keystone Power
Theme URI: https://keystonepower.org
Author: Keystone Power Inc.
Author URI: https://keystonepower.org
Description: Custom theme for Keystone Power Inc. — electric transmission and distribution engineering, project management, and construction management. All page text is editable from the WordPress dashboard (Pages).
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: keystone-power
*/

:root {
  --ink: #0a2745;
  --muted: #4b5f70;
  --paper: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #dfe8ee;
  --nav: #082644;
  --nav-2: #0d3157;
  --line: #bccad4;
  --brand: #1f6fb2;
  --brand-dark: #145184;
  --brand-light: #8fb4cf;
  --silver: #b7bdc0;
  --shadow: 0 18px 42px rgba(8, 38, 68, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.6rem; font-weight: 600; }

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

/* ---------- Top bar & header ---------- */
.topbar {
  background: var(--nav);
  color: #dfe8ee;
  font-size: .85rem;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .45rem 1.25rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; }
.brand img { height: 72px; width: auto; }
.brand-name {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--nav);
  line-height: 1;
}
.brand-tag {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.main-nav a {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--nav);
  text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a { color: var(--brand); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero img.hero-img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 38, 68, .88) 0%, rgba(8, 38, 68, .55) 55%, rgba(8, 38, 68, .15) 100%);
}
.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-inner h1 { color: #fff; max-width: 640px; }
.hero-inner p { max-width: 600px; font-size: 1.15rem; color: #e6eef4; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  padding: .7rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--brand-dark); }
.btn-outline {
  display: inline-block;
  border: 2px solid #fff;
  color: #fff !important;
  padding: .65rem 1.35rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.btn-outline:hover { background: rgba(255, 255, 255, .15); }

/* ---------- Layout & sections ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.page-head { padding: 2.5rem 0 1rem; }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 760px; }
.entry-content { padding: 1rem 0 3rem; }

.section { padding: 2.2rem 0; }
.section-kicker {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: .3rem;
}
.section-lead { color: var(--muted); font-size: 1.15rem; max-width: 760px; }

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.fact strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.25rem; }
.fact span { color: var(--muted); font-size: .95rem; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 8px;
  padding: 1.4rem 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.service-card .num {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-light);
}
.service-card p { color: var(--muted); margin-bottom: 0; }

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.principle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem;
}
.principle .num {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
}
.principle p { color: var(--muted); margin-bottom: 0; }

.leader-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.leader-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.leader-card .role {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
}
.leader-card p { color: var(--muted); }

.role-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.role-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 6px;
  padding: .9rem 1.2rem;
  margin-bottom: .7rem;
  font-weight: 600;
}

.cta-band {
  background: var(--nav);
  color: #fff;
  border-radius: 10px;
  padding: 2rem 2.2rem;
  margin: 2.5rem 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #dfe8ee; max-width: 700px; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  max-width: 560px;
}
.contact-card p { margin: .4rem 0; color: var(--muted); }
.contact-card strong { color: var(--ink); }

.note { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--nav);
  color: #dfe8ee;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}
.site-footer h3 { color: #fff; }
.site-footer a { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding: 1rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
  font-size: .85rem;
  color: #b9c9d4;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fact-strip, .service-grid, .principle-grid, .leader-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .hero img.hero-img { height: 380px; }
  .brand img { height: 56px; }
}
