:root {
  --bg: #000000;
  --panel: rgba(8, 8, 8, 0.96);
  --panel-soft: rgba(16, 16, 16, 0.94);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --ink: #1d1617;
  --paper: #ffffff;
  --paper-soft: #faf5f5;
  --red: #e40a14;
  --red-dark: #90000a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(228, 10, 20, 0.16), transparent 24%),
    linear-gradient(180deg, #040404 0%, #000000 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: 310px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(7, 7, 7, 0.94));
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.sidebar-head,
.filter-group,
.nav-group {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
}

.sidebar-head {
  padding: 0.95rem 1rem 0.85rem;
}

.sidebar-wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 0.88;
  text-transform: uppercase;
}

.sidebar-subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-mark {
  display: inline-flex;
  color: #ffffff;
  flex: 0 0 auto;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark--sidebar {
  width: 38px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.7rem;
}

.filter-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.68rem 0.92rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.filter-chip.is-active {
  background: linear-gradient(180deg, var(--red) 0%, #b80010 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.15rem;
}

#email-nav {
  display: grid;
  gap: 0.75rem;
}

.nav-group {
  padding: 0.7rem;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.nav-group-title {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-group-count {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-group-items {
  display: grid;
  gap: 0.45rem;
}

.nav-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.is-active {
  border-color: rgba(228, 10, 20, 0.5);
  background: linear-gradient(135deg, rgba(64, 0, 4, 0.92), rgba(228, 10, 20, 0.28));
}

.nav-item-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-item-copy {
  display: grid;
  gap: 0.24rem;
}

.nav-item-copy strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.75);
}

.nav-item-copy span {
  font-size: 0.84rem;
  line-height: 1.36;
}

.workspace {
  padding: 1.15rem;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(18, 10, 12, 0.92));
}

.workspace-kicker,
.meta-label,
.comparison-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.workspace-copy h1 {
  margin: 0.32rem 0 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 0.92;
  text-transform: uppercase;
}

#workspace-context {
  margin: 0.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
}

.context-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 700;
}

.context-text {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0;
  font-size: 0.88rem;
}

.workspace-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 240px;
}

.workspace-nav-buttons {
  display: flex;
  gap: 0.6rem;
}

.ghost-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.82rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.ghost-button:hover:not(:disabled),
.ghost-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.flow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.9rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--red) 0%, #b80010 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(228, 10, 20, 0.18);
  transition: transform 180ms ease, filter 180ms ease;
}

.flow-button:hover,
.flow-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.preview-stage {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 2px);
  background:
    radial-gradient(circle at top right, rgba(228, 10, 20, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(18, 12, 14, 0.94));
  box-shadow: var(--shadow);
  overflow: auto;
}

.email-card {
  width: min(920px, 100%);
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.email-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.email-hero {
  background: #120405;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.email-body {
  padding: clamp(1.35rem, 4vw, 2.8rem);
}

.body-meta {
  display: grid;
  gap: 1.1rem;
  padding: 1.2rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff7f7 0%, #fffdfd 100%);
  border: 1px solid rgba(228, 10, 20, 0.14);
}

.meta-accent {
  width: 86px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red) 0%, rgba(228, 10, 20, 0.18) 100%);
}

.body-meta h2 {
  margin: 0.42rem 0 0;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1;
  text-transform: uppercase;
}

.body-meta p {
  margin: 0.42rem 0 0;
  color: #5d494d;
  line-height: 1.7;
}

.email-body > p,
.info-card p,
.section-block p,
.comparison-card p,
.closing-line {
  font-size: 1rem;
  line-height: 1.9;
  color: #34262b;
}

.greeting {
  margin-top: 1.8rem;
  font-size: 1.04rem;
  font-weight: 700;
}

.merge-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: rgba(228, 10, 20, 0.1);
  color: #8a0010;
  font-weight: 800;
}

.info-card,
.section-block,
.comparison-card {
  border-radius: 20px;
  border: 1px solid rgba(30, 16, 20, 0.08);
  background: var(--paper-soft);
}

.info-card,
.section-block {
  margin-top: 1.35rem;
  padding: 1.25rem;
}

.info-card h3,
.section-block h3,
.comparison-card h3 {
  margin: 0 0 0.5rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
  margin-top: 1.4rem;
}

.comparison-card {
  padding: 1.25rem;
}

.comparison-label {
  color: var(--red);
}

.number-stack {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.35rem;
}

.number-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  align-items: start;
  padding: 1.05rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(30, 16, 20, 0.08);
  background: #fff;
  box-shadow: 0 16px 32px rgba(95, 23, 28, 0.06);
}

.number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0%, #b3000d 100%);
  color: #fff;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.number-item h4 {
  margin: 0 0 0.28rem;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 1.9rem;
  line-height: 1;
}

.number-item p {
  margin: 0;
  color: #4a3c41;
  line-height: 1.74;
}

.cta-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.9rem;
}

.cta-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.5rem;
  min-width: min(100%, 460px);
  background: linear-gradient(180deg, var(--red) 0%, #bf0010 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(228, 10, 20, 0.22);
  transition: transform 180ms ease, filter 180ms ease;
}

.cta-button:nth-child(2) {
  min-width: min(86%, 340px);
}

.cta-button:nth-child(3) {
  min-width: min(72%, 260px);
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.signoff {
  margin-top: 1.9rem;
  font-weight: 700;
  line-height: 1.9;
}

.email-footer {
  min-height: 190px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04)),
    url("assets/banner-rodape-burntech.png") center center / cover no-repeat;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-scroll {
    max-height: 420px;
  }
}

@media (max-width: 820px) {
  .workspace-header {
    flex-direction: column;
  }

  .workspace-actions {
    width: 100%;
  }

  .workspace-nav-buttons {
    width: 100%;
  }

  .ghost-button {
    flex: 1 1 auto;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .sidebar,
  .workspace,
  .preview-stage {
    padding: 1rem;
  }

  .preview-stage {
    margin-top: 1rem;
  }

  .number-item {
    grid-template-columns: 1fr;
  }

  .number-badge {
    width: 52px;
    height: 52px;
  }

  .cta-button,
  .cta-button:nth-child(2),
  .cta-button:nth-child(3) {
    min-width: 100%;
  }
}
