:root {
  --cream: #f4eccf;
  --paper: #fff8dc;
  --blue: #3157d5;
  --orange: #f06a32;
  --yellow: #ffd84d;
  --green: #b8df4b;
  --purple: #7752b7;
  --ink: #20201f;
  --pink: #f5a3c7;
  --white: #fffdf4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(255,255,255,.48), transparent 24%),
    radial-gradient(circle at 82% 38%, rgba(255,255,255,.2), transparent 28%),
    var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

/* textura discreta: detalhe, não protagonista */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .05;
  background-image: radial-gradient(circle, #20201f 0 .7px, transparent .8px);
  background-size: 24px 24px;
  mix-blend-mode: multiply;
}

.page-shell {
  min-height: 100vh;
  position: relative;
  padding: 20px 24px 28px;
  overflow: hidden;
}

.wrapper {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-space {
  margin-top: 56px;
}

.shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.shape-orange {
  width: 220px;
  height: 205px;
  background: var(--orange);
  border-radius: 43% 57% 61% 39%;
  top: -78px;
  right: 7%;
  transform: rotate(-7deg);
}

.shape-blue {
  width: 300px;
  height: 215px;
  background: var(--blue);
  border-radius: 46% 54% 38% 62%;
  left: -180px;
  top: 590px;
  transform: rotate(12deg);
}

.shape-green {
  width: 120px;
  height: 120px;
  background: var(--green);
  right: -48px;
  top: 1060px;
  transform: rotate(18deg);
  clip-path: polygon(6% 8%, 92% 0, 100% 82%, 18% 100%, 0 56%);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.04em;
  font-size: 1.08rem;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-4deg);
}

.stage,
.eyebrow,
.section-kicker,
.level-status,
.build-label,
.mission {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.stage {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 8px 13px;
  font-size: .7rem;
  transform: rotate(2deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 54px;
  align-items: center;
  min-height: 500px;
}

.eyebrow {
  display: inline-block;
  background: var(--pink);
  padding: 7px 13px;
  margin-bottom: 14px;
  border: 2px solid var(--ink);
  font-size: .72rem;
  transform: rotate(-2deg);
}

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

h1 {
  max-width: 650px;
  margin-bottom: 22px;
  font-size: clamp(3.8rem, 7.1vw, 6.7rem);
  line-height: .81;
  letter-spacing: -.07em;
  text-transform: uppercase;
}

.title-blue {
  display: block;
  color: var(--blue);
}

.title-orange {
  position: relative;
  display: inline-block;
  width: fit-content;
  color: var(--orange);
}

.title-orange::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 1%;
  right: -4%;
  bottom: -6px;
  height: 13px;
  background: var(--green);
  transform: rotate(-1deg);
}

.intro {
  max-width: 650px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  line-height: 1.55;
}

.intro strong {
  background: var(--yellow);
  padding: 1px 4px;
}

.mission {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  padding: 12px 17px;
  border-radius: 100px;
  background: var(--ink);
  color: white;
  font-size: .74rem;
}

.mission-value {
  color: var(--green);
}


.hero-art {
  position: relative;
  min-height: 410px;
}

.paper-back {
  position: absolute;
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(32,32,31,.18);
}

.paper-back-one {
  width: 84%;
  height: 275px;
  right: 0;
  top: 52px;
  background: var(--paper);
  transform: rotate(4deg);
  clip-path: polygon(2% 4%, 12% 1%, 23% 4%, 35% 1%, 47% 3%, 60% 0, 73% 4%, 87% 1%, 99% 5%, 97% 96%, 88% 99%, 75% 96%, 61% 100%, 48% 97%, 34% 100%, 19% 96%, 5% 99%);
}

.paper-back-two {
  width: 74%;
  height: 250px;
  left: 4%;
  bottom: 18px;
  background: var(--pink);
  transform: rotate(-5deg);
  clip-path: polygon(0 6%, 9% 2%, 20% 5%, 34% 1%, 48% 4%, 62% 0, 78% 4%, 94% 2%, 100% 9%, 97% 94%, 84% 99%, 68% 95%, 54% 100%, 39% 96%, 21% 99%, 5% 95%);
}

.sun {
  position: absolute;
  z-index: 2;
  width: 180px;
  height: 180px;
  right: 14px;
  top: 12px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 8px 8px 0 var(--ink);
}

.hill {
  position: absolute;
  z-index: 3;
  width: 94%;
  height: 170px;
  right: 0;
  bottom: 20px;
  background: var(--green);
  border: 4px solid var(--ink);
  border-radius: 50% 50% 8% 8% / 70% 70% 10% 10%;
  transform: rotate(-3deg);
}

.file-character {
  position: absolute;
  z-index: 5;
  width: 155px;
  height: 190px;
  left: 42%;
  bottom: 58px;
  transform: translateX(-50%) rotate(3deg);
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 16px;
}

.file-character::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 48px;
  height: 48px;
  background: linear-gradient(225deg, var(--cream) 50%, transparent 50%);
  border-left: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}

.face {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 27px;
}

.eye {
  width: 9px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
}

.mouth {
  width: 34px;
  height: 11px;
  margin: 15px auto 0;
  border-bottom: 3px solid var(--ink);
  border-radius: 50%;
  transform: rotate(4deg);
}

.filename {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: .75rem;
}

.torn-paper {
  clip-path: polygon(2% 4%, 13% 1%, 25% 4%, 38% 1%, 51% 4%, 65% 0, 78% 4%, 92% 1%, 100% 8%, 97% 92%, 88% 98%, 73% 95%, 59% 100%, 45% 96%, 29% 99%, 15% 95%, 3% 98%);
}

.speech {
  position: absolute;
  z-index: 6;
  right: -1%;
  bottom: 42px;
  width: 180px;
  padding: 15px 17px;
  background: white;
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: .9rem;
  line-height: 1.22;
  transform: rotate(2deg);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, .88fr);
  gap: 38px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2,
.paper-panel h2,
.architecture-panel h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.7vw, 3.35rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.section-heading p {
  margin-bottom: 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.5;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 9px;
  font-size: .66rem;
}

/* Dark band: o contraste vira respiro visual */
.journey-dark {
  padding: 28px 32px 32px;
  background: var(--ink);
  color: white;
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--orange);
  transform: rotate(.2deg);
}

