/* =========================================================
   W4KST — Kennesaw State University Amateur Radio Club
   Theme: KSU black & gold. Static, no build step.
   ========================================================= */

:root {
  --bg:        #0b0d10;
  --bg-2:      #0f1217;
  --surface:   #14181f;
  --surface-2: #1a1f29;
  --border:    #262d3a;
  --border-2:  #333c4d;
  --text:      #e9ecf1;
  --muted:     #99a3b3;
  --faint:     #6b7585;
  --gold:      #ffc629;
  --gold-soft: #ffd45e;
  --gold-deep: #e0a500;
  --teal:      #45c8ff;
  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1120px;
  --ease:      cubic-bezier(.2,.7,.2,1);
  --shadow:    0 10px 30px rgba(0,0,0,.45);
  --font:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:      "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--gold-soft); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--gold); }

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--muted); }

.mono { font-family: var(--mono); }
.gold { color: var(--gold); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--border-2); border-radius: 999px;
  padding: .35rem .8rem; margin-bottom: 1.2rem; background: rgba(255,198,41,.05);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); color: #1a1400; box-shadow: 0 8px 24px rgba(255,198,41,.22); }
.btn--primary:hover { color: #1a1400; box-shadow: 0 12px 30px rgba(255,198,41,.32); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { color: var(--text); border-color: var(--gold); background: rgba(255,198,41,.06); }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(11,13,16,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11,13,16,.9); }
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand svg, .brand img { width: 38px; height: 38px; }
.brand .call { font-family: var(--mono); color: var(--gold); font-size: 1.15rem; line-height: 1; }
.brand .sub { display: block; font-size: .68rem; color: var(--faint); font-weight: 500; letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  color: var(--muted); font-weight: 500; font-size: .94rem;
  padding: .5rem .8rem; border-radius: 8px; transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--gold); }
.nav-cta { margin-left: 1.4rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); border-radius: 8px; width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s var(--ease); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex: none; margin-left: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .85rem .6rem; font-size: 1rem; }
  .nav-cta { margin: .6rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(70px, 11vw, 140px) 0 clamp(60px, 8vw, 100px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(255,198,41,.13), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(69,200,255,.07), transparent 60%);
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 .accent {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 36ch; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-meta { display: flex; gap: 1.8rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-meta .stat .n { font-family: var(--mono); font-size: 1.5rem; color: var(--gold); font-weight: 700; }
.hero-meta .stat .l { font-size: .82rem; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }

/* animated tower / signal art */
.signal { position: relative; aspect-ratio: 1; max-width: 380px; margin: 0 auto; display: grid; place-items: center; }
.signal .ring { position: absolute; border: 1.5px solid var(--gold); border-radius: 50%; opacity: 0; animation: ping 4s var(--ease) infinite; }
.signal .ring:nth-child(1) { width: 30%; height: 30%; animation-delay: 0s; }
.signal .ring:nth-child(2) { width: 30%; height: 30%; animation-delay: 1s; }
.signal .ring:nth-child(3) { width: 30%; height: 30%; animation-delay: 2s; }
.signal .ring:nth-child(4) { width: 30%; height: 30%; animation-delay: 3s; }
.signal .core { width: 100%; height: 100%; position: relative; z-index: 2; filter: drop-shadow(0 8px 30px rgba(255,198,41,.18)); }
@keyframes ping {
  0%   { opacity: .85; transform: scale(.5); }
  80%  { opacity: 0; transform: scale(3.4); }
  100% { opacity: 0; transform: scale(3.4); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .signal { order: -1; max-width: 240px; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card .ico {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,198,41,.1); border: 1px solid rgba(255,198,41,.22); color: var(--gold); margin-bottom: 1rem;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .4rem; }
.card p { margin-bottom: 0; font-size: .96rem; }

.card--link { display: block; color: inherit; }
.card--link:hover { color: inherit; }
.card--link h3 { color: var(--text); }
.card--link .more { color: var(--gold); font-weight: 600; font-size: .9rem; margin-top: .9rem; display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- Section header ---------- */
.sec-head { max-width: 640px; margin-bottom: 48px; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head p { font-size: 1.08rem; }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.tile {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,198,41,.08), transparent 55%), var(--surface);
  padding: 32px; box-shadow: var(--shadow);
}

/* ---------- Lists ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .85rem; color: var(--muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px;
  background: var(--gold); -webkit-mask: var(--check) center/contain no-repeat; mask: var(--check) center/contain no-repeat;
}
:root { --check: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>'); }

/* ---------- License timeline ---------- */
.steps { display: grid; gap: 18px; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px;
}
.step .num { font-family: var(--mono); font-size: 1.2rem; font-weight: 700; color: var(--gold);
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,198,41,.08); border: 1px solid rgba(255,198,41,.25); }
.step h3 { margin-bottom: .35rem; }
.step p { margin: 0; }

/* ---------- Table (repeaters / frequencies) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); }
th { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; background: var(--bg-2); }
td { color: var(--muted); font-size: .96rem; }
td.f { font-family: var(--mono); color: var(--gold-soft); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,198,41,.03); }

/* ---------- Officers ---------- */
.officer {
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 22px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.officer:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.officer .role {
  color: var(--gold); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: .55rem;
}
.officer h3 { margin: 0; font-size: 1.18rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-2); border-radius: 20px;
  background: radial-gradient(700px 300px at 80% 0%, rgba(255,198,41,.16), transparent 60%), linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(36px, 6vw, 64px); text-align: center; box-shadow: var(--shadow);
}
.cta-banner h2 { margin-bottom: .6rem; }
.cta-banner .hero-cta { justify-content: center; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: background .15s var(--ease);
}
.faq summary:hover { background: var(--surface); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--gold); font-size: 1.4rem; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 24px 22px; color: var(--muted); }
.faq .a p { margin: 0; }

/* ---------- Contact ---------- */
.contact-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.contact-card .ico { flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,198,41,.1); border: 1px solid rgba(255,198,41,.22); color: var(--gold); }
.contact-card h3 { margin-bottom: .25rem; }
.contact-card p { margin: 0; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: var(--muted); font-size: .94rem; }
.site-footer a:hover { color: var(--gold); }
.footer-brand p { font-size: .92rem; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: .85rem; }
.footer-bottom .mono { color: var(--faint); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; overflow: hidden; padding: clamp(54px, 8vw, 90px) 0 clamp(30px, 4vw, 50px); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 360px at 80% -20%, rgba(255,198,41,.12), transparent 60%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero .lead { max-width: 60ch; }

.breadcrumb { font-family: var(--mono); font-size: .8rem; color: var(--faint); margin-bottom: 1rem; }
.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--gold); }

hr.rule { border: none; border-top: 1px solid var(--border); margin: 0; }

.note { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 16px 20px; color: var(--muted); font-size: .95rem; }
.note strong { color: var(--text); }

/* ---------- Error / 404 ---------- */
.error-hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 70px);
  display: grid; place-items: center; text-align: center;
  padding: 48px 0;
}
.error-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(700px 460px at 50% 18%, rgba(255,198,41,.13), transparent 62%),
    radial-gradient(600px 400px at 50% 110%, rgba(69,200,255,.06), transparent 60%);
}
.error-hero .container { position: relative; z-index: 2; }
.error-wrap { max-width: 600px; margin: 0 auto; }

