/* ============================================================
   TVDXA — Tennessee Valley DX Association
   Palette matched to the TVDXA DX Calendar aesthetic:
   deep teal backgrounds, amber/gold accents, crisp whites.
   Signature: animated propagation-band header strip.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ── Tokens (calendar-matched palette) ──────────────────── */
:root {
  --bg:        #0a1628;      /* deep navy — calendar page bg   */
  --bg-mid:    #0f2035;      /* card / nav bg                  */
  --bg-card:   #132840;      /* raised card surface            */
  --teal:      #1a4a5e;      /* calendar header teal           */
  --teal-lt:   #1e5f78;      /* hover teal                     */
  --amber:     #d4a843;      /* calendar gold/amber accent     */
  --amber-lt:  #e0bc6a;      /* lighter amber for hover        */
  --cyan:      #4db8d4;      /* calendar link / highlight cyan */
  --white:     #e8f0f7;      /* off-white body text            */
  --muted:     #7a9bb5;      /* subdued text                   */
  --border:    #1e3a52;      /* subtle border                  */
  --green:     #3dba7e;      /* success / good status          */

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 4px;
  --max-w:  1100px;
  --nav-h:  64px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--white);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* page-hero + main together fill remaining space so footer is always at bottom */
.page-hero, section.home-hero { flex-shrink: 0; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--amber-lt); }

/* ── Propagation Band (signature) ───────────────────────── */
.prop-band {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #7b2fff 0%,
    #3a6fff 12%,
    var(--cyan) 25%,
    var(--green) 38%,
    var(--amber) 52%,
    #e07b10 66%,
    #ff4c4c 80%,
    #ff90c8 100%
  );
  background-size: 200% 100%;
  animation: bandshift 8s linear infinite;
}
@keyframes bandshift {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ── Navigation ──────────────────────────────────────────── */
nav {
  background: var(--bg-mid);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 1.5rem;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-logo-call {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.05em;
}
.nav-logo-name {
  font-size: 0.62rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Nav links — left-aligned group, About Us pushed to far right */
.nav-links {
  display: flex;
  list-style: none;
  flex: 1;
  align-items: center;
}
.nav-links .spacer { flex: 1; }  /* pushes About Us to far right */

.nav-links > li { position: relative; }
.nav-links > li > a,
.nav-links > li > span {
  display: block;
  padding: 0 0.85rem;
  height: var(--nav-h);
  line-height: var(--nav-h);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.nav-links > li > a:hover,
.nav-links > li > span:hover,
.nav-links > li > a.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
  text-decoration: none;
}

/* About Us — same style as all other nav links, just pushed right by .spacer */
/* No special overrides needed; inherits from .nav-links > li > a */

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(var(--nav-h) - 1px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--amber);
  min-width: 210px;
  z-index: 200;
  list-style: none;
  padding: 0.5rem 0;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--white);
  border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.dropdown-menu li a:hover {
  background: var(--teal);
  border-left-color: var(--amber);
  text-decoration: none;
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); }

/* ── Page Hero ───────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--bg-mid) 0%, var(--teal) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--white);
  letter-spacing: -0.02em;
}
.page-hero h1 span { color: var(--amber); }
.page-hero p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Content Layout ──────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
main { padding: 3rem 0 4rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── Typography ──────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
h2 {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}
h3 { font-size: 1.1rem; font-weight: 600; color: var(--white); margin-bottom: 0.5rem; }
p { color: var(--muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
  text-decoration: none;
}
.btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #0a1628; }
.btn-outline { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.btn-teal    { background: var(--teal); color: var(--white); border: 1px solid var(--teal-lt); }

/* ── Home Hero ───────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(160deg, var(--bg) 0%, var(--teal) 100%);
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%231a4a5e' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.home-hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.home-hero-callsign {
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
  /* retained for text fallback if image fails to load */
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px rgba(212,168,67,0.4);
}
.home-hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--white);
  margin-top: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}
