/* =========================================================
   TV 3.0 — painel de sintonia
   Tokens: sinal de radiodifusão, "tally light", faixa de canais
   ========================================================= */

:root {
  --paper: #edeee6;
  --paper-2: #e3e3d8;
  --ink: #16232b;
  --ink-soft: #46545b;
  --navy: #16323f;
  --navy-2: #0f2530;
  --signal: #c0402a;
  --signal-2: #a83321;
  --gold: #b98a1f;
  --line: #c7c2b0;
  --line-on-navy: rgba(237, 238, 230, 0.22);

  --display: "Big Shoulders Display", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --radius: 2px;
}

* { box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- header / brand ---------- */

.site-head {
  background: var(--navy);
  color: var(--paper);
  border-bottom: 4px solid var(--signal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--paper);
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem) 0.9rem;
  width: fit-content;
}

.brand-mark { display: inline-flex; align-items: center; }

.tally {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(192, 64, 42, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.brand-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.brand-sub {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237, 238, 230, 0.6);
}

/* ---------- tuner / nav ---------- */

.tuner {
  border-top: 1px solid var(--line-on-navy);
}

.tuner > ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0.2rem clamp(0.5rem, 3vw, 2rem);
}

.tuner > ul > li { margin-right: 2.4rem; margin-bottom: 0.15rem; } /* ~ distância de 4 toques entre cada item */
.tuner > ul > li:last-child { margin-right: 0; }

.chan {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgba(237, 238, 230, 0.72);
  padding: 0.95rem 0;
  font-family: var(--mono);
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
}

.chan:hover { color: var(--paper); }

.chan-name {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.chan.active { color: var(--paper); }

.chan.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--signal);
}

.chan.active .chan-name::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 0.5em;
  vertical-align: middle;
}

/* ---------- submenu (dropdown ao passar o mouse ou clicar no ícone) ---------- */

.tuner li.has-sub {
  position: relative;
  display: flex;
  align-items: center;
}

.submenu-toggle {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(237, 238, 230, 0.72);
  cursor: pointer;
  padding: 0.4rem 0.3rem;
  margin-left: -0.2rem;
  font-size: 0.75rem;
  line-height: 1;
}

.submenu-toggle:hover,
.submenu-toggle[aria-expanded="true"] { color: var(--paper); }

.submenu-toggle span {
  display: inline-block;
  transition: transform 0.15s ease;
}

.submenu-toggle[aria-expanded="true"] span { transform: rotate(180deg); }

.submenu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--navy-2);
  border: 1px solid var(--line-on-navy);
  border-top: 2px solid var(--signal);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
  display: none;
  z-index: 20;
}

.tuner li.has-sub:hover .submenu,
.tuner li.has-sub:focus-within .submenu,
.tuner li.has-sub.open .submenu {
  display: block;
}

.submenu li { margin: 0; }

.subchan {
  display: block;
  padding: 0.65rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: rgba(237, 238, 230, 0.78);
  text-decoration: none;
  white-space: nowrap;
}

.subchan:hover { color: var(--paper); background: rgba(237, 238, 230, 0.07); }

.subchan.active {
  color: var(--paper);
  border-left: 3px solid var(--signal);
  padding-left: calc(1rem - 3px);
}

.chan:focus-visible,
.brand:focus-visible,
.org-link:focus-visible,
.teaser:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- page layout ---------- */

main { display: flex; justify-content: center; }

.page {
  width: 100%;
  max-width: 760px;
  padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 0) clamp(3rem, 8vw, 5rem);
  padding-left: clamp(1.25rem, 5vw, 1.5rem);
  padding-right: clamp(1.25rem, 5vw, 1.5rem);
}

.page-head { border-bottom: 1px solid var(--line); padding-bottom: 2rem; margin-bottom: 2.4rem; }

.page-chan {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--signal-2);
  margin-bottom: 0.9rem;
}

.page-chan-of { color: var(--ink-soft); }

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--navy);
}

.dek {
  font-family: var(--body);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

.page-body h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  margin: 2.2rem 0 0.8rem;
  padding-top: 0.3rem;
  border-top: 3px solid var(--gold);
  width: fit-content;
}

.page-body p { margin: 0 0 1.15rem; max-width: 66ch; }

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

.lead strong { color: var(--signal-2); }

.page-body strong { color: var(--navy); }

.page-body ul {
  margin: 0 0 1.3rem;
  padding-left: 0;
  list-style: none;
  max-width: 66ch;
}

.page-body ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
}

.page-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--signal-2);
  font-family: var(--mono);
}

.page-body a {
  color: var(--signal-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.page-body a:hover { color: var(--navy); }

.readmore {
  margin: 0 0 1.15rem;
  max-width: 66ch;
}

.readmore summary {
  cursor: pointer;
  list-style: none;
  margin: 0 0 1.15rem;
}

.readmore summary::-webkit-details-marker { display: none; }

.readmore-cta {
  color: var(--signal-2);
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: nowrap;
}

.readmore[open] .readmore-cta { display: none; }

.readmore summary:hover .readmore-cta { color: var(--navy); }

.readmore p { margin: 0 0 1.15rem; }

/* ---------- bloco de especificações (lista técnica destacada) ---------- */

.spec-panel {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem 0.3rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  max-width: 66ch;
}

.spec-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.spec-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.6rem;
}

.spec-panel li {
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  break-inside: avoid;
}

.spec-panel li:last-child { border-bottom: none; }

@media (max-width: 560px) {
  .spec-panel ul { columns: 1; }
}

.note {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  padding-left: 0.9rem;
}

.note a { color: var(--signal-2); text-decoration-thickness: 1.5px; }

/* ---------- home teasers ---------- */

.grid-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  margin: 2rem 0;
  border: 1px solid var(--line);
}

.teaser {
  background: var(--paper-2);
  text-decoration: none;
  color: var(--ink);
  padding: 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.15s ease;
}

.teaser:hover { background: #d9dac9; }

.teaser-txt {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
}

.teaser-txt::before {
  content: "→ ";
  color: var(--signal-2);
  font-family: var(--mono);
}

@media (max-width: 560px) {
  .grid-teaser { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 1.4rem clamp(1.25rem, 5vw, 2.5rem) 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
}

.foot-note {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin: 0;
  letter-spacing: 0.02em;
}

.org-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 2px solid var(--signal);
  padding-bottom: 2px;
  white-space: nowrap;
}

.org-link:hover { color: var(--signal-2); }
