/* Página inicial: o produto como rede de metrô. Herda tokens, faixa-placa e botões de /admin/app.css. */

.landing main { display: block; }
.landing main:focus { outline: none; }
.wrap, .hero, .band-body, .install, .site-foot { max-width: 1320px; margin-inline: auto; padding-inline: 32px; }

.topbar-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 2px solid #fff; border-radius: var(--radius); color: #fff; font-weight: 700; text-decoration: none; }
.topbar-cta:hover { background: #fff; color: #111214; }
.btn.big { min-height: 56px; padding: 12px 24px; font-size: 1.08rem; }
.btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.btn.ghost:hover { background: #fff; color: #111214; }

.bullet {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--line); color: #fff; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px var(--ground);
}
[data-line="amarela"] .bullet, .bullet[data-line="amarela"] { color: #111214; box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px #111214; }
.bullet.big { width: 64px; height: 64px; font-size: 2rem; }

/* ---------- abertura ---------- */
.hero { padding-top: clamp(28px, 3.2vw, 48px); padding-bottom: 56px; }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 56px; align-items: start; }
.hero h1 {
  grid-column: 1 / -1;
  font-size: clamp(2.6rem, 1.2rem + 4.1vw, 4.7rem); font-weight: 800; line-height: .98; letter-spacing: -.035em;
  margin: 0 0 6px; max-width: 24ch;
}
.hero .actions { align-self: center; }
.hero .hint { grid-column: 2; margin-top: -6px; }
.lede { font-size: clamp(1.08rem, 1rem + .3vw, 1.25rem); line-height: 1.55; color: var(--ink); max-width: 46ch; margin: 0; }
.hero .actions { gap: 12px; }
.hint { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- mapa da rede ---------- */
.network {
  --ring: 30px;
  position: relative; margin-top: clamp(28px, 2.6vw, 40px);
  display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 28px;
  padding: 28px 28px 0; background: var(--enamel); border-radius: var(--radius); border-top: 6px solid var(--ink);
}
.network-title { grid-column: 1 / -1; font-size: 1rem; font-weight: 800; margin: 0 0 8px; }
.interchange {
  grid-column: 1; grid-row: 2; position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center;
  margin: 8px 0; padding: 12px 8px; border-radius: 66px; background: var(--ground); border: 7px solid var(--ink);
}
.interchange b { font-size: 1.25rem; line-height: 1.1; }
.interchange small { font-size: .82rem; color: var(--muted); font-weight: 600; }
.lines { grid-column: 2; grid-row: 2; list-style: none; margin: 0; padding: 0; }
.line { position: relative; display: grid; grid-template-columns: 168px minmax(0, 1fr); align-items: start; min-height: 84px; }
.line::before {
  content: ""; position: absolute; left: -100px; right: 0; top: 30px; height: 14px; border-radius: 7px; background: var(--line); z-index: 0;
  transition: opacity .3s var(--ease);
}
.line[data-line="amarela"]::before { box-shadow: inset 0 0 0 2px #111214; }
.line::after {
  content: ""; position: absolute; top: 30px; left: -100px; width: 44px; height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95));
  opacity: 0; z-index: 1; pointer-events: none;
}
.line-id { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; align-self: start; margin-top: 20px; padding: 0 12px 0 0; background: var(--enamel); border-radius: 20px 6px 6px 20px; }
.line-id > span:last-child { font-weight: 800; font-size: 1.05rem; }
.network .bullet { box-shadow: 0 0 0 3px var(--enamel); }
.network [data-line="amarela"] .bullet { box-shadow: 0 0 0 2px #111214, 0 0 0 4px var(--enamel); }
.stations { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; list-style: none; margin: 0; padding: 0 8px 0 0; }
.station {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-width: 96px; padding: 22px 6px 14px; margin: 0;
  background: none; border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); cursor: pointer; text-align: center;
}
.station::before {
  content: ""; width: var(--ring); height: var(--ring); border-radius: 50%;
  background: var(--ground); border: 6px solid var(--ink); box-sizing: border-box;
  transition: transform .3s var(--ease), background .2s, border-color .2s;
}
.station:hover::before { transform: scale(1.18); }
.station[aria-pressed="true"]::before { background: var(--line); transform: scale(1.32); }
.station[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--line); }
.network.is-focused .line:not(.is-current)::before {
  background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 28px);
  opacity: .55; box-shadow: none;
}
.network.is-focused .line:not(.is-current) .station { color: var(--muted); }
.network.is-focused .line:not(.is-current) .station::before { opacity: .45; }