.home-hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* About grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Report list */
.report-list { list-style: none; }
.report-list li { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.report-list li:first-child { padding-top: 0; }
.report-list li a { color: var(--white); font-weight: 600; font-size: 0.9rem; transition: color 0.15s; }
.report-list li a:hover { color: var(--amber); text-decoration: none; }
.report-list li .report-meta { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); margin-top: 0.2rem; }

/* ── Meetings ────────────────────────────────────────────── */
.meeting-type { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.meeting-type:last-child { border-bottom: none; }
.meeting-icon { font-size: 2rem; flex-shrink: 0; width: 2.5rem; text-align: center; margin-top: 0.15rem; }
.meeting-detail strong { display: block; color: var(--amber); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.25rem; }

/* ── Contact Form ────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; font-family: var(--font-mono); }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.65rem 0.9rem; color: var(--white); font-family: var(--font-sans); font-size: 0.9rem; transition: border-color 0.15s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--amber); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-success { display: none; background: #0d3320; border: 1px solid #1a6640; border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--green); margin-top: 1rem; font-family: var(--font-mono); font-size: 0.875rem; }

/* ── DX Cluster ──────────────────────────────────────────── */
.cluster-terminal { background: #040d14; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; font-family: var(--font-mono); font-size: 0.85rem; }
.cluster-terminal .term-label { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.cluster-terminal .term-line { margin: 0.2rem 0; }
.cluster-terminal .term-key { color: var(--amber); }
.cluster-terminal .term-val { color: var(--green); }
.cluster-web { width: 100%; height: 500px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 1.5rem; }

/* ── Solar ───────────────────────────────────────────────── */
.solar-embed-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0.5rem; }
.solar-embed-wrap img { max-width: 100%; height: auto; }

/* ── Photos ──────────────────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.photo-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photo-card img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s; }
.photo-card:hover img { transform: scale(1.03); }
.photo-card-caption { padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }

/* ── Report Articles ─────────────────────────────────────── */
.report-article h1 { font-size: clamp(1.3rem, 3.5vw, 2rem); margin-bottom: 0.5rem; }
.report-article .byline { font-family: var(--font-mono); font-size: 0.75rem; color: var(--amber); letter-spacing: 0.08em; margin-bottom: 1.5rem; }
.report-article p { color: #a8c4d8; line-height: 1.8; margin-bottom: 1.25rem; }

.qso-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.8rem; margin: 1.5rem 0; }
.qso-table th { background: var(--teal); color: var(--white); padding: 0.5rem 0.75rem; text-align: left; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.qso-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--muted); }
.qso-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.qso-table tfoot td { border-top: 2px solid var(--amber); color: var(--white); font-weight: 600; }

.score-history { list-style: none; }
.score-history li { display: flex; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.score-history li .sh-year { color: var(--amber); font-weight: 600; width: 3rem; flex-shrink: 0; }
.score-history li .sh-score { color: var(--white); }

/* ── Leadership ──────────────────────────────────────────── */
.leader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.leader-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.leader-card .leader-call { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; color: var(--amber); }
.leader-card .leader-name { font-size: 0.875rem; color: var(--white); margin: 0.25rem 0; }
.leader-card .leader-title { font-size: 0.75rem; color: var(--muted); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--bg-mid);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin: 0.35rem 0; }
.footer-col ul li a { font-size: 0.85rem; color: var(--muted); }
.footer-col ul li a:hover { color: var(--white); text-decoration: none; }
.footer-col p { font-size: 0.85rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.25rem; font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); text-align: center; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--white); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-links .spacer { display: none; }
  .nav-links > li > a, .nav-links > li > span {
    height: auto; line-height: 1;
    padding: 0.75rem 1.5rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .nav-links > li > a:hover, .nav-links > li > span:hover {
    border-left-color: var(--amber);
    border-bottom: none;
  }
  /* About Us inherits standard mobile nav link style */
  .dropdown-menu { display: block; position: static; border: none; border-top: none; background: transparent; padding: 0; }
  .dropdown-menu li a { padding: 0.5rem 2.5rem; font-size: 0.8rem; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .prop-band { animation: none; }
  * { transition: none !important; }
}
