:root {
  --navy: #07111f;
  --charcoal: #111317;
  --ink: #f6f3ed;
  --muted: rgba(246, 243, 237, .68);
  --line: rgba(246, 243, 237, .14);
  --soft: rgba(246, 243, 237, .07);
  --orange: #e87800;
  --orange-light: #ffb15f;
  --green: #73d7a5;
  --red: #ff7a68;
  --yellow: #f3ca74;
  --serif: "Libre Baskerville", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    linear-gradient(135deg, rgba(7, 17, 31, .98), rgba(17, 19, 23, .96)),
    #07111f;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

button, input, a { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(255, 177, 95, .72); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 50;
  transform: translateY(-160%);
  color: var(--navy);
  background: var(--ink);
  padding: 10px 14px;
  border-radius: 6px;
}

.skip-link:focus { transform: translateY(0); }

.screen { display: none; min-height: 100vh; }
.screen.active { display: grid; animation: screenIn .36s ease both; }
.hidden { display: none !important; }

.intro-screen, .journey-screen {
  grid-template-columns: minmax(0, 1fr) minmax(500px, .9fr);
}

.intro-media, .chapter-media {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.intro-media img, .chapter-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.78) contrast(1.08) brightness(.72);
}

.intro-media::after, .media-shade {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, .2), rgba(7, 17, 31, .84)),
    linear-gradient(0deg, rgba(7, 17, 31, .76), transparent 52%);
}

.intro-copy {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 58px);
  background: linear-gradient(135deg, rgba(7, 17, 31, .98), rgba(17, 19, 23, .96));
}

.eyebrow, .chapter-label {
  margin: 0 0 14px;
  color: var(--orange-light);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, p, blockquote { margin-top: 0; }

h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
}

.intro-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
}

.intro-actions, .panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, opacity .2s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.button-primary {
  color: #160d05;
  background: linear-gradient(135deg, #ffd29a, var(--orange-light) 35%, var(--orange));
  box-shadow: 0 18px 46px rgba(232, 120, 0, .24);
}

.button-quiet {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255,255,255,.045);
}

.chapter-media { display: flex; align-items: end; }

.chapter-narrative {
  position: absolute;
  left: clamp(24px, 4vw, 72px);
  right: clamp(24px, 5vw, 92px);
  bottom: clamp(34px, 6vw, 88px);
  z-index: 2;
}

.chapter-narrative p {
  margin-bottom: 14px;
  color: var(--orange-light);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.chapter-narrative blockquote {
  max-width: 780px;
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.13;
}

.chapter-panel {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: clamp(22px, 3vw, 46px);
  background: rgba(8, 15, 25, .98);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  color: var(--ink);
  font-weight: 950;
  letter-spacing: .08em;
}

.progress-copy {
  width: min(240px, 50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-track, .processing-track {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}

.progress-track span, .processing-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  transition: width .35s ease;
}

.question-area {
  align-self: center;
}

.question-area h2 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0;
}

.question-area > p:not(.chapter-label):not(.validation) {
  max-width: 620px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.56;
}

.option-grid, .money-grid {
  display: grid;
  gap: 12px;
}

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

.option, .field {
  min-height: 70px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
}

.option {
  padding: 16px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.option:hover, .option.selected {
  border-color: rgba(255,177,95,.62);
  background: rgba(232,120,0,.11);
  transform: translateY(-1px);
}

.option input { inline-size: 18px; block-size: 18px; margin: 0 12px 0 0; accent-color: var(--orange); }
.option span { font-weight: 760; line-height: 1.3; }

.field {
  min-height: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  cursor: text;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.field input {
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 22px;
  font-weight: 850;
}

.field input::placeholder { color: rgba(246, 243, 237, .32); }
.single-field { max-width: 260px; }

.validation {
  min-height: 22px;
  margin: 14px 0 0;
  color: #ffb4a9;
  font-size: 13px;
  font-weight: 700;
}

.panel-actions {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.processing-screen, .results-screen {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.processing-screen {
  place-items: center;
}

.processing-box {
  width: min(720px, 100%);
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
}

.processing-ring {
  width: 92px;
  height: 92px;
  margin: 0 auto 28px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: var(--orange-light);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.processing-box h2 {
  min-height: 74px;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.results-screen.active { display: block; }

.results-hero {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: clamp(26px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(7,17,31,.9), rgba(7,17,31,.14)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=82") center/cover;
}

.results-hero h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
}

.results-hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(246, 243, 237, .78);
  font-size: 18px;
  line-height: 1.55;
}

.results-host {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.impact-grid article, .story-section, .score-section, .pillars-section, .projection-section, .silence-section, .human-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.026));
}

.impact-grid article {
  min-height: 210px;
  padding: 24px;
}

.impact-grid span, .pillar span, .projection-bars span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.impact-grid strong {
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.impact-grid p, .story-section p, .score-section p, .projection-section p, .human-section p {
  color: var(--muted);
  line-height: 1.55;
}

.impact-grid .accent {
  border-color: rgba(255,177,95,.42);
  background: linear-gradient(145deg, rgba(232,120,0,.18), rgba(255,255,255,.032));
}

.story-section, .score-section, .pillars-section, .projection-section, .silence-section, .human-section {
  padding: clamp(24px, 4vw, 46px);
}

.story-section h3, .score-section h3, .pillars-section h3, .projection-section h3, .silence-section h3, .human-section h3 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
}

.timeline li {
  min-height: 70px;
  display: grid;
  align-content: center;
  border-top: 4px solid rgba(255,255,255,.15);
  color: rgba(246, 243, 237, .45);
  font-size: 12px;
  font-weight: 850;
}

.timeline li.active {
  border-color: var(--orange-light);
  color: var(--ink);
}

.score-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: center;
}

.score-section h3 {
  color: var(--orange-light);
  font-size: clamp(62px, 10vw, 120px);
}

.score-meter {
  height: 260px;
  display: grid;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}

.score-meter span {
  display: block;
  height: var(--score);
  min-height: 6px;
  border-radius: 6px;
  background: linear-gradient(0deg, var(--orange), var(--green));
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.pillar {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.pillar strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.pillar p {
  min-height: 68px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pillar div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
}

.pillar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange-light);
}

.pillar.forte i { background: var(--green); }
.pillar.vulnerável i { background: var(--red); }
.pillar.atenção i { background: var(--yellow); }

.projection-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 28px;
}

.projection-bars {
  min-height: 360px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
}

.projection-bars div {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 9px;
}

.projection-bars strong {
  font-size: 15px;
  line-height: 1.25;
}

.projection-bars i {
  display: block;
  min-height: 22px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(0deg, var(--orange), var(--orange-light));
}

.projection-controls, .projection-live {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.projection-controls label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.projection-controls input { accent-color: var(--orange); }

.projection-live {
  grid-template-columns: repeat(4, 1fr);
  color: var(--muted);
}

.projection-live strong {
  color: var(--ink);
}

.silence-section {
  min-height: 54vh;
  display: grid;
  align-content: center;
  text-align: center;
  background: linear-gradient(145deg, rgba(246,243,237,.09), rgba(255,255,255,.012));
}

.silence-section h3, .silence-section p {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.silence-section p {
  color: var(--orange-light);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
}

.deliverables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 26px 0;
}

.deliverables span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  font-weight: 750;
}

.human-section .button {
  margin-right: 10px;
  margin-bottom: 10px;
}

.legal {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

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