:root {
  --urban-black: #111111;
  --orange: #ff7a00;
  --orange-dark: #e85f00;
  --ice: #f7f7f5;
  --paper: #ffffff;
  --soft-gray: #d9d9d9;
  --graphite: #444444;
  --muted: #6c6c6c;
  --line: #e7e3dd;
  --success: #23814c;
  --shadow: 0 18px 48px rgba(17, 17, 17, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--urban-black);
  background:
    linear-gradient(90deg, rgba(255, 122, 0, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    var(--ice);
  background-size: 56px 56px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  margin-bottom: 18px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 0.9;
}

.brand-lockup strong {
  color: var(--orange);
}

.brand-pin {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 4px solid var(--orange);
  border-radius: 50% 50% 50% 8px;
  color: transparent;
  font-family: "Manrope", sans-serif;
  transform: rotate(-45deg);
}

.brand-pin::after {
  content: "NB";
  color: var(--orange);
  font-size: 11px;
  line-height: 1;
  transform: rotate(45deg);
}

.header-note {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--graphite);
  font-size: 14px;
  font-weight: 700;
}

.step-card {
  display: block;
}

.preview-step {
  margin-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  min-height: 300px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
  padding: 44px;
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-height: 300px;
  overflow: hidden;
  padding: 38px;
  background:
    radial-gradient(circle at 72% 26%, rgba(255, 122, 0, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(255, 122, 0, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px),
    #ffffff;
  background-size: auto, 42px 42px, 42px 42px, auto;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid var(--line);
  pointer-events: none;
}

.hero-brand-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: "Manrope", sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 0.9;
}

.hero-brand-mark strong {
  color: var(--orange);
}

.hero-pin {
  width: 82px;
  height: 82px;
  border-width: 8px;
}

.hero-pin::after {
  font-size: 18px;
}

.hero-visual p {
  position: relative;
  z-index: 1;
  max-width: 320px;
  margin: 0;
  color: var(--graphite);
  font-size: 18px;
  line-height: 1.45;
}

.hero-visual strong {
  color: var(--urban-black);
}

.hero-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  padding: 9px 11px;
  border: 1px solid rgba(255, 122, 0, 0.22);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.08);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
}

.hero h1,
.preview-topbar h2,
.contract-header h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  line-height: 1.02;
}

.hero h1 {
  max-width: 620px;
  margin-top: 12px;
  font-size: 48px;
}

.subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--graphite);
  font-size: 17px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-indicator {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.step-pill {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.step-pill.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--paper);
}

.step-pill.is-complete {
  border-color: rgba(35, 129, 76, 0.22);
  background: rgba(35, 129, 76, 0.08);
  color: var(--success);
}

.contract-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: 24px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--urban-black);
  font-size: 13px;
  font-weight: 800;
}

label input,
label textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid var(--soft-gray);
  border-radius: 8px;
  background: var(--paper);
  color: var(--urban-black);
  font: inherit;
  font-weight: 500;
}

label input:focus,
label textarea:focus {
  outline: 3px solid rgba(255, 122, 0, 0.18);
  border-color: var(--orange);
}

.span-2 {
  grid-column: span 2;
}

.actions,
.review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.preview-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 22px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.preview-topbar h2 {
  margin-top: 8px;
  font-size: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--orange);
  color: var(--paper);
}

.button-primary:hover {
  background: var(--orange-dark);
}

.button-secondary {
  border-color: var(--orange);
  background: var(--paper);
  color: var(--orange-dark);
}

.button.is-disabled {
  border-color: var(--soft-gray);
  background: #eeeeec;
  color: var(--muted);
  pointer-events: none;
}

.button-success {
  background: var(--success);
  color: var(--paper);
}

.button-success:hover {
  background: #1d6d40;
}

.contract-preview {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 46px;
}

.contract-header {
  border-bottom: 2px solid var(--urban-black);
  margin-bottom: 24px;
  padding-bottom: 18px;
}

.company-name {
  margin: 0 0 8px;
  color: var(--orange);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contract-header h3 {
  font-size: 30px;
}

.contract-preview section {
  margin-bottom: 22px;
}

.contract-preview h4 {
  margin: 0 0 10px;
  color: var(--urban-black);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contract-preview h4::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--orange);
}

.contract-preview p {
  margin: 0 0 9px;
  color: #242424;
  line-height: 1.62;
}

.signature-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.signature-line span {
  display: block;
  width: 100%;
  border-top: 1px solid var(--urban-black);
  margin-bottom: 10px;
}

.info-card,
.success-card {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 30px;
}

.info-card h3,
.success-card h3 {
  margin: 0 0 12px;
  font-family: "Manrope", sans-serif;
  font-size: 28px;
  font-weight: 800;
}

.info-card p,
.success-card p {
  margin: 0 0 10px;
  color: var(--graphite);
  line-height: 1.65;
}

.client-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 18px 0;
}

.client-summary p,
.pdf-status {
  margin: 0;
  color: var(--graphite);
  line-height: 1.55;
}

.client-summary strong {
  color: var(--urban-black);
}

.pdf-status {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.pix-box {
  margin: 22px 0 6px;
  padding: 18px;
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.07);
}

.pix-label {
  color: var(--orange-dark) !important;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.pix-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.pix-key-row strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.copy-feedback {
  min-height: 22px;
  margin-top: 10px !important;
  color: var(--success) !important;
  font-weight: 700;
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .app-header,
  .preview-topbar {
    grid-template-columns: 1fr;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero-copy {
    padding: 30px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-visual {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .field-grid,
  .client-summary,
  .signature-blocks {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .contract-form,
  .contract-preview,
  .info-card,
  .success-card {
    padding: 18px;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .preview-topbar h2 {
    font-size: 28px;
  }

  .actions,
  .pix-key-row,
  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
