/* Gerador de Pôster — PITCH DAY EXPERIENCE 2026
   Two-column live editor: form (left) drives a read-only poster preview
   (right) that is also the exact print target at 36×48in. */

.poster-lab-section {
  position: relative;
  isolation: isolate;
  padding: clamp(140px, 20vw, 170px) 0 clamp(4rem, 7vw, 6rem);
  color: var(--xp-white);
}

.poster-lab-section::before {
  position: absolute;
  z-index: -2;
  inset: 0 calc(50% - 50vw);
  content: "";
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 107, 25, .14), transparent 24%),
    radial-gradient(circle at 84% 6%, rgba(53, 214, 229, .14), transparent 26%),
    linear-gradient(180deg, #030a18, #07162f 40%, #020916);
}

.poster-lab-intro {
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.poster-lab-intro h1 {
  max-width: 760px;
  margin: 1rem 0 0;
  font-family: var(--xp-display);
  font-weight: 800;
  letter-spacing: -.04em;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.02;
  text-wrap: balance;
}

.poster-lab-intro p {
  max-width: 640px;
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, .68);
  font-size: 1.02rem;
  line-height: 1.65;
}

.poster-lab {
  width: min(1420px, calc(100% - 48px));
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  display: grid;
  grid-template-columns: minmax(340px, .78fr) 1.22fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

/* ---------- Form column ---------- */

.poster-form {
  display: grid;
  gap: 12px;
}

.poster-step {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)),
    rgba(2, 10, 25, .58);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.poster-step summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  color: var(--xp-white);
  font: 800 .92rem/1.3 var(--xp-display);
  letter-spacing: -.01em;
}

.poster-step summary::-webkit-details-marker {
  display: none;
}

.poster-step-toggle {
  margin-left: auto;
  width: 30px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--xp-navy);
  background: var(--xp-cyan);
  border-radius: 50%;
  font: 400 1rem/1 var(--xp-mono);
  transition: transform .3s ease, background .3s ease;
}

.poster-step[open] .poster-step-toggle {
  background: var(--xp-orange);
  transform: rotate(45deg);
}

.poster-step-body {
  display: grid;
  gap: 14px;
  padding: 0 1.3rem 1.3rem;
}

.poster-step label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, .72);
  font: 800 .64rem/1.3 var(--xp-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.poster-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.poster-charcount {
  color: rgba(255, 255, 255, .4);
  font: 700 .6rem/1 var(--xp-mono);
  letter-spacing: .04em;
  text-transform: none;
}

.poster-charcount.is-near {
  color: var(--xp-orange);
}

.poster-step input[type="text"],
.poster-step input[type="file"],
.poster-step select,
.poster-step textarea {
  width: 100%;
  padding: 10px 13px;
  color: var(--xp-white);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  font: 600 .88rem/1.5 var(--xp-body);
  letter-spacing: 0;
  text-transform: none;
}

.poster-step textarea {
  min-height: 90px;
  resize: vertical;
}

.poster-step select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .82) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, .82) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 22px,
    calc(100% - 13px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.poster-step select option,
.poster-step select optgroup {
  color: #0b1220;
}

.poster-step input::placeholder,
.poster-step textarea::placeholder {
  color: rgba(255, 255, 255, .34);
}

.poster-step input:focus,
.poster-step select:focus,
.poster-step textarea:focus {
  outline: 2px solid var(--xp-cyan);
  outline-offset: 1px;
  background: rgba(255, 255, 255, .08);
}

.poster-lab-note {
  padding: 14px 16px;
  color: rgba(255, 255, 255, .58);
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: 16px;
  font-size: .82rem;
  line-height: 1.6;
}

/* ---------- Preview column ---------- */

.poster-preview-wrap {
  position: sticky;
  top: calc(var(--top-banner-height) + 96px);
}

.poster-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 14px;
}

