/* ============================================================
   W4IO.me — "Boat Anchor" theme
   Palette, type and layout tokens. Edit here, not in the pages.
   ============================================================ */

:root {
  /* Color */
  --ink:        #131110;  /* page background, warm near-black          */
  --panel:      #1c1917;  /* raised surfaces                           */
  --panel-hi:   #24201d;  /* hover / inset surfaces                    */
  --line:       #38312b;  /* hairlines, borders                        */
  --amber:      #f0a92c;  /* dial amber — the one loud color           */
  --amber-dim:  #a5701a;  /* ticks, rules, de-emphasized amber         */
  --glow:       #ffd894;  /* highlight text on amber                   */
  --meter:      #7fb3c8;  /* cool secondary, used ONLY for park refs   */
  --text:       #e7ded2;  /* warm bone                                 */
  --muted:      #9d9186;  /* captions, metadata                        */

  /* Type */
  --panel-face: "Barlow Condensed", "Arial Narrow", sans-serif;  /* labels  */
  --read-face:  "Newsreader", Georgia, "Times New Roman", serif; /* prose   */
  --data-face:  "JetBrains Mono", ui-monospace, "Courier New", monospace;

  /* Metrics */
  --wrap: 1080px;
  --radius: 3px;
  --tick: repeating-linear-gradient(
            to right,
            var(--amber-dim) 0 1px,
            transparent 1px 14px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--read-face);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration-color: var(--amber-dim); text-underline-offset: 3px; }
a:hover { color: var(--glow); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Panel-label typography ---------- */
h1, h2, h3, .label, .nav a, .btn, .kicker, .brand__call {
  font-family: var(--panel-face);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.18rem; margin: 1.8rem 0 .5rem; letter-spacing: .08em; }
.label {
  font-size: .78rem; color: var(--muted); letter-spacing: .22em;
  display: block; margin-bottom: .6rem;
}
.lede { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }

/* Data / logbook lines */
.meta {
  font-family: var(--data-face);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}
.meta span + span::before { content: " · "; color: var(--amber-dim); }

/* ============================================================
   Header + the tuning scale (signature element)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #1a1715 0%, #171413 100%);
  border-bottom: 1px solid var(--line);
}
.header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 24px; max-width: var(--wrap); margin: 0 auto;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand__call {
  font-size: 1.75rem; color: var(--text); letter-spacing: .16em;
  line-height: 1; border-bottom: 2px solid var(--amber); padding-bottom: 2px;
}
.brand__tag { font-family: var(--data-face); font-size: .68rem; color: var(--muted); letter-spacing: .12em; }

.nav { display: flex; gap: 26px; }
.nav a {
  font-size: .92rem; color: var(--muted); text-decoration: none;
  padding: 4px 0; transition: color .18s ease;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--amber); }

/* The scale: ticks with a pointer that parks under the active section */
.scale {
  position: relative; height: 22px;
  background-image: var(--tick);
  background-position: bottom left;
  background-size: auto 8px;
  background-repeat: repeat-x;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.scale__pointer {
  position: absolute; top: 0; left: 0; width: 44px; height: 100%;
  transform: translateX(-50%);
  transition: left .45s cubic-bezier(.22,.7,.2,1);
  pointer-events: none;
}
.scale__pointer::before {
  content: ""; position: absolute; left: 50%; top: 2px;
  width: 2px; height: 18px; background: var(--amber);
  box-shadow: 0 0 8px 1px rgba(240,169,44,.55);
}
.scale__pointer::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(240,169,44,.20), transparent 70%);
}

/* Mobile menu button */
.menu-btn {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: var(--radius);
  font-family: var(--panel-face); text-transform: uppercase; letter-spacing: .14em;
  font-size: .8rem; padding: 6px 12px; cursor: pointer;
}

/* ============================================================
   Hero (front page)
   ============================================================ */
.hero { padding: 74px 0 48px; border-bottom: 1px solid var(--line); }
.hero h1 { letter-spacing: .04em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: 34px; margin-top: 34px;
  font-family: var(--data-face);
}
.stat b {
  display: block; font-size: 1.5rem; font-weight: 500;
  color: var(--text); letter-spacing: .02em;
}
.stat span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   Entry cards
   ============================================================ */
.section { padding: 56px 0; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 30px;
}
.section__head h2 { margin: 0; }

.entries { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--amber-dim); transform: translateY(-2px); }
.card__thumb {
  aspect-ratio: 16 / 9; width: 100%; object-fit: cover;
  background: var(--panel-hi); filter: saturate(.85);
}
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 10px 0 8px; font-size: 1.22rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card:hover h3 a { color: var(--glow); }
.card p { margin: 0 0 16px; font-size: .98rem; color: var(--muted); }
.card .meta { margin-top: auto; }

/* Featured = first entry, full width, image left */
.card--featured { grid-column: 1 / -1; flex-direction: row; }
.card--featured .card__thumb { width: 46%; aspect-ratio: auto; }
.card--featured .card__body { padding: 30px 32px; }
.card--featured h3 { font-size: 1.9rem; }
.card--featured p { font-size: 1.06rem; }

