:root {
  color-scheme: light;
  --ink: #142033;
  --muted: #67758a;
  --line: #dce3ee;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --yellow: #f6d600;
  --blue: #1769e0;
  --green: #17855c;
  --danger: #c62828;
  --shadow: 0 18px 46px rgba(6, 14, 26, 0.18);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(8, 14, 22, 0.18), rgba(8, 14, 22, 0.94)),
    url("/fondo.png") center top / cover fixed;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(460px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 28px;
}

.hero {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  padding: 18px;
  color: white;
  border-radius: 0 0 24px 24px;
  background:
    linear-gradient(90deg, rgba(4, 9, 16, 0.92), rgba(4, 9, 16, 0.62) 48%, rgba(4, 9, 16, 0.18)),
    linear-gradient(180deg, rgba(4, 9, 16, 0.12), rgba(4, 9, 16, 0.76)),
    url("/fondo.png") center / cover;
  box-shadow: var(--shadow);
}

.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-logo {
  width: 178px;
  max-width: 70%;
  height: auto;
  display: block;
}

.pill {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero__content {
  width: 100%;
  max-width: 360px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 14, 22, 0.82), rgba(8, 14, 22, 0.48));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(4px);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  font-size: 36px;
  line-height: 0.98;
  margin-bottom: 12px;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.hero p {
  max-width: 330px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.45;
  font-weight: 600;
}

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

.stepper,
.panel {
  box-shadow: 0 14px 32px rgba(6, 14, 26, 0.12);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e3e9f2;
  color: #425169;
  font-weight: 900;
}

.step-dot.is-active {
  background: var(--yellow);
  color: #111;
}

.step-dot.is-complete {
  background: var(--green);
  color: white;
}

.step-line {
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: #e3e9f2;
}

.panel {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 48px 18px 18px;
}

.form-step[hidden] {
  display: none;
}

.section-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 16px;
  border-radius: 22px 0 16px 0;
  background: var(--yellow);
  color: #111;
  font-size: 13px;
  font-weight: 900;
}

.grid,
.capture-grid {
  display: grid;
  gap: 14px;
}

label span,
legend {
  display: block;
  margin-bottom: 8px;
  color: #263444;
  font-weight: 800;
}

input:not([type]) {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  background: #fbfcfe;
  color: var(--ink);
}

input:focus {
  outline: 4px solid rgba(31, 111, 235, 0.16);
  border-color: var(--blue);
}

fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  margin: 10px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.choice input {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.choice span,
.choice small,
.choice strong {
  display: block;
  margin: 0;
}

.choice small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.25;
}

.helper {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.capture-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.capture-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.example-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
}

.example-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1.58;
  object-fit: cover;
}

.example-photo figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 26, 39, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.capture-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: #111a27;
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.camera-icon {
  width: 22px;
  height: 17px;
  position: relative;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.camera-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.camera-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: -6px;
  width: 10px;
  height: 5px;
  border-radius: 4px 4px 0 0;
  background: currentColor;
}

.capture-preview {
  display: none;
  width: 100%;
  aspect-ratio: 1.58;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
}

.capture-card.has-image {
  border-color: rgba(23, 133, 92, 0.45);
  background: #eefaf5;
}

.capture-card.has-image .capture-preview {
  display: block;
}

.primary,
.secondary,
.icon-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.primary,
.secondary {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  padding: 0 18px;
}

.primary {
  background: var(--green);
  color: white;
}

.secondary {
  color: #102033;
  background: white;
  border: 1px solid var(--line);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
  line-height: 1;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.step-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

#formStatus.error,
.step-status.error {
  color: var(--danger);
}

.camera-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #05080c;
  color: white;
}

.camera-dialog::backdrop {
  background: #05080c;
}

.camera-head,
.camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.camera-head {
  min-height: 76px;
}

.camera-head span {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 14px;
}

.camera-stage {
  height: calc(100dvh - 168px);
  position: relative;
  background: #05080c;
}

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

.license-frame {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(86vw, 640px);
  aspect-ratio: 1.58;
  transform: translate(-50%, -50%);
  border: 3px solid var(--yellow);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.34);
}

.license-frame span {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: white;
}

.license-frame span:nth-child(1) {
  top: -3px;
  left: -3px;
  border-top: 5px solid;
  border-left: 5px solid;
}

.license-frame span:nth-child(2) {
  top: -3px;
  right: -3px;
  border-top: 5px solid;
  border-right: 5px solid;
}

.license-frame span:nth-child(3) {
  bottom: -3px;
  right: -3px;
  border-bottom: 5px solid;
  border-right: 5px solid;
}

.license-frame span:nth-child(4) {
  bottom: -3px;
  left: -3px;
  border-bottom: 5px solid;
  border-left: 5px solid;
}

.shutter {
  background: var(--yellow);
  color: #111;
}

@media (min-width: 760px) {
  .shell {
    width: min(920px, calc(100% - 48px));
    padding-top: 24px;
  }

  .hero {
    min-height: 360px;
    border-radius: 24px;
    padding: 26px;
  }

  .brand-logo {
    width: 240px;
  }

  h1 {
    font-size: 48px;
  }

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

  .actions {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .actions .primary,
  .actions .secondary {
    width: auto;
    min-width: 160px;
  }

  .camera-dialog {
    width: min(980px, calc(100vw - 40px));
    height: min(760px, calc(100dvh - 40px));
    margin: auto;
    border-radius: 22px;
    overflow: hidden;
  }

  .camera-stage {
    height: calc(min(760px, 100dvh - 40px) - 168px);
  }
}
