:root {
  --bg-deep: #081216;
  --bg: #0c1a1f;
  --panel: rgba(18, 36, 42, 0.92);
  --panel-edge: rgba(196, 168, 120, 0.22);
  --text: #f2ebe0;
  --muted: #9aadae;
  --accent: #c4a878;
  --accent-strong: #e0c48a;
  --accent-dim: rgba(196, 168, 120, 0.14);
  --ok: #6fbf9a;
  --danger: #d9786a;
  --field: rgba(6, 14, 18, 0.72);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(196, 168, 120, 0.16), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(58, 110, 118, 0.28), transparent 50%),
    linear-gradient(165deg, #0a161b 0%, #0c1a1f 45%, #102429 100%);
}

.shell {
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: max(0.85rem, env(safe-area-inset-top)) 1.25rem max(0.85rem, env(safe-area-inset-bottom));
  gap: 0.75rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand__icon {
  border-radius: 7px;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand__sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.progress__track {
  width: min(10rem, 28vw);
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: inherit;
  transition: width 0.45s var(--ease);
}

.progress__label {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--panel-edge);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.slider {
  position: relative;
  height: 100%;
  width: 100%;
}

.widget {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(1.1rem, 3vw, 2.25rem);
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.55s var(--ease),
    opacity 0.4s ease;
  will-change: transform, opacity;
}

.widget--intro {
  padding: 0;
}

.intro-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.intro-hero__media {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.intro-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transform: scale(1.02);
  animation: intro-zoom 8s var(--ease) both;
}

.intro-hero__image--skyline {
  object-position: center 35%;
}

.intro-hero--topic .intro-hero__title {
  max-width: 14ch;
}

.intro-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 55%, rgba(8, 18, 22, 0.55) 100%),
    linear-gradient(180deg, rgba(8, 18, 22, 0.12) 0%, rgba(8, 18, 22, 0.35) 100%);
  pointer-events: none;
}

.intro-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: linear-gradient(165deg, rgba(14, 30, 36, 0.98), rgba(10, 20, 24, 0.98));
  animation: intro-rise 0.7s var(--ease) both;
}

.intro-hero__title {
  max-width: 11ch;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
}

.intro-hero__lead {
  margin-bottom: 0.35rem;
}

.intro-hero__actions {
  margin-top: 0.85rem;
}

.intro-hero__credit {
  margin: 1.25rem 0 0;
  color: rgba(154, 173, 174, 0.7);
  font-size: 0.72rem;
}

@keyframes intro-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes intro-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.widget--active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.widget--exit-left {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

.widget--enter-from-right {
  transform: translateX(110%);
  opacity: 0;
}

.widget__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.widget__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 18ch;
}

.widget__lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
  max-width: 42ch;
}

.widget__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-content: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 0.82rem;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--field);
  color: var(--text);
  font: inherit;
  outline: none;
}

.textarea {
  min-height: 4.5rem;
  resize: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(196, 168, 120, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.7rem;
}

.field--check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.widget__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  flex-shrink: 0;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 2.85rem;
  padding: 0.65rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #d8b87a);
  color: #1a1208;
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: rgba(196, 168, 120, 0.45);
  background: var(--accent-dim);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
}

.review__card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.18);
  min-width: 0;
}

.review__card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.review__card dl {
  margin: 0;
  display: grid;
  gap: 0.25rem;
}

.review__card dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.review__card dd {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.message--ok {
  background: rgba(111, 191, 154, 0.12);
  border: 1px solid rgba(111, 191, 154, 0.35);
  color: #cceedd;
}

.message--error {
  background: rgba(217, 120, 106, 0.12);
  border: 1px solid rgba(217, 120, 106, 0.35);
  color: #f0c4bc;
}

.success-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  height: 100%;
  max-width: 36rem;
}

.success-block__ref {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent-strong);
}

@media (max-width: 760px) {
  .shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .form-grid,
  .review {
    grid-template-columns: 1fr;
  }

  .widget {
    padding: 1rem 0.95rem 1.1rem;
  }

  .widget--intro {
    padding: 0;
  }

  .intro-hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(38%, 0.42fr) minmax(0, 1fr);
  }

  .intro-hero__veil {
    background:
      linear-gradient(180deg, transparent 35%, rgba(8, 18, 22, 0.75) 100%);
  }

  .intro-hero__copy {
    padding: 1rem 1rem 1.15rem;
  }

  .intro-hero__title {
    max-width: none;
  }

  .widget__title {
    max-width: none;
  }

  .widget__actions {
    flex-direction: column;
  }

  .widget__actions .btn {
    width: 100%;
  }
}

@media (max-height: 720px) {
  .widget__lead {
    margin-bottom: 0.85rem;
  }

  .form-grid {
    gap: 0.55rem 0.85rem;
  }

  .input,
  .select,
  .textarea {
    min-height: 2.4rem;
  }
}
