:root {
  --ink: #0d0b08;
  --paper: #f2efe7;
  --paper-light: #faf8f2;
  --yellow: #f5ca00;
  --muted: #625f58;
  --line: rgba(13, 11, 8, 0.22);
  --white: #ffffff;
  --blue: #123a94;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(13, 11, 8, 0.14) 0.55px, transparent 0.7px);
  background-size: 9px 9px;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.political-booth {
  min-height: 100vh;
  padding: 0 28px 30px;
}

.site-header {
  width: calc(100% + 56px);
  min-height: 230px;
  margin: 0 -28px;
  display: grid;
  place-items: center;
  padding: 28px 20px 25px;
  align-items: center;
  color: var(--white);
  background: #08378e;
  border-top: 6px solid var(--yellow);
  border-bottom: 0;
}

.campaign-mark {
  display: grid;
  justify-items: center;
  text-align: center;
}

.rank-mark {
  position: relative;
  width: 26px;
  height: 35px;
  margin-bottom: 12px;
}

.rank-mark i {
  position: absolute;
  left: 5px;
  width: 16px;
  height: 16px;
  border-top: 3px solid var(--yellow);
  border-left: 3px solid var(--yellow);
  transform: rotate(45deg);
}

.rank-mark i:nth-child(1) { top: 0; }
.rank-mark i:nth-child(2) { top: 8px; }
.rank-mark i:nth-child(3) { top: 16px; }

.mark-kicker {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.mark-name {
  color: var(--white);
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.mark-name em {
  color: var(--yellow);
  font-style: normal;
}

.mark-role {
  margin-top: 12px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.43em;
  text-transform: uppercase;
}

.journey-strip {
  width: min(1180px, 100%);
  margin: 22px auto 10px;
  display: flex;
  justify-content: flex-end;
  gap: 22px;
}

.journey-strip span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #918d84;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-strip b {
  font-size: 9px;
}

.journey-strip .active,
.journey-strip .done {
  color: var(--ink);
}

.journey-strip .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  background: var(--yellow);
}

.selection-card,
.capture-card,
.result-card {
  width: min(1180px, 100%);
  margin: 0 auto 36px;
}

.selection-card {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 105px);
}

.selection-intro {
  padding: 42px 0 52px;
}

.eyebrow {
  display: block;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.selection-intro h1,
.stage-heading h1,
.result-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 7.2vw, 88px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: -0.072em;
}

.highlight-word {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0 0.08em 0.04em;
}

.highlight-word::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.02em;
  right: -0.06em;
  bottom: -0.01em;
  height: 0.56em;
  background: var(--yellow);
}

