@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Reset & Variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #ffffff;
  --bg-alt:       #f7f8fb;
  --bg-card:      #ffffff;
  --text:         #1a202c;
  --muted:        #5a6a85;
  --navy:         #0f2557;
  --navy-light:   #1d3a78;
  --blue:         #1d4ed8;
  --blue-dim:     rgba(29, 78, 216, 0.06);
  --amber:        #92400e;
  --border:       #dde3ed;
  --border-str:   #b8c2d6;
  --shadow-xs:    0 1px 2px rgba(15, 37, 87, 0.05);
  --shadow-sm:    0 1px 4px rgba(15, 37, 87, 0.07), 0 1px 2px rgba(15, 37, 87, 0.04);
  --shadow:       0 4px 16px rgba(15, 37, 87, 0.10), 0 1px 4px rgba(15, 37, 87, 0.05);
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'Courier New', Courier, monospace;
  --nav-h:        72px;
  --r:            5px;
  --max-w:        1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--navy); }
img { max-width: 100%; display: block; }

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(1.75rem, 4vw, 2.625rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; }

.section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-left: 0.625rem;
  border-left: 2px solid var(--navy);
  line-height: 1;
}

/* Hide the SVG dots inside section labels from the previous version */
.section-label svg { display: none; }

.section-title { margin-bottom: 0.75rem; }

.section-intro {
  color: var(--muted);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.75;
}

/* ─── Layout ────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.divider { height: 1px; background: var(--border); margin: 3rem 0; }

/* ─── Navigation ────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 52px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--navy); background: var(--blue-dim); }

.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
  background: var(--blue-dim);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 760px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.5rem 1.5rem;
    gap: 0;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; }

  .nav-links a {
    padding: 0.875rem 0.25rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .nav-links li:last-child a { border-bottom: none; }

  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.hero-content { flex: 1; min-width: 0; }

.hero-emblem { flex-shrink: 0; }

.hero-emblem img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 0.35rem 0.875rem;
  border: 1px solid var(--border-str);
  border-radius: 100px;
  margin-bottom: 1.5rem;
  background: var(--bg-alt);
}

.blink-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: blinkDot 2.2s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero h1 { margin-bottom: 0.875rem; }

.hero .tagline {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.hero .intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 560px;
}

@media (max-width: 700px) {
  .hero-inner { flex-direction: column-reverse; gap: 2.5rem; }
  .hero-emblem img { width: 140px; height: 140px; }
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-row { display: flex; gap: 0.875rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.375rem;
  border-radius: var(--r);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn-primary:hover {
  background: var(--navy-light);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 37, 87, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-str);
}

.btn-outline:hover {
  background: var(--bg-alt);
  border-color: var(--navy);
  color: var(--navy);
}

/* ─── Page Header (inner pages) ─────────────────────────────────────────────── */
.page-header {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.page-header h1 { margin-bottom: 0.625rem; }
.page-header .lead { color: var(--muted); font-size: 1rem; max-width: 620px; margin-top: 0.5rem; }


/* ─── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--bg-alt);
}

.data-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-alt); }

.callsign {
  font-family: var(--mono);
  color: var(--amber);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
}

/* ─── Spec Table (Repeater) ─────────────────────────────────────────────────── */
.spec-table th {
  width: 42%;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 600;
}

/* ─── Frequency Display ─────────────────────────────────────────────────────── */
.freq-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0 2.5rem;
}

.freq-card {
  background: var(--navy);
  border-radius: var(--r);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.freq-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.625rem;
}

.freq-value {
  font-family: var(--mono);
  font-size: 1.625rem;
  font-weight: 700;
  color: #fcd34d;
  letter-spacing: 0.02em;
}

.freq-unit { font-size: 0.875rem; color: rgba(255, 255, 255, 0.45); margin-top: 0.25rem; }

/* ─── Filter Row (Hams) ─────────────────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-row input,
.filter-row select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.625rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  flex: 1;
  min-width: 180px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow-xs);
}

.filter-row input:focus,
.filter-row select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.filter-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ─── Gallery ───────────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s;
}

.gallery-item:hover { box-shadow: var(--shadow); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,37,87,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption { color: #fff; font-size: 0.875rem; font-weight: 500; }

/* ─── Lightbox ──────────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15, 37, 87, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  flex-direction: column;
  gap: 1rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 78vh;
  border-radius: var(--r);
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.lightbox-caption { color: rgba(255,255,255,0.75); font-size: 0.9375rem; text-align: center; }

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.15s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.22); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.15s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

/* ─── Empty State ───────────────────────────────────────────────────────────── */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
  gap: 1rem;
}

.empty-state svg { opacity: 0.35; color: var(--border-str); }
.empty-state h3 { font-size: 1.125rem; color: var(--navy); }
.empty-state p { font-size: 0.9375rem; max-width: 340px; }


/* ─── Quote Block ───────────────────────────────────────────────────────────── */
.quote-block {
  background: var(--bg-alt);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.5rem 2rem;
  margin: 3rem 0;
}

.quote-block p {
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.quote-block cite {
  display: block;
  margin-top: 0.875rem;
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─── Objectives List ───────────────────────────────────────────────────────── */
.objectives-list {
  list-style: none;
  counter-reset: obj;
  display: flex;
  flex-direction: column;
}

.objectives-list li {
  counter-increment: obj;
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.objectives-list li:first-child { padding-top: 0; }
.objectives-list li:last-child { border-bottom: none; padding-bottom: 0; }

.objectives-list li::before {
  content: counter(obj, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  opacity: 0.3;
  flex-shrink: 0;
  width: 2.5rem;
  padding-top: 0.1rem;
}

.objectives-list li p { color: var(--muted); font-size: 1rem; line-height: 1.8; }

/* ─── Repeater description ───────────────────────────────────────────────────── */
.repeater-desc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem 2rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.repeater-desc p + p { margin-top: 1rem; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-left { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-brand { font-weight: 700; color: var(--navy); font-size: 0.9375rem; }
.footer-copy { font-size: 0.8125rem; color: var(--muted); }

.footer-social { display: flex; gap: 0.5rem; align-items: center; }

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  background: #fff;
}

.social-link:hover {
  color: var(--navy);
  border-color: var(--border-str);
  background: var(--bg-alt);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .freq-display { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .btn { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; align-items: center; }
  .page-header { padding: 2.5rem 0 2rem; }
  .objectives-list li { gap: 1rem; }
}

@media (max-width: 480px) {
  .freq-display { grid-template-columns: 1fr; }
}
