/* S.A.B.R.I.N.A. dossiê virtual. Vermelho e branco da máquina, painel de instrumentos escuro só na seção ao vivo. */

@font-face { font-family: "Barlow Condensed"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/barlow-condensed-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/barlow-condensed-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/barlow-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/barlow-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --paper: #fbfaf8;
  --white: #ffffff;
  --ink: #17191c;
  --ink-2: #4a4f56;
  --muted: #666b72;
  --red: #c8202b;
  --red-deep: #9b1620;
  --red-wash: #f8e9ea;
  --line: #dedad4;
  --dash: #17191c;
  --dash-2: #20242a;
  --dash-line: #3a3f46;
  --dash-text: #f3f1ee;
  --dash-muted: #b4b8bd;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 1.25rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 var(--body);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
* { scrollbar-color: var(--red) var(--line); }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 0.5rem; top: -4rem; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 20; }
.skip:focus { top: 0.5rem; }

/* Faixa vermelha e branca, como a pintura da máquina */
.stripe { height: 10px; background: linear-gradient(var(--red) 0 6px, var(--white) 6px 8px, var(--red) 8px 10px); }

/* Cabeçalho */
.top { background: var(--white); border-bottom: 1px solid var(--line); z-index: 10; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem; padding-block: 0.55rem; }
.brand { font: 700 1.5rem/1 var(--display); letter-spacing: 0.04em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--red); }
.top nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.top nav a { display: inline-block; padding: 0.35rem 0; font-size: 0.95rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--red-deep); border-bottom-color: var(--red); }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 2rem 2.5rem; background: var(--paper); }
.hero::before {
  content: ""; position: absolute; right: -10%; bottom: 0; width: 70%; height: 55%;
  background: var(--red); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); z-index: 0;
}
.hero-in { position: relative; z-index: 1; display: grid; gap: 1.75rem; align-items: center; }
h1 {
  margin: 0; font: 700 clamp(3.1rem, 14vw, 6rem)/0.92 var(--display);
  letter-spacing: 0.01em; color: var(--ink); text-wrap: balance;
}
.expand { margin: 0.6rem 0 0; font-size: 0.95rem; color: var(--ink-2); max-width: 38ch; }
.lead { margin: 1.1rem 0 0; font-size: 1.2rem; line-height: 1.5; max-width: 34em; }
.hero-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; margin-top: 1.5rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.15rem; background: var(--red); color: var(--white);
  font-weight: 700; text-decoration: none; border-radius: 3px; border: 1px solid var(--red-deep);
  box-shadow: 0 2px 6px rgb(23 25 28 / 0.18); overflow-wrap: break-word;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--red-deep); color: var(--white); }
