:root {
  --paper: #f6f1ea;
  --paper-raised: #fffaf4;
  --ink: #241910;
  --ink-soft: #5e4b3c;
  --line: #e4d5c6;
  --band: #efe4d6;
  --focus: #8c3a24;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --space: clamp(3.5rem, 8vw, 6.5rem);
  --content: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
.brand,
.steps__n {
  font-family: var(--font-serif);
  font-weight: 560;
  letter-spacing: -0.03em;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 0.85rem 1.25rem;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 1.45rem;
  text-decoration: none;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-right: auto;
}

.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.topnav a:hover {
  color: var(--ink);
}

.hero,
.section {
  width: min(var(--content), calc(100% - 2.5rem));
  margin-inline: auto;
}

.hero {
  padding: var(--space) 0 calc(var(--space) * 0.7);
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--focus);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.02;
}

h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.lead,
.section__text {
  max-width: 38rem;
  margin-top: 1.15rem;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--small {
  min-height: 2.3rem;
  padding-inline: 0.9rem;
  font-size: 0.92rem;
}

.btn:hover {
  background: #3a2a22;
  border-color: #3a2a22;
}

.btn--ghost:hover {
  background: var(--band);
}

.section {
  padding-bottom: var(--space);
}

.section__intro {
  margin-bottom: 1.8rem;
}

.cards,
.steps {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards li,
.steps li {
  padding: 1.25rem 1.2rem 1.35rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.cards h3,
.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.cards p,
.steps p {
  color: var(--ink-soft);
}

.steps__n {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--focus);
  font-size: 1.4rem;
}

.panel {
  margin: 0;
}

.panel__frame {
  padding: 0.8rem;
  border-radius: 1rem;
  background: #0a0a0a;
  color: #eaeaea;
  font-family: var(--font-mono);
}

.panel__bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  color: #8b8ba7;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chambers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.cell {
  min-width: 0;
  padding: 0.55rem 0.5rem 0.45rem;
  background: #1e1e1e;
  border: 3px solid transparent;
  border-radius: 6px;
}

.cell--hot {
  border-color: #ff3b3b;
}

.cell--rest {
  background: color-mix(in srgb, #ffe000 12%, #1e1e1e);
}

.cell--livre {
  background: color-mix(in srgb, #848484 10%, #1e1e1e);
}

.cell__top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 3.2rem;
}

.cell__id {
  display: block;
  color: #ffe000;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.cell__batch {
  display: block;
  margin-top: 0.15rem;
  color: #fff;
  font-size: 0.72rem;
}

.cell__lote {
  display: block;
  color: #ff8800;
  font-size: 0.68rem;
}

.cell__hist {
  color: #fff;
  font-size: 0.62rem;
  text-align: right;
}

.cell__hist b {
  color: #00ffff;
  font-weight: 700;
}

.cell__hist span {
  display: block;
}

.cell__rule {
  height: 1px;
  margin: 0.35rem 0 0.4rem;
  background: #848484;
}

.cell__value {
  color: #00ffff;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  text-align: center;
}

.cell__value--rest {
  color: #ffe000;
  font-size: 0.95rem;
}

.cell__value--livre {
  color: #848484;
}

.cell--sync {
  position: relative;
}

.cell--sync::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  bottom: 1.7rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00ff00;
}

.cell__time {
  min-height: 1rem;
  color: #fff;
  font-size: 0.72rem;
  text-align: center;
}

.panel figcaption {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.section--band {
  width: 100%;
  padding-inline: max(1.25rem, calc((100% - var(--content)) / 2));
  background: var(--band);
  padding-top: var(--space);
}

.form {
  display: grid;
  gap: 0.9rem;
  max-width: 32rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
}

.form__status {
  margin: 0;
  color: var(--focus);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  width: min(var(--content), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .cards,
  .steps,
  .chambers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chambers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 7.25rem;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topnav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