/* Kickers — the only place the cool secondary appears */
.kicker {
  align-self: flex-start; font-size: .68rem; letter-spacing: .18em;
  padding: 3px 9px; border-radius: 2px; border: 1px solid;
}
.kicker--pota { color: var(--amber); border-color: var(--amber-dim); }
.kicker--dx   { color: var(--meter); border-color: #3f6270; }
.kicker--us   { color: var(--text);  border-color: var(--line); }

/* ============================================================
   Prose pages
   ============================================================ */
.page-head { padding: 62px 0 34px; border-bottom: 1px solid var(--line); }
.prose { max-width: 68ch; padding: 44px 0 10px; }
.prose p { margin: 0 0 1.2em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--amber-dim); color: var(--muted); font-style: italic;
}

/* Resource list (Info page) */
.links { list-style: none; padding: 0; margin: 0; }
.links li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.links a { font-family: var(--panel-face); text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem; text-decoration: none; }
.links p { margin: 4px 0 0; font-size: .95rem; color: var(--muted); }

/* Cross-reference chip: links a trip story to its POTA entry */
.xref {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--data-face); font-size: .74rem; letter-spacing: .04em;
  color: var(--meter); text-decoration: none;
  border: 1px solid #3f6270; border-radius: 2px; padding: 5px 10px;
  background: rgba(127,179,200,.06);
}
.xref:hover { color: #bfe0ec; border-color: var(--meter); }
.xref::before { content: "↗"; }

/* ============================================================
   POTA page: filter bar + panel
   ============================================================ */
.filter {
  position: sticky; top: 78px; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 28px 0 26px;
}
.filter input, .filter select {
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; font-family: var(--data-face); font-size: .82rem;
}
.filter input { flex: 1 1 220px; min-width: 180px; }
.filter input::placeholder { color: #6f665e; }
.filter input:focus, .filter select:focus { border-color: var(--amber-dim); outline: none; }
.filter__count { margin-left: auto; font-family: var(--data-face); font-size: .74rem; color: var(--muted); }
.btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--radius); padding: 9px 14px; font-size: .78rem; cursor: pointer;
}
.btn:hover { color: var(--amber); border-color: var(--amber-dim); }

/* Compact activation rows */
.log { display: grid; gap: 14px; }
.log-item {
  display: grid; grid-template-columns: 132px 1fr; gap: 20px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 2px solid var(--amber-dim);
  border-radius: var(--radius); padding: 16px 18px;
}
.log-item:hover { background: var(--panel-hi); }
.log-item.is-hidden { display: none; }
.log-item__ref {
  font-family: var(--data-face); font-size: .95rem; color: var(--amber);
  letter-spacing: .02em;
}
.log-item__ref small { display: block; color: var(--muted); font-size: .68rem; margin-top: 4px; letter-spacing: .1em; }
.log-item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.log-item h3 a { color: var(--text); text-decoration: none; }
.log-item h3 a:hover { color: var(--glow); }
.log-item p { margin: 0 0 10px; font-size: .95rem; color: var(--muted); }

.empty {
  display: none; text-align: center; padding: 44px 0; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty.is-shown { display: block; }

/* Stats panel wrapping the pota-stats iframe */
.stats-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 18px;
}
.stats-panel__frame { overflow: auto; -webkit-overflow-scrolling: touch; }
.stats-panel iframe {
  display: block; margin: 0 auto; border: 0;
  width: 1000px; max-width: 100%; height: 1250px;
  background: #fff; border-radius: 2px;
}
.stats-panel figcaption { margin-top: 12px; }

/* ============================================================
   Forms (Contact)
   ============================================================ */
.form { max-width: 560px; display: grid; gap: 16px; padding-top: 8px; }
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--panel-face); text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: var(--muted);
}
.field input, .field textarea {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; font-family: var(--read-face); font-size: 1rem;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--amber-dim); outline: none; }
.btn--send {
  justify-self: start; background: var(--amber); color: #1a1200;
  border-color: var(--amber); font-size: .85rem; padding: 11px 22px; font-weight: 600;
}
.btn--send:hover { background: var(--glow); color: #1a1200; border-color: var(--glow); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 70px; border-top: 1px solid var(--line);
  background: #171413; padding: 30px 0 40px;
}
.footer__row {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  align-items: center; justify-content: space-between;
}
.footer__row p { margin: 0; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer, .site-footer a { font-family: var(--data-face); font-size: .74rem; letter-spacing: .04em; }
.site-footer { color: var(--muted); }
.site-footer a { text-decoration: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #1a1715; border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .scale__pointer { display: none; }
  .entries { grid-template-columns: 1fr; }
  .card--featured { flex-direction: column; }
  .card--featured .card__thumb { width: 100%; aspect-ratio: 16 / 9; }
  .card--featured .card__body { padding: 20px; }
  .card--featured h3 { font-size: 1.4rem; }
  .log-item { grid-template-columns: 1fr; gap: 10px; }
  .filter { position: static; }
  .stats-panel { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