.journey-dark .section-heading p {
  color: #ece6d2;
}

.journey-dark .section-kicker {
  color: var(--green);
}

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

.level-card {
  position: relative;
  min-height: 160px;
  padding: 17px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink); /* evita herdar o branco do bloco escuro */
  box-shadow: 6px 6px 0 rgba(255,255,255,.1);
  transition: transform .18s ease;
}

.level-card:nth-child(2n) {
  transform: rotate(.5deg);
}

.level-card:nth-child(3n) {
  transform: rotate(-.5deg);
}

.level-card:hover {
  transform: translateY(-3px) rotate(0);
}

.level-card.current {
  background: var(--yellow);
  color: var(--ink);
}

.level-card.current::before {
  content: "";
  position: absolute;
  width: 66px;
  height: 18px;
  top: -10px;
  right: 20px;
  background: rgba(255,248,220,.85);
  border-left: 1px solid rgba(32,32,31,.18);
  border-right: 1px solid rgba(32,32,31,.18);
  transform: rotate(4deg);
}

.level-number {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.level-status {
  position: absolute;
  top: 16px;
  right: 14px;
  color: var(--ink);
  font-size: .52rem;
}

.level-card h3 {
  margin-bottom: 7px;
  font-size: 1.06rem;
}

.level-card p {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .88rem;
  line-height: 1.4;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.paper-panel,
.architecture-panel {
  min-height: 390px;
  padding: 34px 38px;
}

.paper-panel {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-.7deg);
}

.paper-panel::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 24px;
  top: -14px;
  left: 48%;
  background: rgba(245,163,199,.7);
  transform: rotate(-3deg);
}

.paper-panel p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.52;
}

.architecture-panel {
  background: var(--ink);
  color: white;
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--orange);
  transform: rotate(.7deg);
}

.section-kicker-light {
  color: var(--green);
}

.architecture-flow {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.architecture-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 12px;
  padding: 0 0 15px 26px;
}

.architecture-flow li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  bottom: -1px;
  width: 2px;
  background: var(--green);
}

.architecture-flow li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 2px var(--yellow);
  border-radius: 50%;
}

.architecture-flow strong {
  color: var(--yellow);
  font-size: .86rem;
}

.architecture-flow span {
  color: #ece6d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .86rem;
  line-height: 1.32;
}

.compact-heading {
  grid-template-columns: 1fr;
  max-width: 720px;
}

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

.build-card {
  min-height: 170px;
  padding: 19px;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.build-pink {
  background: var(--pink);
  transform: rotate(-.5deg);
}

.build-yellow {
  background: var(--yellow);
  transform: rotate(.4deg);
}

.build-dark {
  background: var(--ink);
  color: white;
  box-shadow: 6px 6px 0 var(--orange);
  transform: rotate(-.3deg);
}

.build-dark .build-label {
  color: var(--green);
}

.build-dark p {
  color: #ece6d2;
}

.build-label {
  display: block;
  margin-bottom: 16px;
  font-size: .6rem;
}

.build-card h3 {
  margin-bottom: 7px;
  font-size: 1.2rem;
}

.build-card p {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  line-height: 1.42;
}

.build-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  background: var(--green);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--blue);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
}