.btn:active { transform: translateY(1px); }
.mini-live { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.mini-label { font-weight: 700; color: var(--ink); }
#mini-state::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--muted); margin-right: 0.4rem; }
.mini-live[data-state="2"] #mini-state::before { background: var(--red); }
.hero-photo { margin: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 14px 30px -12px rgb(23 25 28 / 0.45); background: var(--line); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Seções */
.sec { padding-block: 3.25rem; border-top: 1px solid var(--line); }
h2 { margin: 0 0 1.5rem; font: 700 clamp(2.1rem, 7vw, 3.2rem)/1 var(--display); letter-spacing: 0.01em; text-wrap: balance; }
h3 { margin: 0; font: 700 1.35rem/1.15 var(--display); letter-spacing: 0.02em; }
h3.sub { margin: 2rem 0 0.75rem; font-size: 1.6rem; }
.sec-body > p { max-width: 38em; margin: 0 0 1.1rem; }
.sec-body { display: grid; gap: 0; }

/* Ficha técnica */
.spec { margin: 0; display: grid; border-top: 2px solid var(--ink); }
.spec > div { display: grid; gap: 0.1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.spec dt { font: 700 1.1rem/1.2 var(--display); letter-spacing: 0.03em; color: var(--red-deep); }
.spec dd { margin: 0; max-width: 44em; }

/* Passos */
.steps { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: passo; display: grid; gap: 1.1rem; }
.steps li { counter-increment: passo; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.9rem; }
.steps li::before { content: counter(passo); grid-row: span 2; font: 700 2.4rem/1 var(--display); color: var(--red); }
.steps p { margin: 0.15rem 0 0; max-width: 36em; }

/* Figuras */
.fig { margin: 1.25rem 0; }
.fig img { width: 100%; border-radius: 4px; background: var(--line); }
.fig figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); max-width: 40em; }
.fig.small { max-width: 26rem; }
.figs { display: grid; gap: 1rem; margin: 1.25rem 0; }
.figs .fig { margin: 0; }
.figs img { max-width: 20rem; }
.fig.wide { margin-top: 1.75rem; }
.fig.wide img { background: var(--white); border: 1px solid var(--line); }

/* Linha do tempo */
.timeline { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.25rem; }
.timeline li { display: grid; gap: 0.15rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.timeline time { font: 700 1.45rem/1 var(--display); letter-spacing: 0.03em; color: var(--red-deep); font-variant-numeric: tabular-nums; }
.timeline p { margin: 0; max-width: 40em; }

/* Lista de limites */
.list { margin: 0 0 1.5rem; padding-left: 1.2rem; display: grid; gap: 0.7rem; max-width: 42em; }
.list li::marker { color: var(--red); }

/* Equipe */
.team { display: grid; gap: 1.5rem; margin-bottom: 1rem; }
.team ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.team li { padding: 0.15rem 0; }
.refs { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; font-size: 0.95rem; }

/* Painel ao vivo: instrumentos */
.sec-painel { background: var(--dash); color: var(--dash-text); border-top: 0; }
.sec-painel a { color: #ffb9bd; }
.sec-painel .fig figcaption { color: var(--dash-muted); }
.sec-painel .fig.wide img { border-color: var(--dash-line); }
.sec-painel .sec-body > p { color: #dedbd6; }
.live { background: var(--dash-2); border: 1px solid var(--dash-line); border-radius: 6px; padding: 1.25rem; margin-bottom: 1.25rem; }
.live-title { margin: 0 0 0.8rem; font-size: 0.95rem; color: var(--dash-muted); }
.gear { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.35rem; }
.gear li {
  flex: 1 1 0; max-width: 3.2rem; text-align: center; padding: 0.35rem 0;
  font: 700 1.5rem/1 var(--display); color: var(--dash-muted);
  border: 1px solid var(--dash-line); border-radius: 3px;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.gear li.on { background: var(--red); border-color: var(--red); color: var(--white); }
.live-state { margin: 0.9rem 0 0; font: 700 2.2rem/1 var(--display); letter-spacing: 0.02em; }
.live-when { margin: 0.35rem 0 0; font-size: 0.95rem; color: var(--dash-muted); }
.qr-card { display: grid; gap: 1rem; justify-items: start; background: var(--dash-2); border: 1px solid var(--dash-line); border-radius: 6px; padding: 1.25rem; margin-bottom: 1.25rem; }
.qr-card img { background: var(--white); padding: 0.5rem; border-radius: 4px; width: 10.5rem; height: 10.5rem; }
.qr-card p { margin: 0 0 0.6rem; }
.table-wrap { overflow-x: auto; margin: 0.5rem 0 1.5rem; }
.states { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.states caption { text-align: left; padding: 0 0 0.6rem; font-size: 0.95rem; color: var(--dash-muted); }
.states th, .states td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--dash-line); vertical-align: baseline; }
.states thead th { font-size: 0.9rem; font-weight: 700; color: var(--dash-muted); border-bottom: 2px solid var(--dash-text); }
.states .code { font: 700 1.7rem/1 var(--display); color: var(--white); }
.states tbody tr { transition: background 0.4s var(--ease); }
.states tbody tr.on { background: rgb(200 32 43 / 0.28); }
.states tbody tr.on td:nth-child(2) { font-weight: 700; }

/* Rodapé */
.foot { background: var(--white); border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 1.5rem 2rem; }
.foot-main { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.foot-ai { margin: 0.6rem 0 0; font-size: 0.72rem; line-height: 1.5; color: var(--muted); max-width: 60em; }

/* Curiosidade discreta no rodapé */
.egg { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); }
.egg summary { display: inline-block; cursor: pointer; padding: 0.2rem 0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.25em; }
.egg summary:hover { color: var(--red-deep); }
.egg-body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; margin-top: 0.6rem; }
.egg-body img { width: 7.5rem; height: 7.5rem; border-radius: 4px; background: var(--line); }
.egg-body p { margin: 0; max-width: 24em; color: var(--ink-2); }

/* Telas maiores */
@media (min-width: 720px) {
  :root { --gutter: 2rem; }
  .top { position: sticky; top: 0; }
  .hero { padding-block: 3.5rem 4rem; }
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
  .spec > div { grid-template-columns: 11rem 1fr; gap: 1.25rem; }
  .team { grid-template-columns: repeat(3, 1fr); }
  .figs { grid-template-columns: repeat(2, minmax(0, 20rem)); }
  .states th, .states td { padding: 0.7rem 1rem; }
}
@media (min-width: 960px) {
  .sec { padding-block: 4.5rem; }
  .sec-maquina .sec-body, .sec-equipe .sec-body { grid-template-columns: minmax(0, 1fr) 20rem; column-gap: 3rem; }
  .sec-maquina .sec-body > *, .sec-equipe .sec-body > * { grid-column: 1; }
  .sec-maquina .fig.small, .sec-equipe .fig.small { grid-column: 2; grid-row: span 3; margin-top: 0; }
  .sec-painel .sec-body { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
  .sec-painel .sec-body > * { grid-column: 1 / -1; }
  .sec-painel .live, .sec-painel .qr-card { grid-column: auto; margin-bottom: 1.5rem; }
  .qr-card { grid-template-columns: auto 1fr; align-items: center; }
  .sec-painel .sec-body > p:first-of-type { max-width: 44em; }
}

/* Uma única animação de entrada: a pintura da máquina se revela */
@media (prefers-reduced-motion: no-preference) {
  .top .stripe { transform-origin: left; animation: draw 0.9s var(--ease) both; }
  .hero h1 { animation: rise 0.8s var(--ease) 0.15s both; }
  .hero .expand, .hero .lead, .hero .hero-status { animation: rise 0.8s var(--ease) 0.3s both; }
  .hero-photo img { animation: reveal 1.1s var(--ease) 0.2s both; }
  .hero::before { animation: slide 1s var(--ease) 0.1s both; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes slide { from { transform: translateX(30%); opacity: 0; } to { transform: none; opacity: 1; } }

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