/*
Theme Name: WX5KR
Theme URI: https://wx5kr.com/
Author: Kori Rahman
Description: A clean, responsive amateur-radio profile theme created for WX5KR.com.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wx5kr
Tags: custom-logo, custom-menu, featured-images, accessibility-ready, one-column
*/

:root {
  --ink: #18242d;
  --muted: #5c6972;
  --blue: #175c78;
  --blue-dark: #103f53;
  --blue-soft: #eaf3f6;
  --line: #d8e0e4;
  --paper: #ffffff;
  --wash: #f5f7f8;
  --max: 1160px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover, a:focus { color: var(--blue-dark); }
img { display: block; max-width: 100%; height: auto; }

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

.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  background: #fff;
  z-index: 9999;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-branding { display: flex; align-items: center; gap: 0.8rem; }
.custom-logo { max-height: 54px; width: auto; }
.site-title { margin: 0; font-size: 1.65rem; line-height: 1; letter-spacing: 0.04em; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-description { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

.menu-toggle {
  display: none;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.primary-menu, .primary-menu ul {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--blue); }

.site-main { min-height: 60vh; }
.content-width { width: min(calc(100% - 2rem), 820px); margin: 0 auto; }
.wide-width { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }

.page-shell { padding: clamp(2.75rem, 6vw, 5.5rem) 0; }
.page-header { margin-bottom: 2.4rem; }
.page-kicker { margin: 0 0 0.55rem; color: var(--blue); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.page-title { margin: 0; max-width: 860px; font-size: clamp(2.3rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.045em; }
.page-intro { max-width: 760px; margin: 1.2rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }

.entry-content > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--max); }
.entry-content > .alignfull { max-width: none; }
.entry-content h2 { margin-top: 3.5rem; margin-bottom: 0.9rem; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.12; letter-spacing: -0.025em; }
.entry-content h3 { margin-top: 2.25rem; margin-bottom: 0.65rem; font-size: 1.35rem; line-height: 1.25; }
.entry-content p, .entry-content ul { margin-top: 0; margin-bottom: 1.2rem; }
.entry-content li + li { margin-top: 0.42rem; }
.entry-content blockquote { padding-left: 1.25rem; border-left: 4px solid var(--blue); color: var(--muted); }

.home-hero {
  padding: clamp(3.5rem, 8vw, 7rem) 0;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-call { margin: 0 0 0.75rem; color: var(--blue); font-size: 0.86rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.home-hero h1 { margin: 0; font-size: clamp(2.7rem, 6.5vw, 5.5rem); line-height: 0.98; letter-spacing: -0.055em; }
.hero-lede { max-width: 720px; margin: 1.35rem 0 0; color: #34434d; font-size: clamp(1.1rem, 2vw, 1.34rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.button-link { display: inline-block; padding: 0.72rem 1rem; border: 2px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; }
.button-link.secondary { background: transparent; color: var(--blue); }
.button-link:hover, .button-link:focus { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

.wx5kr-photo { margin: 2rem auto; }
.wx5kr-photo img { width: 100%; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: #dfe8ec; }
.wx5kr-photo.landscape img { aspect-ratio: 3 / 2; }
.wx5kr-photo.wide img { aspect-ratio: 16 / 9; }
.wx5kr-photo.portrait { max-width: 520px; }
.wx5kr-photo.portrait img { aspect-ratio: 4 / 5; }
.wx5kr-photo figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.86rem; }
.home-hero .wx5kr-photo { margin: 0; }

.section-band { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-band.alt { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { margin: 0 0 0.7rem; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -0.035em; }
.section-lede { max-width: 760px; margin: 0 0 2rem; color: var(--muted); font-size: 1.1rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 1.45rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.info-card h3 { margin: 0 0 0.55rem; font-size: 1.25rem; }
.info-card p { margin: 0 0 0.9rem; color: var(--muted); }
.info-card p:last-child { margin-bottom: 0; }
.info-card .meta { color: var(--blue); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }

.fact-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.fact { padding: 1.25rem; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong { display: block; font-size: 1.05rem; }
.fact span { color: var(--muted); font-size: 0.88rem; }

.split-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; margin-top: 2.5rem; margin-bottom: 2.5rem; }
.split-section.reverse > :first-child { order: 2; }
.split-section.reverse > :last-child { order: 1; }
.split-section .wx5kr-photo { margin: 0; }

.notice { padding: 1rem 1.1rem; border-left: 4px solid var(--blue); background: var(--blue-soft); }
.status-label { display: inline-block; margin-bottom: 0.7rem; padding: 0.22rem 0.5rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.contact-form { margin-top: 2rem; padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--wash); }
.contact-form label { display: block; margin-bottom: 0.35rem; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; margin-bottom: 1rem; padding: 0.75rem; border: 1px solid #aebbc2; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; }
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form button { padding: 0.75rem 1rem; border: 0; border-radius: 7px; background: var(--blue); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.contact-form button:hover, .contact-form button:focus { background: var(--blue-dark); }
.contact-status { padding: 0.9rem 1rem; border-radius: 8px; background: var(--blue-soft); }
.contact-honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { padding: 2.4rem 0; border-top: 1px solid var(--line); background: var(--wash); color: var(--muted); font-size: 0.9rem; }
.footer-inner { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; }
.site-footer p { margin: 0; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-block; }
  .main-navigation { position: relative; }
  .primary-menu { display: none; position: absolute; right: 0; top: calc(100% + 0.7rem); width: min(320px, calc(100vw - 2rem)); padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(24, 36, 45, 0.12); }
  .primary-menu.is-open { display: block; }
  .primary-menu li + li { margin-top: 0.65rem; }
  .home-hero-grid, .split-section { grid-template-columns: 1fr; }
  .home-hero .wx5kr-photo { max-width: 620px; }
  .split-section.reverse > :first-child, .split-section.reverse > :last-child { order: initial; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { min-height: 68px; }
  .site-description { display: none; }
  .card-grid, .card-grid.two, .fact-strip { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .footer-inner { display: block; }
  .footer-inner p + p { margin-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