.build-link::after {
  content: "↗";
}

.build-link:hover,
.build-link:focus-visible {
  background: var(--yellow);
  outline: none;
}

.build-kumo {
  background: linear-gradient(135deg, var(--ink) 0%, #2b2520 100%);
  color: white;
  box-shadow: 6px 6px 0 var(--blue);
}

.build-kumo .build-label {
  color: var(--green);
}

.build-kumo p {
  color: #ece6d2;
}

.site-footer {
  margin-top: 56px;
  padding: 20px 20px 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: var(--ink);
  color: white;
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--blue);
  font-family: "Courier New", monospace;
  font-size: .75rem;
  font-weight: bold;
}

/* Laptops: mantém o design inteiro visível sem parecer ampliado */
@media (max-width: 1450px) {
  .wrapper {
    width: min(1080px, 100%);
  }

  .section-space {
    margin-top: 48px;
  }

  .hero {
    min-height: 460px;
    gap: 44px;
  }

  h1 {
    font-size: clamp(3.55rem, 6.6vw, 5.9rem);
  }

  .hero-art {
    min-height: 390px;
  }

  .section-heading h2,
  .paper-panel h2,
  .architecture-panel h2 {
    font-size: clamp(1.9rem, 3.35vw, 3rem);
  }

  .journey-dark {
    padding: 25px 28px 29px;
  }

  .level-card {
    min-height: 150px;
  }

  .paper-panel,
  .architecture-panel {
    min-height: 365px;
    padding: 30px 34px;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-art {
    width: min(570px, 100%);
    margin: 0 auto;
  }

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

  .split-section,
  .build-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px;
  }

  .section-space {
    margin-top: 42px;
  }

  .site-header {
    align-items: flex-start;
  }

  .logo {
    font-size: .96rem;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

  .hero-art {
    min-height: 360px;
  }

  .file-character {
    left: 40%;
  }

  .speech {
    right: 0;
    width: 165px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .journey-dark {
    padding: 22px 18px 24px;
  }

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

  .paper-panel,
  .architecture-panel {
    min-height: unset;
    padding: 28px 24px;
  }

  .architecture-flow li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* Level 07: navegação dinâmica pelos Levels */
.level-card {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.level-card:focus-visible {
  outline: 4px solid var(--green);
  outline-offset: 4px;
}

.level-card.selected {
  transform: translateY(-4px) rotate(0);
  box-shadow: 0 0 0 3px var(--green), 7px 7px 0 var(--orange);
}

.level-title,
.level-description {
  display: block;
}

.level-title {
  margin-bottom: 7px;
  font-size: 1.06rem;
  font-weight: 700;
}

.level-description {
  font-family: Georgia, "Times New Roman", serif;
  font-size: .88rem;
  line-height: 1.4;
}

.level-explorer {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 20px;
  scroll-margin-top: 24px;
}

.explorer-main {
  min-height: 100%;
  padding: 30px 32px;
  background: var(--ink);
  color: white;
  border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 var(--blue);
  transform: rotate(-.35deg);
}

.explorer-title-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

.explorer-number {
  color: var(--yellow);
  font-size: clamp(3.5rem, 6vw, 5.4rem);
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.06em;
}

.explorer-status {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.explorer-main h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: .95;
  letter-spacing: -.05em;
}

.explorer-summary {
  margin: 24px 0 22px;
  color: #ece6d2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.55;
}

.explorer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.explorer-tags span {
  padding: 6px 9px;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--orange);
  font-size: .66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.explorer-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.explorer-detail,
.architecture-snapshot {
  min-height: 130px;
  padding: 18px 19px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.explorer-detail p {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  line-height: 1.45;
}

.detail-label {
  display: block;
  margin-bottom: 11px;
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.explorer-paper {
  background: var(--paper);
}

.explorer-yellow {
  background: var(--yellow);
}

.explorer-pink {
  background: var(--pink);
}

.explorer-green {
  background: var(--green);
}

.architecture-snapshot {
  grid-column: 1 / -1;
  min-height: auto;
  background: var(--blue);
  color: white;
  box-shadow: 6px 6px 0 var(--ink);
}

.architecture-snapshot .detail-label {
  color: var(--yellow);
}

.architecture-snapshot code {
  display: block;
  color: white;
  font-family: "Courier New", monospace;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: normal;
}

@media (max-width: 980px) {
  .level-explorer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .explorer-details {
    grid-template-columns: 1fr;
  }

  .architecture-snapshot {
    grid-column: auto;
  }

  .explorer-main {
    padding: 24px;
  }
}
