:root {
  --ink: #17130f;
  --paper: #ead8b1;
  --paper-bright: #f4e7c9;
  --red: #c91f19;
  --red-dark: #8f100d;
  --gold: #d5a11e;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto auto;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(24, 18, 12, 0.08) 50%, transparent 50.2%),
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.35), transparent 28%),
    var(--paper);
  transition: background-color 0.5s ease;
}

.page-shell.is-approved {
  background-color: #e2bd59;
}

.noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, transparent 0 2px, rgba(20, 15, 10, 0.08) 3px 4px),
    repeating-linear-gradient(91deg, transparent 0 6px, rgba(255, 255, 255, 0.08) 7px 8px);
  mix-blend-mode: multiply;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 3rem);
  color: var(--paper-bright);
  background: var(--ink);
  font-size: clamp(0.64rem, 1vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.operation-tag {
  color: #ff5148;
}

.symbol-field {
  position: absolute;
  inset: 3.5rem 0 auto;
  z-index: -1;
  height: 60rem;
  pointer-events: none;
  overflow: hidden;
}

.symbol-field span {
  position: absolute;
  color: rgba(143, 16, 13, 0.075);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(8rem, 22vw, 24rem);
  line-height: 1;
}

.symbol-field span:nth-child(1) { top: 1%; left: -3%; transform: rotate(-12deg); }
.symbol-field span:nth-child(2) { top: 4%; right: -2%; transform: rotate(11deg); }
.symbol-field span:nth-child(3) { top: 28%; left: 27%; transform: rotate(8deg); }
.symbol-field span:nth-child(4) { top: 37%; right: 20%; transform: rotate(-8deg); }
.symbol-field span:nth-child(5) { top: 60%; left: -1%; transform: rotate(10deg); }
.symbol-field span:nth-child(6) { top: 61%; right: -3%; transform: rotate(-10deg); }
.symbol-field span:nth-child(7) { top: 80%; left: 28%; transform: rotate(-6deg); }
.symbol-field span:nth-child(8) { top: 82%; right: 25%; transform: rotate(5deg); }

.hero {
  width: min(1500px, 100%);
  margin: auto;
  padding: clamp(1.5rem, 4vw, 4.5rem) clamp(1rem, 5vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
}

.copy-column {
  position: relative;
  z-index: 3;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
  color: var(--red-dark);
  font-size: clamp(0.7rem, 1.2vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.kicker-star {
  display: grid;
  place-items: center;
  width: 1.8rem;
  aspect-ratio: 1;
  color: var(--paper-bright);
  background: var(--red);
  border-radius: 50%;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(4rem, 8.4vw, 9.1rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display-line {
  display: block;
  margin: 0.08em 0;
}

.display-line--red {
  color: var(--red);
  text-shadow: 4px 4px 0 var(--ink);
}

.dek {
  max-width: 570px;
  margin: clamp(1.4rem, 3vw, 2.2rem) 0 1.6rem;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.4;
}

.action-button {
  width: min(100%, 540px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.45rem 0.4rem clamp(1.25rem, 3vw, 2rem);
  border: 4px solid var(--ink);
  color: var(--paper-bright);
  background: var(--red);
  box-shadow: 8px 8px 0 var(--ink);
  cursor: pointer;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  letter-spacing: 0.035em;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.action-button:hover {
  transform: translate(-2px, -2px);
  background: #ed2c23;
  box-shadow: 11px 11px 0 var(--ink);
}

.action-button:active {
  transform: translate(6px, 6px);
  box-shadow: 2px 2px 0 var(--ink);
}

.action-button:focus-visible,
.reset-button:focus-visible {
  outline: 4px solid #3157d8;
  outline-offset: 4px;
}

.button-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.3rem;
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--paper-bright);
  border: 3px solid var(--ink);
  font-family: Arial, sans-serif;
  font-size: 1.8rem;
}

.fine-print {
  max-width: 510px;
  margin: 1.2rem 0 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.62;
}

.visual-column {
  position: relative;
  min-width: 0;
}

.poster-frame {
  position: relative;
  width: min(100%, 590px);
  margin-inline: auto;
  padding: 0.8rem;
  border: 5px solid var(--ink);
  background: var(--paper-bright);
  box-shadow: 16px 16px 0 var(--red);
  transform: rotate(1.3deg);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.55s ease;
}

.is-approved .poster-frame {
  transform: rotate(-1.1deg) scale(1.025);
  box-shadow: 18px 18px 0 var(--gold), 24px 24px 0 var(--ink);
}

.portrait-stack {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  background: var(--red);
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.42s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.42s ease;
}

.portrait--strict {
  opacity: 1;
  transform: scale(1.01);
  filter: saturate(0.82) contrast(1.08);
}

.portrait--happy {
  opacity: 0;
  transform: scale(1.12) rotate(2deg);
}

.is-approved .portrait--strict {
  opacity: 0;
  transform: scale(0.9) rotate(-3deg);
}

.is-approved .portrait--happy {
  opacity: 1;
  transform: scale(1);
}

.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.25rem 0.05rem;
  font-size: clamp(0.62rem, 1vw, 0.78rem);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.portrait-caption strong {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.8rem;
  color: var(--red);
}

.z-stamp {
  position: absolute;
  top: -2.1rem;
  right: -2.2rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(5.2rem, 10vw, 7.5rem);
  aspect-ratio: 1;
  color: var(--paper-bright);
  background: var(--red);
  border: 5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(3.2rem, 7vw, 5rem);
  line-height: 1;
  transform: rotate(9deg);
}

.v-stamp {
  position: absolute;
  top: 5.2rem;
  left: -2.4rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(4.2rem, 8vw, 6.2rem);
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--gold);
  border: 5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--red);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.2rem);
  line-height: 1;
  transform: rotate(-10deg);
}

.svo-ribbon {
  position: absolute;
  left: -2.6rem;
  bottom: 3.6rem;
  z-index: 3;
  width: calc(100% + 5.2rem);
  padding: 0.75rem 1rem;
  color: var(--paper-bright);
  background: var(--ink);
  border-block: 3px solid var(--paper-bright);
  font-size: clamp(0.62rem, 1.2vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-4deg);
}

.military-banner {
  position: relative;
  width: min(1500px, calc(100% - clamp(2rem, 8vw, 8rem)));
  min-height: clamp(320px, 48vw, 660px);
  margin: 0 auto clamp(2rem, 5vw, 5rem);
  overflow: hidden;
  border: 6px solid var(--ink);
  background: var(--ink);
  box-shadow: 18px 18px 0 var(--red);
}

.military-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.military-banner__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 12, 8, 0.9), rgba(15, 12, 8, 0.12) 56%, rgba(15, 12, 8, 0.35));
}

