:root {
  --yellow: #fcad01;
  --navy: #0b1f3a;
  --navy-2: #102b50;
  --red: #d8232a;
  --red-dark: #ac171d;
  --cream: #fff6df;
  --white: #ffffff;
  --ink: #172033;
  --muted: #627085;
  --line: #dbe1e8;
  --green: #15805d;
  --shadow: 0 22px 60px rgba(11, 31, 58, .16);
}

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

html {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  color-scheme: light;
  background: var(--yellow) !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--yellow) !important;
  background-image: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--navy) 0 68%, var(--red) 68% 100%);
  z-index: 100;
  pointer-events: none;
}

img, svg, canvas { max-width: 100%; }
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: 100%;
  max-width: 1044px;
  margin-inline: auto;
  padding: clamp(42px, 7vw, 72px) clamp(14px, 3.6vw, 32px) 28px;
}

.hero {
  width: 100%;
  min-width: 0;
  margin-bottom: clamp(20px, 4vw, 30px);
}

.campaign-kicker {
  display: inline-flex;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(11,31,58,.15);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255,255,255,.66);
  font-size: clamp(.64rem, 1.8vw, .75rem);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .10em;
  overflow-wrap: anywhere;
}

.brand-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(92px, 15vw, 150px);
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  width: 100%;
  min-width: 0;
  margin-top: 14px;
}

.title-copy,
.result-heading,
.field,
.metric { min-width: 0; }

h1 {
  margin: 0 0 14px;
  max-width: 100%;
  color: var(--navy);
  font-size: clamp(2.55rem, 7.5vw, 5.35rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.058em;
  overflow-wrap: normal;
}

h1 span { color: var(--red); }

.hero-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(.98rem, 2.2vw, 1.31rem);
  line-height: 1.48;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hero-subtitle strong {
  color: var(--red-dark);
  font-weight: 900;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1.08;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: clamp(100px, 17vw, 170px);
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(11,31,58,.12));
}

.calculator {
  width: 100%;
  min-width: 0;
  padding: clamp(18px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(11,31,58,.08);
  border-radius: clamp(20px, 3vw, 30px);
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow);
}

.selector-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.field {
  display: grid;
  gap: 9px;
}

.field span {
  color: var(--navy);
  font-weight: 800;
  overflow-wrap: anywhere;
}

select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  appearance: none;
  border: 1.5px solid #c9d3de;
  border-radius: 15px;
  padding: 14px 46px 14px 14px;
  color: var(--ink);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--navy) 50%),
    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(11,31,58,.09);
}

select:disabled {
  opacity: .55;
  cursor: not-allowed;
  background-color: #eef1f4;
}

.hint {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f4f7fa;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.result-panel {
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  animation: reveal .35s ease both;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.result-label {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

#enquadramento {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 1.14rem;
  overflow-wrap: anywhere;
}

.text-button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--red-dark);
  padding: 8px 0;
  font-weight: 800;
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.metric {
  min-height: 170px;
  padding: clamp(18px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.metric-eyebrow {
  font-size: .84rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
  overflow-wrap: anywhere;
}

.metric strong {
  display: block;
  max-width: 100%;
  margin: 8px 0 4px;
  color: var(--navy);
  font-size: clamp(1.75rem, 5vw, 2.7rem);
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
}

.metric small {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.metric-career {
  background: #f1f7f5;
  border-color: #cde4dc;
}

.metric-career strong { color: #116849; }

.metric-calote {
  grid-column: 1 / -1;
  min-height: 215px;
  position: relative;
  border: 0;
  color: #fff;
  background: linear-gradient(130deg, var(--red-dark), var(--red));
}

.metric-calote::after {
  content: "R$";
  position: absolute;
  right: 24px;
  bottom: -31px;
  font-size: clamp(6rem, 16vw, 9rem);
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,.08);
}

.metric-calote .metric-eyebrow,
.metric-calote small {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.80);
}

.metric-calote strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 4.8rem);
}

.impact-copy {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 17px 18px;
  border-left: 4px solid var(--navy);
  border-radius: 0 14px 14px 0;
  background: var(--cream);
}

.impact-copy strong { color: var(--navy); }
.impact-copy span {
  color: #546176;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  min-height: 50px;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 850;
  cursor: pointer;
  white-space: normal;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button-primary {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 9px 22px rgba(11,31,58,.18);
}
.button-primary:hover { background: var(--navy-2); }
.button-secondary {
  color: var(--navy);
  border-color: #bfcad6;
  background: #fff;
}

.data-note {
  margin: 20px auto 0;
  max-width: 880px;
  color: var(--navy);
  text-align: center;
  font-size: clamp(.72rem, 1.7vw, .82rem);
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.campaign-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 6px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.campaign-footer img {
  display: block;
  width: min(92vw, 760px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
}

#share-canvas {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .page-shell { padding-top: 44px; }
  .brand-title-row { grid-template-columns: minmax(0, 1fr) clamp(76px, 22vw, 108px); }
  .brand-logo { max-height: 124px; }
  .selector-grid,
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric-calote { grid-column: auto; }
  .metric { min-height: 145px; }
  .metric-calote { min-height: 190px; }
  .actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
}

@media (max-width: 480px) {
  .page-shell { padding: 38px 12px 20px; }
  .campaign-kicker { letter-spacing: .07em; }
  .brand-title-row {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 10px;
    align-items: center;
  }
  h1 {
    margin-bottom: 10px;
    font-size: clamp(2.15rem, 11vw, 3rem);
    letter-spacing: -.05em;
  }
  .hero-subtitle { font-size: .93rem; }
  .brand-logo { max-height: 94px; }
  .calculator { padding: 16px; border-radius: 20px; }
  .result-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .metric strong { font-size: clamp(1.7rem, 9vw, 2.25rem); }
  .metric-calote strong { font-size: clamp(2.25rem, 12vw, 3.15rem); }
  .campaign-footer { padding-inline: 6px; }
  .campaign-footer img { width: min(96vw, 620px); }
}

@media (max-width: 350px) {
  .page-shell { padding-inline: 9px; }
  .brand-title-row { grid-template-columns: minmax(0, 1fr) 64px; gap: 8px; }
  .brand-logo { max-height: 78px; }
  h1 { font-size: 2rem; }
  .hero-subtitle { font-size: .87rem; }
  .calculator { padding: 13px; }
  .metric { padding: 16px 14px; }
  .metric strong { font-size: 1.72rem; }
  .metric-calote strong { font-size: 2.25rem; }
}

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