.station-sign { grid-column: 1 / -1; grid-row: 3; margin: 6px -28px 0; background: var(--sign); color: #fff; padding: 20px 28px 24px; border-radius: 0 0 var(--radius) var(--radius); border-top: 6px solid var(--line, #8a9099); min-height: 128px; }
.station-name { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 1.35rem; }
.station-name .bullet { box-shadow: 0 0 0 3px #111214; width: 26px; height: 26px; }
.station-sign[data-line="amarela"] .station-name .bullet { box-shadow: 0 0 0 3px #111214, 0 0 0 5px #fff; }
.station-text { margin: 0; color: #d9dce0; max-width: 78ch; font-size: 1.05rem; }

@media (prefers-reduced-motion: no-preference) {
  .network.is-running .line::after { animation: trem 2.6s var(--ease) both; }
  .network.is-running .line:nth-child(2)::after { animation-delay: .25s; }
  .network.is-running .line:nth-child(3)::after { animation-delay: .5s; }
  .network.is-running .line:nth-child(4)::after { animation-delay: .75s; }
  @keyframes trem {
    0% { left: -100px; opacity: 0; }
    10% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: calc(100% - 44px); opacity: 0; }
  }
}

/* ---------- linhas (seções) ---------- */
.band { margin-top: clamp(56px, 7vw, 104px); }
.band-sign { background: var(--sign); color: #fff; border-bottom: 8px solid var(--line); }
.band-sign { display: flex; align-items: center; gap: 22px; padding: 22px max(32px, calc((100vw - 1320px) / 2 + 32px)); }
.band-sign .bullet { box-shadow: 0 0 0 4px #111214; }
.band[data-line="amarela"] .band-sign .bullet { box-shadow: 0 0 0 4px #111214, 0 0 0 7px #fff; }
.band-sign h2 { margin: 0; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.1rem); font-weight: 800; letter-spacing: -.025em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.band-sign h2 span { font-size: clamp(1rem, .9rem + .4vw, 1.25rem); font-weight: 600; color: #c8ccd1; letter-spacing: 0; }
.band-body { padding-top: 40px; }
.band-lede { font-size: 1.2rem; max-width: 60ch; margin-bottom: 28px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }

/* percurso: lista desenhada como trecho de linha */
.route { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.route::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 8px; border-radius: 4px; background: var(--line); }
[data-line="amarela"] .route::before { box-shadow: inset 0 0 0 2px #111214; }
.route li { position: relative; padding: 6px 0 14px; max-width: 62ch; }
.route li::before { content: ""; position: absolute; left: -34px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ground); border: 5px solid var(--ink); box-sizing: border-box; }
.branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.branch h3 { font-size: 1.25rem; margin: 0 0 14px; }
.profiles { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; padding: 22px 24px; background: var(--enamel); border-radius: var(--radius); }
.profiles h3 { margin: 0; font-size: 1.1rem; flex-basis: 100%; }
.profiles ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; flex: 1; }
.profiles li { padding: 6px 14px; border: 2px dashed var(--ink); border-radius: 999px; font-weight: 700; font-size: .95rem; }

.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); box-shadow: 0 18px 44px -18px rgba(17, 18, 20, .45); }
.shot figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }

.targets { margin: 0 0 18px; }
.targets div { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.targets dt { flex: 1; font-weight: 600; }
.targets dd { margin: 0; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; min-width: 4.2ch; text-align: right; }

.board { background: #111214; color: #fff; border-radius: var(--radius); padding: 22px 24px; }
.board table { color: #fff; }
.board caption { color: #ffd400; font-size: 1.1rem; padding-bottom: 14px; }
.board thead th { color: #c8ccd1; border-bottom-color: #fff; }
.board th, .board td { border-bottom-color: #2e3238; padding: 13px 10px; }
.board tbody th { font-weight: 800; }
.board tbody th small { display: block; padding-left: 24px; font-weight: 400; color: #a6acb4; }
.board tbody td { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.board tbody tr:hover { background: #1c1f23; }
.dot { display: inline-block; vertical-align: -1px; margin-right: 10px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; flex: none; }
.dot.crit { background: #ef3e57; border-color: #ef3e57; }
.dot.high { background: #ffd400; border-color: #ffd400; }
.dot.open { border-style: dashed; }
.board-note { margin: 14px 0 0; color: #c8ccd1; font-size: .92rem; }

.proofs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.proofs li { padding: 26px 0 22px 56px; position: relative; border-top: 2px solid var(--ink); }
.proofs li::before { content: ""; position: absolute; left: 0; top: 26px; width: 34px; height: 34px; border-radius: 50%; background: var(--amarela); box-shadow: 0 0 0 2px #111214; }
.proofs h3 { margin: 4px 0 8px; font-size: 1.3rem; }
.proofs p { margin: 0; max-width: 56ch; }

/* ---------- instalação ---------- */
.install { margin-top: clamp(64px, 8vw, 120px); }
.install h2 { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; max-width: 18ch; margin-bottom: 24px; }
.install-plate { display: flex; align-items: center; gap: 16px; background: #111214; color: #f1f2f3; border-radius: var(--radius); padding: 20px 22px; border-left: 0; }
.install-plate code { flex: 1; font-size: clamp(.9rem, .8rem + .4vw, 1.12rem); overflow-wrap: anywhere; }
.install-plate .btn { background: #fff; color: #111214; border-color: #fff; }
.install > p { margin-top: 14px; color: var(--muted); }

/* ---------- terminal ---------- */
.terminus { position: relative; margin-top: clamp(72px, 9vw, 128px); background: #111214; color: #fff; padding: 88px max(32px, calc((100vw - 1320px) / 2 + 32px)) 72px; overflow: hidden; }
.terminus-lines { position: absolute; left: 0; right: 0; top: 0; display: grid; gap: 6px; }
.terminus-lines span { height: 10px; }
.terminus-lines span:nth-child(1) { background: #3d8be0; }
.terminus-lines span:nth-child(2) { background: #2fb67f; }
.terminus-lines span:nth-child(3) { background: #ef3e57; }
.terminus-lines span:nth-child(4) { background: #ffd400; }
.terminus h2 { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1; max-width: 16ch; margin: 0 0 32px; }
.terminus .btn.accent { border-color: #ffd400; }

.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 28px; padding-bottom: 36px; font-size: .92rem; color: var(--muted); }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- telas menores ---------- */
@media (max-width: 1080px) {
  .branches { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero-copy { grid-template-columns: 1fr; }
  .hero .hint { grid-column: auto; margin-top: 0; }
  .network { display: block; padding: 22px 18px 0; }
  .interchange { flex-direction: row; justify-content: flex-start; gap: 10px; margin: 0 0 6px; padding: 10px 18px; border-radius: 40px; border-width: 6px; }
  .line { display: block; min-height: 0; padding: 18px 0 8px 46px; }
  .line::before { left: 12px; right: auto; top: 0; bottom: 0; width: 14px; height: auto; }
  .line::after { display: none; }
  .line-id { margin: 0 0 4px -46px; padding-left: 2px; }
  .line-id > span:last-child { background: transparent; }
  .stations { flex-direction: column; gap: 0; }
  .station { flex-direction: row; gap: 14px; min-width: 0; width: 100%; padding: 8px 4px; text-align: left; margin-left: -45px; }
  .network.is-focused .line:not(.is-current)::before { background: repeating-linear-gradient(180deg, var(--line) 0 18px, transparent 18px 28px); }
  .station-sign { margin: 10px -18px 0; padding: 18px; }
}
@media (max-width: 640px) {
  .wrap, .hero, .band-body, .install, .site-foot { padding-inline: 18px; }
  .band-sign { padding: 18px; gap: 14px; }
  .bullet.big { width: 48px; height: 48px; font-size: 1.5rem; }
  .branches, .proofs { grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; }
  .terminus { padding: 64px 18px 48px; }
  .terminus .actions .btn { width: 100%; }
  .install-plate { flex-direction: column; align-items: stretch; }
  .topbar-cta { min-height: 36px; padding: 4px 10px; font-size: .88rem; }
}

@media (forced-colors: active) {
  .line::before, .route::before { background: CanvasText; }
  .station[aria-pressed="true"]::before { background: Highlight; }
}
@media print {
  .network, .terminus, .install-plate .btn { display: none; }
}

/* Com o contraste do widget ligado, o mapa continua um mapa: listas transparentes, estações sem caixa, anéis legíveis. */
html:is(.aw-contrastDark, .aw-contrastLight) .network :is(ol, li, .line-id, .line-id > span):not(#aw-x) { background-color: transparent !important; }
html:is(.aw-contrastDark, .aw-contrastLight) .network .station:not(#aw-x) { border: 0 !important; background-color: transparent !important; }
html.aw-contrastDark .station::before { background: #000; border-color: #fff; }
html.aw-contrastDark .station[aria-pressed="true"]::before { background: #ff0; }
html.aw-contrastLight .station::before { background: #fff; border-color: #000; }
html.aw-contrastLight .station[aria-pressed="true"]::before { background: #0000c8; }
html:is(.aw-contrastDark, .aw-contrastLight) .route li::before { background: transparent; border-color: currentColor; }
html:is(.aw-contrastDark, .aw-contrastLight) .network .bullet { box-shadow: none; }

@media (prefers-color-scheme: dark) {
  .bullet { color: #0d0e10; }
  .board, .install-plate, .terminus { background: #000; }
  .board { border: 1px solid #2e3238; }
}

.split > *, .branches > *, .hero-copy > * { min-width: 0; }
@media (max-width: 640px) {
  .board { padding: 16px 14px; }
  .board th, .board td { padding: 11px 6px; }
  .board tbody td { white-space: normal; font-size: 1rem; }
  .targets dd { font-size: 1.6rem; }
}

/* seta de sinalização (traço grosso, proporção de placa) */
.arrow { width: 1.15em; height: 1.15em; flex: none; }
a.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.btn .arrow { margin-left: 2px; transition: transform .25s var(--ease); }
.btn:hover .arrow, a.go:hover .arrow { transform: translateX(4px); }
@media (min-width: 901px) { .hero .lede { grid-row: span 2; } .hero .hint { margin-top: 0; align-self: start; } .hero .actions { align-self: end; } }