.military-banner__copy {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(48rem, 54%);
  padding: clamp(1.5rem, 5vw, 5rem);
  color: var(--paper-bright);
  text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.75);
}

.military-banner__copy span {
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.18em;
}

.military-banner__copy strong {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(5rem, 14vw, 13rem);
  line-height: 0.84;
  letter-spacing: -0.04em;
}

.military-banner__copy strong i {
  color: var(--red);
  font-style: normal;
}

.military-banner__copy b {
  width: fit-content;
  margin-top: 1rem;
  padding: 0.45rem 0.9rem;
  color: var(--ink);
  background: var(--paper-bright);
  border: 3px solid var(--red);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  letter-spacing: 0.06em;
}

.banner-stripe {
  position: absolute;
  right: -3rem;
  bottom: 1.3rem;
  z-index: 3;
  padding: 0.55rem 3rem;
  color: var(--paper-bright);
  background: var(--red);
  border-block: 3px solid var(--paper-bright);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.6rem);
  letter-spacing: 0.16em;
  transform: rotate(-3deg);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.approval-stamp {
  display: grid;
  place-items: center;
  width: 9.5rem;
  aspect-ratio: 1;
  padding: 1rem;
  border: 0.38rem double var(--red);
  border-radius: 50%;
  color: var(--red);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  line-height: 0.9;
  text-align: center;
  transform: rotate(-9deg);
}

.approval-stamp small {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.reset-button {
  padding: 0.8rem 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confetti {
  position: fixed;
  inset: -10vh 0 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.confetti span {
  position: absolute;
  top: -12vh;
  color: var(--red);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.1rem, 3vw, 2.6rem);
  text-shadow: 2px 2px 0 var(--paper-bright);
  animation: rain linear infinite;
}

.confetti span:nth-child(2n) {
  color: var(--gold);
}

.confetti span:nth-child(4n) {
  color: var(--ink);
}

@keyframes rain {
  0% { transform: translateY(-10vh) rotate(0deg); }
  100% { transform: translateY(125vh) rotate(540deg); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-block: 2rem 4rem;
  }

  h1 {
    font-size: clamp(4.2rem, 18vw, 7.6rem);
  }

  .visual-column {
    order: -1;
  }

  .poster-frame {
    width: min(78vw, 490px);
  }

  .copy-column {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
  }

  .kicker,
  .result-actions {
    justify-content: center;
  }

  .dek,
  .fine-print,
  .action-button {
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .masthead {
    align-items: flex-start;
    font-size: 0.56rem;
  }

  .hero {
    overflow: hidden;
    padding-inline: 1rem;
  }

  .poster-frame {
    width: calc(100% - 1.5rem);
    box-shadow: 9px 9px 0 var(--red);
  }

  .z-stamp {
    top: -1.2rem;
    right: -1rem;
  }

  .v-stamp {
    top: 3.8rem;
    left: -1rem;
  }

  .svo-ribbon {
    left: -1rem;
    width: calc(100% + 2rem);
  }

  h1 {
    font-size: clamp(3.7rem, 19vw, 6rem);
  }

  .result-actions {
    flex-direction: column;
  }

  .military-banner {
    width: calc(100% - 2rem);
    min-height: 420px;
    box-shadow: 9px 9px 0 var(--red);
  }

  .military-banner__copy {
    width: 100%;
    justify-content: flex-end;
    padding-bottom: 4rem;
    background: linear-gradient(0deg, rgba(15, 12, 8, 0.9), transparent 82%);
  }

  .military-banner__copy strong {
    font-size: clamp(5rem, 26vw, 8rem);
  }
}

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