.error-code {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(6px, 2vw, 22px);
  font-family: var(--mono); font-weight: 700; line-height: 1;
  font-size: clamp(4.5rem, 20vw, 11rem);
  color: var(--gold);
  margin: 1.2rem 0 .4rem;
}
.error-emblem { position: relative; display: inline-grid; place-items: center; flex: none; }
.error-emblem img {
  width: clamp(84px, 17vw, 168px); height: auto; position: relative; z-index: 2;
  filter: drop-shadow(0 8px 28px rgba(255,198,41,.22));
}
.error-emblem .ering {
  position: absolute; width: 64%; height: 64%; border: 1.5px solid var(--gold);
  border-radius: 50%; opacity: 0; animation: ping 4s var(--ease) infinite;
}
.error-emblem .ering:nth-child(2) { animation-delay: 1.3s; }
.error-emblem .ering:nth-child(3) { animation-delay: 2.6s; }

.flatline { width: min(420px, 80%); height: 40px; margin: 1.6rem auto 0; opacity: .85; color: var(--gold); }
.flatline path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flatline .blip { stroke-dasharray: 240; stroke-dashoffset: 240; animation: trace 3.2s var(--ease) infinite; }
@keyframes trace { 0% { stroke-dashoffset: 240; } 55%, 100% { stroke-dashoffset: 0; } }

@media (max-width: 560px) {
  .error-code { font-size: clamp(3.4rem, 26vw, 6rem); }
}

/* =========================================================
   Polish: page transitions, scroll UI, micro-interactions
   ========================================================= */

/* Cross-page view transitions (progressive enhancement; ignored where unsupported) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .32s; }

/* Gentle page-load fade-in */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main { animation: pageIn .5s var(--ease) both; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 60; transform-origin: 0 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  box-shadow: 0 0 12px rgba(255,198,41,.5);
  transition: width .08s linear; pointer-events: none;
}

/* Animated underline on nav links — absolutely positioned so it never
   changes the link's height (no layout shift / second line on hover) */
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 5px;
  height: 2px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .22s var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a.active::after { transform: scaleX(1); }
@media (max-width: 860px) { .nav-links a:not(.btn)::after { display: none; } }

/* Staggered reveal — delay set per-element by JS via --d */
.reveal { transition-delay: var(--d, 0ms); }

/* Back-to-top button */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  color: #1a1400; border: none;
  box-shadow: 0 8px 22px rgba(255,198,41,.28);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* Card / icon micro-interactions */
.card .ico, .contact-card .ico { transition: transform .2s var(--ease), background .2s var(--ease); }
.card:hover .ico, .contact-card:hover .ico { transform: translateY(-2px) scale(1.06); }
.card--link .more { transition: gap .2s var(--ease); }
.card--link:hover .more { gap: .6rem; }

/* Buttons: press feedback + focus-visible ring for accessibility */
.btn:active { transform: translateY(0) scale(.98); }
a:focus-visible, .btn:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px;
}

/* Slow drift on the hero glow for subtle life */
@keyframes heroDrift { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-14px,0); } }
.hero::before { animation: heroDrift 14s ease-in-out infinite; }
