:root {
  --ink: #0e241f;
  --ink-soft: #2f4840;
  --muted: #5a7168;
  --line: rgba(14, 36, 31, 0.1);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #f3f8f5;
  --accent: #147a63;
  --accent-mid: #1a8f74;
  --accent-deep: #0b4a3c;
  --accent-soft: #daf3eb;
  --warn: #8a6208;
  --error: #b4232f;
  --error-bg: #fdeced;
  --ok: #0c6b4a;
  --ok-bg: #e2f7ee;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px rgba(12, 50, 40, 0.12);
  --font: "Figtree", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Figtree", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: #dfeae4;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, #ebf4ef 0%, #e2ebe6 40%, #d8e5ee 100%);
}

.bg-mesh {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(26, 143, 116, 0.12), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(90, 130, 180, 0.14), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(20, 100, 80, 0.1), transparent 40%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  animation: float 16s var(--ease) infinite alternate;
}

.bg-orb-a {
  width: min(48vw, 460px);
  height: min(48vw, 460px);
  top: -12%;
  right: -8%;
  background: #8fd4bc;
}

.bg-orb-b {
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  bottom: 0;
  left: -10%;
  background: #a9c3e4;
  animation-delay: -5s;
}

.bg-orb-c {
  width: min(28vw, 240px);
  height: min(28vw, 240px);
  top: 45%;
  right: 10%;
  background: #c7e8d8;
  animation-delay: -9s;
  opacity: 0.4;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(16px, 28px, 0) scale(1.08); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.55; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes dash {
  to { stroke-dashoffset: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.anim-in { animation: rise 0.55s var(--ease) both; }

.shell {
  width: min(540px, calc(100% - 1.4rem));
  margin: 0 auto;
  padding: 1.15rem 0 2.75rem;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  animation: rise 0.45s var(--ease) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #1f9a7c 0%, #0d4a3c 100%);
  box-shadow: 0 10px 24px rgba(13, 74, 60, 0.3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 70%;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.brand-mark-inner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2.2px solid #fff;
  border-radius: 0.3rem;
  transform: rotate(14deg);
}

.brand-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-sub {
  margin: 0.18rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 122, 99, 0.18);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--accent-deep);
  white-space: nowrap;
}

.dot-live {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-mid);
  box-shadow: 0 0 0 0 rgba(26, 143, 116, 0.5);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(26, 143, 116, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(26, 143, 116, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 143, 116, 0); }
}

/* Hero */
.hero { margin-bottom: 1.1rem; }

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.success-panel h1,
.panel h2 {
  font-family: var(--display);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.85rem, 5.5vw, 2.35rem);
}

.lead, .panel-copy {
  margin: 0;
  color: var(--ink-soft);
}

.lead { font-size: 1.05rem; }

/* Progress */
.progress-block {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 36, 31, 0.08);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #147a63, #2bb894);
  transition: width 0.45s var(--ease);
}

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.3rem;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.step span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  font-size: 0.72rem;
  background: rgba(14, 36, 31, 0.06);
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}

.step em {
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.step.is-active { color: var(--accent-deep); }
.step.is-active span {
  background: var(--accent);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(20, 122, 99, 0.3);
}

.step.is-done { color: var(--ok); }
.step.is-done span {
  background: var(--ok-bg);
  color: var(--ok);
}

/* Panels */
.panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.45rem;
  box-shadow: var(--shadow);
}

.step-panel { display: none; }
.step-panel.is-visible {
  display: block;
  animation: rise 0.4s var(--ease) both;
}

.step-label {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
}

.panel-copy {
  margin-bottom: 1.15rem;
  font-size: 0.95rem;
}

/* Consent */
.consent-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.consent-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.consent-list li:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 122, 99, 0.25);
}

.ci {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--accent-soft);
  margin-top: 0.05rem;
}

.consent-list strong {
  display: block;
  font-size: 0.92rem;
}

.consent-list span:not(.ci) {
  font-size: 0.85rem;
  color: var(--muted);
}

.check-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  margin-bottom: 1.1rem;
}

.check-card:hover { border-color: rgba(20, 122, 99, 0.35); }

.check-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(20, 122, 99, 0.08);
}

.check-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 0.4rem;
  border: 2px solid rgba(14, 36, 31, 0.22);
  flex-shrink: 0;
  margin-top: 0.08rem;
  background: #fff;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.check-card input:checked + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-card input:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Fields */