.poster-toolbar span {
  color: rgba(255, 255, 255, .5);
  font: 700 .64rem/1 var(--xp-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.poster-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--xp-navy);
  background: var(--xp-lime);
  border: 0;
  border-radius: 999px;
  font: 800 .7rem/1 var(--xp-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.poster-print-btn:hover {
  background: var(--xp-cyan);
  transform: translateY(-2px);
}

.poster-scale {
  container-type: inline-size;
  container-name: poster;
  width: 100%;
  aspect-ratio: 36 / 48;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

/* ---------- The poster itself (also the print target) ----------
   Sized in cqw (container query width), not vw: the poster lives inside
   .poster-scale at whatever width the two-column layout gives it (and at
   a fixed 36in during print), so its own type scale must track that box's
   width, not the browser viewport. */

.poster {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  /* Light background keeps print ink to a minimum (mostly white paper). */
  background:
    radial-gradient(circle at 88% 6%, rgba(53, 214, 229, .08), transparent 26%),
    radial-gradient(circle at 8% 60%, rgba(201, 242, 91, .07), transparent 24%),
    #ffffff;
  color: var(--xp-navy);
  font-family: var(--xp-body);
  padding: 3.3% 2.4% 2.3%;
}

.poster-topstrip {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2.6%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--xp-lime), #91f4b2 45%, var(--xp-cyan));
  color: var(--xp-navy);
  font: 800 1cqw/1 var(--xp-mono);
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.poster-space {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.poster-star {
  position: absolute;
  width: .3%;
  aspect-ratio: 1;
  background: rgba(7, 22, 47, .16);
  border-radius: 50%;
  opacity: .5;
}

.poster-orbit {
  position: absolute;
  border: 1px solid rgba(53, 214, 229, .35);
  border-radius: 50%;
  transform: rotate(-19deg);
}

.poster-orbit.o1 { width: 60%; height: 22%; right: -12%; top: 8%; }
.poster-orbit.o2 { width: 72%; height: 26%; right: -24%; top: 16%; border-color: rgba(201, 242, 91, .4); }

/* Earth glow removed for the light theme (heavy ink on white). */
.poster-earth {
  display: none;
}

.poster-head {
  position: absolute;
  z-index: 3;
  left: 5%;
  right: 5%;
  top: 3.6%;
  height: 8.4%;
  display: flex;
  align-items: center;
  gap: 3%;
}

.poster-brand {
  height: 100%;
  width: auto;
  flex: 0 0 auto;
}

/* Startup name shown as a title beside the Pitch Day logo. */
.poster-startup-title {
  flex: 1 1 auto;
  min-width: 0;
  height: 74%;
  display: flex;
  align-items: center;
  padding-left: 3%;
  border-left: 1px solid rgba(7, 22, 47, .2);
}

.poster-startup-title span {
  display: block;
  width: 100%;
  color: var(--xp-navy);
  font-family: var(--xp-display);
  font-weight: 800;
  font-size: 2.4cqw;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

.poster-startup-title .placeholder {
  color: rgba(7, 22, 47, .35);
}

.poster-grid {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 13.4%;
  display: grid;
  grid-template-columns: 1.18fr 1.48fr 1.18fr;
  grid-template-rows: 25.5% 19.5% 15.2% 20.5%;
  gap: 1.05%;
}

/* Identity block now holds only the uploaded startup logo. */
.poster-center-id {
  grid-column: 2;
  grid-row: 1;
  width: 52%;
  aspect-ratio: 1 / 1;
  justify-self: center;
  align-self: center;
  border: 1.5px solid rgba(53, 214, 229, .55);
  color: var(--xp-navy);
  background: #ffffff;
  clip-path: polygon(12% 0, 88% 0, 100% 9%, 100% 84%, 83% 100%, 17% 100%, 0 84%, 0 9%);
  padding: 7%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* No logo uploaded: drop the whole identity block so there's no empty frame. */
.poster-center-id:has(.poster-logo-drop.is-empty) {
  display: none;
}

.poster-logo-drop {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--xp-white);
  background-image:
    linear-gradient(var(--xp-white), var(--xp-white)),
    linear-gradient(135deg, var(--xp-lime), var(--xp-cyan));
  background-origin: border-box;
  background-clip: content-box, border-box;
  border: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6%;
  box-shadow: 0 0 28px rgba(201, 242, 91, .38);
}

.poster-logo-drop.is-empty {
  display: none;
}

.poster-logo-drop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.poster-panel {
  background: #ffffff;
  border: 1.5px solid rgba(7, 22, 47, .2);
  border-radius: 18px;
  padding: 4.1% 4.3% 3.8%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--xp-navy);
}

.poster-panel-title {
  display: flex;
  align-items: center;
  gap: .6cqw;
  margin-bottom: .6cqw;
  min-height: 1.9cqw;
  color: var(--xp-navy);
  font-family: var(--xp-display);
  font-weight: 800;
  font-size: 1.15cqw;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.poster-panel-icon {
  width: 1.7cqw;
  height: 1.7cqw;
  border-radius: 50%;
  border: 2px solid var(--xp-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--xp-lime-dark, #7ea023);
  font-weight: 800;
  font-size: .95cqw;
  flex: 0 0 auto;
}

.poster-panel-text {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  font-family: var(--xp-body);
  font-size: .86cqw;
  line-height: 1.4;
  color: #1b2431;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.poster-panel-text .placeholder {
  color: #a0a4a8;
}

.poster-op { grid-column: 1; grid-row: 1; align-self: end; height: 68%; }
.poster-conc { grid-column: 3; grid-row: 1; align-self: end; height: 68%; }
.poster-sol { grid-column: 1 / span 2; grid-row: 2; }
.poster-fin { grid-column: 3; grid-row: 2; }
.poster-mercado { grid-column: 1 / span 2; grid-row: 3; }
.poster-equipe { grid-column: 3; grid-row: 3; }
.poster-modelo { grid-column: 1 / span 2; grid-row: 4; }
.poster-estagio { grid-column: 3; grid-row: 4; width: 53%; align-self: stretch; justify-self: start; }
.poster-contato { grid-column: 3; grid-row: 4; width: 45%; align-self: stretch; justify-self: end; }

.poster-stage-title {
  margin: .1cqw 0 .3cqw;
  font-family: var(--xp-display);
  font-weight: 800;
  font-size: .74cqw;
  letter-spacing: .1em;
  color: var(--xp-cyan-dark, #1690a0);
  text-transform: uppercase;
}

.poster-stage-title.orange {
  color: var(--xp-orange);
  margin-top: .6cqw;
}

.poster-checklist {
  font-family: var(--xp-body);
  font-size: .78cqw;
  line-height: 1.45;
  color: #1b2431;
}

.poster-checklist div {
  display: flex;
  gap: .35em;
}

.poster-checklist .mark {
  display: inline-block;
  min-width: .9em;
  font-weight: 800;
  color: var(--xp-orange);
}

.poster-rule {
  height: 1px;
  margin: .4cqw 0;
  background: linear-gradient(90deg, transparent, rgba(53, 214, 229, .5), transparent);
}

.poster-footer {
  position: absolute;
  z-index: 3;
  left: 3.8%;
  right: 3.8%;
  bottom: 1%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1cqw;
  color: var(--xp-navy);
  font: 800 .68cqw/1 var(--xp-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
}

.poster-footer::before,
.poster-footer::after {
  content: "✦";
  color: var(--xp-cyan-dark, #1690a0);
  font-size: 1.3cqw;
}

/* ---------- Print ---------- */

@page {
  size: 36in 48in;
  margin: 0;
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  /* Isolate the poster: hide all page chrome and the editor form. */
  body > *:not(#conteudo) {
    display: none !important;
  }

  .poster-lab-intro,
  .poster-form,
  .poster-toolbar,
  .poster-lab-section::before,
  .poster-lab-section::after {
    display: none !important;
  }

  #conteudo,
  .poster-lab-section,
  .poster-lab,
  .poster-preview-wrap {
    display: block !important;
    width: 36in !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .poster-scale {
    position: static !important;
    width: 36in !important;
    height: 48in !important;
    aspect-ratio: auto !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* Force the dark background + colour panels to render in the PDF
     without depending on the browser's "background graphics" toggle. */
  .poster-scale,
  .poster,
  .poster * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .poster-lab {
    grid-template-columns: 1fr;
  }

  .poster-preview-wrap {
    position: static;
  }

  .poster-scale {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .poster-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
  }
}