.lead-copy {
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.format-block {
  margin-top: 35px;
}

.section-label {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-label b {
  padding-bottom: 2px;
  color: var(--muted);
  border-bottom: 2px solid var(--yellow);
  font-size: 9px;
}

.thumbnail-list {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.thumbnail {
  width: 82px;
  padding: 0;
  display: grid;
  justify-items: start;
  gap: 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.thumbnail-art,
.large-preview,
.camera-stage {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #d4dbea, #8ea1c4);
}

.thumbnail-art {
  width: 64px;
  display: block;
  border: 1px solid var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.thumbnail:hover .thumbnail-art {
  transform: translateY(-3px);
}

.thumbnail.selected .thumbnail-art {
  transform: translate(-4px, -4px);
  box-shadow: 7px 7px 0 var(--yellow);
}

.thumbnail-name {
  font-size: 10px;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.thumbnail.selected .thumbnail-name {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.sample-person {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -2%;
  width: 55%;
  height: 70%;
  transform: translateX(-50%);
  border-radius: 48% 48% 18% 18%;
  background: linear-gradient(#efc3a5 0 26%, #203d85 27% 100%);
  box-shadow: 0 -42px 0 -15px #202646;
}

.frame-overlay,
.uploaded-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.uploaded-frame {
  object-fit: fill;
}

.frame-modelo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14%;
  background: #071c52;
  border-top: 8px solid var(--yellow);
}

.frame-support-copy {
  position: absolute;
  z-index: 1;
  left: 7%;
  bottom: 4%;
  color: var(--white);
  font-size: 24px;
  font-weight: 950;
}

.selection-action {
  margin-top: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.next-button,
.accept-button {
  min-height: 58px;
  padding: 0 30px;
  color: var(--white);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 6px 0 var(--yellow);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.next-button:hover:not(:disabled),
.accept-button:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 3px 0 var(--yellow);
}

.upload-button {
  min-height: 44px;
  padding: 0 0 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-weight: 900;
}

.next-button:disabled,
.upload-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.file-input {
  display: none;
}

.local-note {
  margin: 18px 0 0;
  color: #777269;
  font-size: 10px;
}

.error-message {
  margin: 15px 0 0;
  color: #a92d2d;
  font-size: 12px;
  font-weight: 800;
}

.preview-panel {
  min-height: 610px;
  padding: 35px clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 2px solid var(--ink);
}

.preview-heading {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-heading strong {
  padding-bottom: 3px;
  color: var(--ink);
  border-bottom: 3px solid var(--yellow);
}

.preview-canvas {
  min-height: 490px;
  padding: 32px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(13, 11, 8, 0.13);
}

.large-preview {
  width: min(340px, 100%);
  border: 2px solid var(--ink);
  box-shadow: 13px 13px 0 var(--yellow);
}

.preview-footnote {
  margin-top: 19px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.capture-card,
.result-card {
  min-height: 640px;
  padding: 52px 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(340px, 1.28fr);
  align-items: center;
  gap: clamp(40px, 8vw, 100px);
}

.stage-heading h1,
.result-copy h1 {
  font-size: clamp(48px, 6vw, 76px);
}

.stage-heading p,
.result-copy > p {
  max-width: 460px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.capture-workspace {
  padding-left: clamp(20px, 4vw, 48px);
  display: grid;
  justify-items: center;
  border-left: 2px solid var(--ink);
}

.camera-stage {
  width: min(440px, 100%);
  border: 2px solid var(--ink);
  box-shadow: 13px 13px 0 var(--yellow);
}

.camera-stage video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.camera-stage video.mirrored {
  transform: scaleX(-1);
}

.countdown {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(13, 11, 8, 0.44);
  font-size: clamp(110px, 25vw, 190px);
  font-weight: 950;
}

.capture-controls {
  width: min(440px, 100%);
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
}

.small-button,
.light-button {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.shutter-button {
  width: 72px;
  height: 72px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
}

.shutter-button span {
  width: 48px;
  height: 48px;
  border: 3px solid var(--white);
  border-radius: 50%;
}

.result-card {
  grid-template-columns: minmax(280px, 470px) minmax(280px, 1fr);
}

.result-card > img {
  width: calc(100% - 14px);
  display: block;
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--yellow);
}

.result-actions {
  max-width: 370px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 14px;
}

.result-actions .light-button {
  min-height: 58px;
  border-radius: 999px;
  font-size: 13px;
}

.link-button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 8px 0 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.simple-footer {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 19px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.simple-footer strong {
  color: var(--ink);
}

.consent-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background-color: rgba(242, 239, 231, 0.97);
  background-image: radial-gradient(rgba(13, 11, 8, 0.12) 0.55px, transparent 0.7px);
  background-size: 9px 9px;
}

.consent-modal {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--yellow);
}

.consent-brand {
  min-height: 460px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  background: var(--ink);
}

.consent-brand::before {
  content: "";
  width: 80px;
  height: 9px;
  margin-bottom: 34px;
  background: var(--yellow);
}

.consent-brand small {
  margin-bottom: 11px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.consent-brand strong {
  color: var(--white);
  font-size: clamp(27px, 3.5vw, 40px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.06em;
  overflow-wrap: anywhere;
}

.consent-content {
  padding: clamp(38px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.consent-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.4vw, 50px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.consent-content > p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.privacy-points {
  margin-top: 23px;
  display: grid;
  gap: 9px;
}

.privacy-points span {
  padding-bottom: 8px;
  display: flex;
  gap: 11px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 750;
}

.privacy-points b {
  color: var(--muted);
  font-size: 9px;
}

.consent-warning {
  display: block;
  margin-top: 12px;
  color: #a92d2d;
  font-size: 11px;
}

.consent-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.decline-button {
  min-height: 40px;
  padding: 0 0 2px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  cursor: pointer;
  font-weight: 850;
}

@media (max-width: 860px) {
  .selection-card,
  .capture-card,
  .result-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .preview-panel,
  .capture-workspace {
    min-height: 0;
    padding: 42px 24px;
    border-top: 2px solid var(--ink);
    border-left: 0;
  }

  .stage-heading,
  .result-copy {
    padding: 30px 0;
  }

  .result-copy {
    text-align: center;
  }

  .result-copy > p,
  .result-actions {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 620px) {
  .political-booth {
    padding: 0 15px 20px;
  }

  .site-header {
    width: calc(100% + 30px);
    min-height: 188px;
    margin: 0 -15px;
    padding: 20px 12px 19px;
  }

  .rank-mark {
    height: 29px;
    margin-bottom: 8px;
    transform: scale(0.82);
  }

  .mark-kicker {
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: 0.38em;
  }

  .mark-name {
    font-size: clamp(21px, 6.4vw, 27px);
  }

  .mark-role {
    margin-top: 9px;
    font-size: 8px;
    letter-spacing: 0.38em;
  }

  .journey-strip {
    margin: 17px auto 5px;
    justify-content: flex-start;
    gap: 14px;
  }

  .selection-card {
    min-height: 0;
  }

  .selection-intro {
    padding: 42px 2px 38px;
  }

  .selection-intro h1 {
    font-size: clamp(50px, 16vw, 68px);
  }

  .lead-copy {
    margin-top: 25px;
    font-size: 14px;
  }

  .thumbnail-list {
    gap: 10px;
  }

  .thumbnail {
    width: 72px;
  }

  .thumbnail-art {
    width: 57px;
  }

  .selection-action {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .next-button {
    width: calc(100% - 6px);
  }

  .upload-button {
    align-self: flex-start;
  }

  .preview-panel,
  .capture-workspace {
    padding: 34px 16px 40px;
  }

  .preview-canvas {
    min-height: 385px;
    padding: 22px;
  }

  .large-preview,
  .camera-stage {
    width: calc(100% - 14px);
    box-shadow: 9px 9px 0 var(--yellow);
  }

  .preview-footnote {
    text-align: left;
  }

  .capture-card,
  .result-card {
    min-height: 0;
    padding: 30px 0 50px;
  }

  .stage-heading,
  .result-copy {
    padding: 22px 2px;
  }

  .stage-heading h1,
  .result-copy h1 {
    font-size: 52px;
  }

  .capture-controls {
    gap: 7px;
  }

  .small-button {
    padding: 0 7px;
    font-size: 9px;
  }

  .result-card > img {
    width: calc(100% - 14px);
    justify-self: center;
    box-shadow: 9px 9px 0 var(--yellow);
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-actions .link-button {
    grid-column: auto;
    justify-self: center;
  }

  .consent-backdrop {
    padding: 12px;
  }

  .consent-modal {
    width: calc(100% - 10px);
    grid-template-columns: 1fr;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-shadow: 6px 6px 0 var(--yellow);
  }

  .consent-brand {
    min-height: 150px;
    padding: 24px;
  }

  .consent-brand::before {
    width: 55px;
    height: 7px;
    margin-bottom: 22px;
  }

  .consent-brand strong {
    font-size: clamp(19px, 6vw, 24px);
    letter-spacing: -0.045em;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .consent-content {
    padding: 30px 24px 34px;
  }

  .consent-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .consent-actions .accept-button {
    width: calc(100% - 6px);
  }

  .decline-button {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
