/* sp7tq.pl: shared style for the home page, SR7EOP and 404 (the RT3S page has its own). */
:root {
  --bg: #10161d;
  --bg-2: #161e27;
  --bg-3: #1d2732;
  --line: #2a3644;
  --ink: #e8edf2;
  --soft: #c3ccd6;
  --mut: #8f9cab;
  --amber: #ffb000;
  --green: #3bd16f;
  --blue: #5ac8fa;
  --wrap: 1100px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 'Barlow', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

html[data-lang="pl"] [data-l="en"],
html[data-lang="en"] [data-l="pl"] { display: none !important; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h2 { font-size: clamp(34px, 4.5vw, 52px); }
h3 { font-size: 26px; font-weight: 600; }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.86em; background: var(--bg-3); padding: 0.1em 0.35em; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- top bar ---- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter);
}
.mark { color: var(--ink); text-decoration: none; font: 700 22px/1 'Barlow Condensed', sans-serif; letter-spacing: 0.03em; }
.mark span { color: var(--mut); font-weight: 600; }
.top nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.top nav a { color: var(--soft); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--amber); }
.lang { font: 600 14px/1 'Barlow', sans-serif; color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; cursor: pointer; }
@media (max-width: 560px) { .top nav a.opt { display: none; } }

main > section, .page-head { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter) 0; }

/* ---- home: callsign ---- */
.callsign { padding-top: clamp(40px, 8vw, 100px) !important; }
.callsign h1 {
  font-size: clamp(96px, 22vw, 260px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  margin: 0;
}
.cw {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  margin: clamp(22px, 3vw, 34px) 0 clamp(26px, 4vw, 40px);
  min-height: 14px;
}
.cw i { display: block; height: 12px; border-radius: 6px; background: var(--amber); margin-right: 8px; }
.cw i.dit { width: 12px; }
.cw i.dah { width: 38px; }
.cw i.gap { width: 18px; background: transparent; }
.cw i.on { opacity: 1; }
.cw.keying i:not(.gap) { opacity: 0.18; }
.cw.keying i.lit { opacity: 1; box-shadow: 0 0 14px color-mix(in srgb, var(--amber) 70%, transparent); }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.who p { font-size: clamp(20px, 2.3vw, 25px); color: var(--soft); margin: 0; }
.listen {
  font: 600 16px/1 'Barlow', sans-serif; color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px 9px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.listen:hover { border-color: var(--amber); }
.listen svg { width: 18px; height: 18px; color: var(--amber); }

/* ---- home: projects ---- */
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px);
  align-items: center; padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line);
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project .kind { color: var(--mut); margin: 0 0 6px; font-weight: 500; }
.project h3 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; margin-bottom: 0.3em; }
.project p { color: var(--soft); }
.project .go { font-weight: 600; font-size: 19px; }
.project figure { margin: 0; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shots img, .lcd { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 4px; background: #0b0e0c; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--soft); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* digipeater diagram */
.digi { width: 100%; height: auto; display: block; }
.digi text { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--mut); }
.facts dd { margin: 0; }

footer { max-width: var(--wrap); margin: clamp(70px, 10vw, 120px) auto 0; padding: 26px var(--gutter) 44px;
  border-top: 1px solid var(--line); color: var(--mut); font-size: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; }
footer a { color: var(--soft); }

/* ---- SR7EOP ---- */
.page-head { padding-top: clamp(34px, 6vw, 70px) !important; }
.page-head .crumb { color: var(--mut); margin-bottom: 10px; }
.page-head h1 { font-size: clamp(64px, 12vw, 150px); line-height: 0.85; letter-spacing: -0.015em; margin-bottom: 0.2em; }
.page-head .lead { font-size: clamp(20px, 2.3vw, 25px); color: var(--soft); }
.freq {
  display: inline-grid; grid-template-columns: auto auto; gap: 2px 18px; align-items: baseline;
  margin-top: 18px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.freq b { font: 700 clamp(36px, 5vw, 52px)/1 'Barlow Condensed', sans-serif; color: var(--amber); }
.freq span { color: var(--mut); }
.how ol { padding-left: 1.2em; max-width: 70ch; }
.how li { margin-bottom: 10px; color: var(--soft); }
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.paths div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.paths b { display: block; font: 700 24px/1.1 'Barlow Condensed', sans-serif; margin-bottom: 6px; }
.paths p { margin: 0; color: var(--soft); font-size: 16px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 17px/1 'Barlow', sans-serif; text-decoration: none;
  color: var(--ink); background: var(--bg-3); border: 1px solid var(--line); padding: 13px 20px; border-radius: 6px; }
.btn:hover { border-color: var(--amber); color: var(--ink); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #1a1405; }
.btn.primary:hover { background: #ffc233; }

/* ---- 404 ---- */
.nf { min-height: 60vh; display: grid; align-content: center; }
.nf h1 { font-size: clamp(80px, 18vw, 200px); line-height: 0.85; margin-bottom: 0.15em; }

@media (max-width: 820px) {
  .project, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .paths { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cw i { margin-right: 6px; height: 10px; }
  .cw i.dit { width: 10px; }
  .cw i.dah { width: 28px; }
  .cw i.gap { width: 12px; }
}

/* work-in-progress project */
.wip { display: inline-block; font: 600 14px/1 'Barlow', sans-serif; color: #1a1405; background: var(--amber);
  padding: 4px 8px; border-radius: 3px; margin-right: 8px; vertical-align: 2px; }
.project .note { color: var(--mut); font-size: 16px; }