.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

.field label em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.req { color: var(--error); }

.field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.02rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder { color: #8aa197; }

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 122, 99, 0.12);
}

.field input.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(180, 35, 47, 0.1);
}

.hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.1rem;
}

.hint.err { color: var(--error); font-weight: 600; }

/* Buttons */
.btn-row, .nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.nav-row {
  margin-top: 1.3rem;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 0.9rem;
  padding: 0.78rem 1.15rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.15s var(--ease), filter 0.2s, box-shadow 0.2s, opacity 0.2s, background 0.2s;
}

.btn:active:not(:disabled) { transform: scale(0.985); }

.btn-primary {
  background: linear-gradient(180deg, #1d987a 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 74, 60, 0.28);
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--accent-deep);
  border: 1.5px solid rgba(20, 122, 99, 0.28);
}

.btn-secondary:hover:not(:disabled) { background: var(--accent-soft); }
.btn-secondary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid transparent;
}

.btn-ghost:hover { background: rgba(14, 36, 31, 0.05); }

.btn-block-sm { width: 100%; }

.spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Geo */
.geo-box {
  text-align: center;
  padding: 1.4rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1.5px dashed rgba(20, 122, 99, 0.28);
  margin-bottom: 0.9rem;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.geo-box.has-coords {
  border-style: solid;
  border-color: rgba(12, 107, 74, 0.35);
  background: var(--ok-bg);
  box-shadow: 0 0 0 4px rgba(12, 107, 74, 0.06);
}

.geo-visual {
  color: var(--accent);
  margin-bottom: 0.45rem;
  position: relative;
  display: inline-grid;
  place-items: center;
}

.geo-pulse {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(20, 122, 99, 0.2);
  animation: pulse-ring 1.8s ease-out infinite;
}

.geo-box.has-coords .geo-pulse { animation: none; opacity: 0; }

.coords {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  word-break: break-word;
}

.map-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
}

.map-link:hover { text-decoration: underline; }

/* Media */
.media-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f1f1a;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.media-stage video,
.media-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.media-stage video.active,
.media-stage img.visible { display: block; }

.media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(40, 120, 100, 0.4), transparent 55%),
    linear-gradient(160deg, #142820, #0c1814);
}

.media-placeholder.is-hidden { display: none; }

.ph-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-frame {
  position: absolute;
  inset: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.media-stage:has(video.active) .media-frame { opacity: 1; }

.status {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
  min-height: 1.2rem;
}

.status.ok { color: var(--ok); font-weight: 650; }
.status.err { color: var(--error); font-weight: 650; }
.status.warn { color: var(--warn); font-weight: 650; }

/* Review */
.review-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  margin-bottom: 0.25rem;
}

.review-photo {
  background: #0f1f1a;
  max-height: 200px;
  overflow: hidden;
}

.review-photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.review {
  margin: 0;
  padding: 0;
  display: grid;
}

.review > div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.review > div:last-child { border-bottom: none; }

.review dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: center;
}

.review dd {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 650;
  color: var(--ink);
  word-break: break-word;
}

/* Toast & success */
.toast {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  display: grid;
  gap: 0.15rem;
}

.toast-err {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(180, 35, 47, 0.18);
}

.success-panel {
  text-align: center;
  padding: 2.4rem 1.5rem 2rem;
  margin-top: 0.5rem;
}

.success-ring {
  color: var(--ok);
  margin-bottom: 0.85rem;
}

.success-ring .ring-bg {
  fill: none;
  stroke: rgba(12, 107, 74, 0.15);
  stroke-width: 3;
}

.success-ring .ring-fg {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: dash 0.9s var(--ease) 0.15s forwards;
}

.success-ring .check {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: dash 0.45s var(--ease) 0.7s forwards;
}

.success-panel h1 {
  margin: 0 0 0.45rem;
  font-size: 1.85rem;
}

.success-panel .lead { margin-bottom: 1.5rem; }

.success-actions .btn {
  width: 100%;
  max-width: 260px;
}

.foot {
  margin-top: 1.6rem;
  text-align: center;
}

.foot p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 440px) {
  .step em { display: none; }
  .top-badges { display: none; }
  .brand-sub { max-width: 11rem; }
  .nav-row {
    flex-direction: column-reverse;
  }
  .nav-row .btn { width: 100%; }
  .review > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
