:root {
  --brand-primary: #0067a8;
  --brand-secondary: #00a7b5;
  --brand-accent: #cf5f4f;
  --ink: #0f3148;
  --ink-soft: #557184;
  --paper: #ffffff;
  --mist: #eef7f8;
  --line: rgba(6, 103, 168, 0.16);
  --shadow: 0 26px 70px rgba(7, 58, 93, 0.24);
  color-scheme: light;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--mist);
}

body.is-loading .site-header,
body.is-loading .intro,
body.is-error .intro {
  visibility: hidden;
}

body.is-loading .hero__media,
body.is-loading .hero__shade,
body.is-error .hero__media,
body.is-error .hero__shade {
  opacity: 0;
}

body.is-ready .site-header,
body.is-ready .intro,
body.is-error .site-header {
  visibility: visible;
}

body.is-ready .hero__media,
body.is-ready .hero__shade {
  opacity: 1;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand img {
  display: block;
  max-width: min(180px, 46vw);
  max-height: 48px;
  width: auto;
  height: auto;
}

.header-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.9rem;
  color: var(--brand-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-secondary) 9%, white);
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  overflow: hidden;
  isolation: isolate;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media {
  z-index: -2;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 180ms ease;
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 58, 93, 0.92), color-mix(in srgb, var(--brand-primary) 72%, transparent) 45%, rgba(238, 247, 248, 0.88)),
    linear-gradient(180deg, rgba(11, 38, 56, 0.12), rgba(11, 38, 56, 0.48));
  transition: opacity 180ms ease;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 530px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.25rem);
  max-width: 1220px;
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 5rem) 1.5rem;
}

.intro {
  max-width: 640px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--brand-secondary);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1,
.wizard-panel h2 {
  margin: 0;
  font-weight: 760;
  letter-spacing: 0;
}

.intro h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 5.7rem);
  line-height: 0.98;
}

.intro p:last-child {
  max-width: 34rem;
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
}

.wizard-panel {
  width: 100%;
  min-height: 590px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.state-card {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  min-height: 420px;
  text-align: center;
}

.state-card h2,
.wizard-step h2 {
  color: #0b2638;
  font-size: clamp(1.9rem, 3.8vw, 2.55rem);
  line-height: 1.05;
}

.state-card p,
.muted,
.privacy-copy,
.wizard-step > p {
  color: var(--ink-soft);
  line-height: 1.6;
}

.loader {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.5rem;
  border: 4px solid color-mix(in srgb, var(--brand-primary) 18%, white);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stepper {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
}

.step-dot.is-active {
  color: #ffffff;
  border-color: var(--brand-primary);
  background: var(--brand-primary);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.info-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.info-list span {
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 9%, white);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.field {
  display: grid;
  gap: 0.48rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 760;
}

.field.full {
  margin-top: 1rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.9rem 0.95rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.field input {
  min-height: 52px;
}

.field input[readonly] {
  color: var(--brand-primary);
  font-weight: 800;
  background: color-mix(in srgb, var(--brand-primary) 6%, white);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-secondary) 16%, transparent);
}

.photo-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.photo-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-section h3 {
  margin: 0;
  color: #0b2638;
  font-size: 1.08rem;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.72rem;
  color: #8a3f34;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-accent) 10%, white);
  white-space: nowrap;
}

.status-pill.is-ready {
  color: var(--brand-primary);
  border-color: color-mix(in srgb, var(--brand-secondary) 28%, transparent);
  background: color-mix(in srgb, var(--brand-secondary) 12%, white);
}

.photo-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 1rem;
}

.photo-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--brand-primary) 28%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 8%, white);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: center;
}

.photo-empty__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--brand-primary);
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-secondary) 12%, white);
}

svg {
  display: block;
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
}

.photo-actions,
.camera-controls,
.wizard-actions {
  display: grid;
  gap: 0.75rem;
}

.photo-actions {
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.camera-controls,
.wizard-actions {
  grid-template-columns: 0.75fr 1.25fr;
}

.action-button,
.ghost-button,
.primary-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 0.95rem;
  border-radius: 8px;
  font-weight: 820;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.action-button,
.ghost-button {
  color: var(--brand-primary);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.action-button:hover,
.ghost-button:hover,
.action-button:focus-visible,
.ghost-button:focus-visible {
  border-color: color-mix(in srgb, var(--brand-secondary) 42%, transparent);
  box-shadow: 0 10px 24px rgba(7, 58, 93, 0.08);
  transform: translateY(-1px);
}

.ghost-button:disabled,
.submit-button:disabled {
  color: #a4b2bb;
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.primary-button,
.submit-button {
  color: #ffffff;
  border: 1px solid var(--brand-primary);
  background: var(--brand-primary);
}

.primary-button:hover,
.submit-button:hover,
.primary-button:focus-visible,
.submit-button:focus-visible {
  background: color-mix(in srgb, var(--brand-primary) 84%, #000000);
  border-color: color-mix(in srgb, var(--brand-primary) 84%, #000000);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--brand-primary) 24%, transparent);
  transform: translateY(-1px);
}

.submit-button {
  min-height: 56px;
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  font-size: 1rem;
}

.camera-tray {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 8%, white);
}

.camera-tray video {
  display: block;
  width: 100%;
  max-height: 280px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: #0b2638;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.75rem;
  color: var(--ink);
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
}

.summary-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.summary-grid div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.summary-grid span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-grid strong {
  overflow-wrap: anywhere;
}

.form-message {
  min-height: 1.3rem;
  margin: 1rem 0;
  color: #8a3f34;
  font-size: 0.9rem;
  font-weight: 760;
}

.form-message.is-success {
  color: var(--brand-primary);
}

@media (max-width: 920px) {
  .site-header {
    min-height: 70px;
    padding-inline: 1.25rem;
  }

  .hero,
  .hero__content {
    min-height: auto;
  }

  .hero__content {
    grid-template-columns: 1fr;
    padding-block: 3rem;
  }

  .intro h1 {
    max-width: 12ch;
  }

  .wizard-panel {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 1rem;
  }

  .brand img {
    max-width: 142px;
  }

  .header-kicker {
    min-height: 30px;
    padding-inline: 0.68rem;
    font-size: 0.66rem;
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 58, 93, 0.86), color-mix(in srgb, var(--brand-primary) 58%, transparent) 42%, rgba(238, 247, 248, 0.92)),
      rgba(11, 38, 56, 0.2);
  }

  .hero__content {
    padding: 2rem 1rem;
  }

  .intro h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .field-grid,
  .photo-layout,
  .photo-actions,
  .choice-grid,
  .camera-controls,
  .wizard-actions {
    grid-template-columns: 1fr;
  }

  .photo-preview {
    width: min(100%, 220px);
  }
}
