:root {
  color-scheme: light;
  --cream: #fff8ef;
  --lavender: #efecff;
  --navy: #202271;
  --navy-dark: #151650;
  --purple: #7048eb;
  --purple-dark: #5d35dc;
  --pink: #ffa3a8;
  --blue: #86c9f7;
  --green: #a4e8b6;
  --yellow: #ffc83e;
  --muted: #68677d;
  --line: #ded8d1;
  --danger: #9f2f45;
  --danger-bg: #fff0f2;
  --font: "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--lavender);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 163, 168, 0.22), transparent 22rem),
    radial-gradient(circle at 88% 76%, rgba(134, 201, 247, 0.24), transparent 24rem),
    var(--lavender);
}

button,
label,
input {
  font: inherit;
}

button,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
label[for]:focus-visible,
a:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: min(calc(100% - 40px), 720px);
  min-height: calc(100vh - 64px);
  margin: 32px auto;
  overflow: hidden;
  padding: 44px clamp(28px, 7vw, 58px) 28px;
  border-radius: 44px;
  background: var(--cream);
  box-shadow: 0 24px 80px rgba(44, 34, 96, 0.16);
}

.site-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 150px;
  margin-bottom: 12px;
}

.site-header::before,
.site-header::after {
  position: absolute;
  width: 46px;
  height: 14px;
  border-radius: 999px;
  content: "";
  transform: rotate(-34deg);
}

.site-header::before {
  bottom: 18px;
  left: -52px;
  background: var(--pink);
  box-shadow: 15px 0 0 var(--cream);
}

.site-header::after {
  right: -48px;
  bottom: 4px;
  background: #69d7d0;
  transform: rotate(28deg);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--navy);
  text-decoration: none;
}

.brand-name {
  font-size: clamp(3.4rem, 11vw, 5.15rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.78;
  text-shadow: 0 2px 0 rgba(32, 34, 113, 0.08);
}

.brand-mark {
  display: block;
  width: 140px;
  height: 140px;
  flex: 0 0 auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: saturate(1.06) contrast(1.02);
}

.privacy-note {
  position: absolute;
  top: -22px;
  right: -26px;
  padding: 8px 11px;
  border-radius: 14px;
  background: #e5e1ff;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.25;
  text-align: center;
}

.main-grid {
  display: block;
}

.intro {
  max-width: 570px;
  margin: 0 auto 30px;
  text-align: center;
}

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

h1 {
  max-width: 560px;
  margin: 0 auto 12px;
  color: var(--navy);
  font-size: clamp(1.65rem, 5.5vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.lede {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(0.98rem, 2.3vw, 1.08rem);
  font-weight: 600;
  line-height: 1.55;
}

.capture-card {
  position: relative;
}

.empty-state,
.success-state {
  position: relative;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: clamp(34px, 7vw, 52px) 24px;
  border: 1px solid rgba(32, 34, 113, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 44px rgba(54, 43, 99, 0.08);
  text-align: center;
}

.empty-state::before,
.empty-state::after {
  position: absolute;
  width: 38px;
  height: 10px;
  border-radius: 999px;
  content: "";
}

.empty-state::before {
  top: 28px;
  left: -12px;
  background: var(--pink);
  transform: rotate(32deg);
}

.empty-state::after {
  right: -10px;
  bottom: 30px;
  background: var(--green);
  transform: rotate(-28deg);
}

.camera-orbit {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 30px;
  background: linear-gradient(145deg, #a9d9ff, #7bbcf1);
  box-shadow: 0 10px 26px rgba(63, 142, 207, 0.22);
  transform: rotate(-3deg);
}

.capture-copy {
  width: 100%;
  text-align: center;
}

.capture-copy h2,
.capture-copy p {
  max-width: none;
  text-wrap: balance;
}

.camera-orbit::before,
.camera-orbit::after {
  position: absolute;
  border-radius: 999px;
  background: var(--yellow);
  content: "";
}

.camera-orbit::before {
  top: -7px;
  right: 7px;
  width: 8px;
  height: 20px;
  transform: rotate(28deg);
}

.camera-orbit::after {
  top: 8px;
  right: -8px;
  width: 18px;
  height: 7px;
  transform: rotate(-12deg);
}

.camera-glyph {
  position: relative;
  display: block;
  width: 42px;
  height: 32px;
  border: 4px solid var(--navy);
  border-radius: 10px;
  color: transparent;
}

.camera-glyph::before {
  position: absolute;
  top: -11px;
  left: 9px;
  width: 17px;
  height: 8px;
  border-radius: 5px 5px 0 0;
  background: var(--navy);
  content: "";
}

.camera-glyph::after {
  position: absolute;
  top: 6px;
  left: 11px;
  width: 12px;
  height: 12px;
  border: 4px solid var(--navy);
  border-radius: 50%;
  content: "";
}

.empty-state h2,
.success-state h2,
.step-heading h2 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/*
.empty-state p,
.success-state > p:not(.eyebrow) {
  max-width: 440px;
  margin-bottom: 25px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}
  */

.primary-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 10px 24px rgba(112, 72, 235, 0.24);
  color: white;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 13px 29px rgba(112, 72, 235, 0.3);
  transform: translateY(-2px);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.label-state {
  padding-top: 4px;
}

.step-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.step-count,
.eyebrow {
  margin: 0 0 4px;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-heading h2 {
  margin-bottom: 0;
}

.text-button {
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: var(--purple);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.image-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-inline: auto;
  border-radius: 30px;
  background: #302e46;
  box-shadow: 0 15px 38px rgba(37, 31, 74, 0.16);
  isolation: isolate;
}

.image-stage.is-portrait {
  width: min(100%, 430px);
}

.image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.point-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.point-layer:disabled {
  cursor: default;
}

.point-prompt {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 10px;
  border: 2px solid rgba(32, 34, 113, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: 0 8px 24px rgba(17, 18, 70, 0.24);
  color: var(--navy);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.point-prompt[hidden] {
  display: none;
}

.point-prompt-hand {
  display: inline-block;
  font-size: 1.35rem;
  line-height: 1;
  animation: point-to-photo 1.4s ease-in-out infinite;
}

.point-marker {
  position: absolute;
  display: block;
  width: 34px;
  height: 34px;
  border: 5px solid white;
  border-radius: 50%;
  background: var(--purple);
  box-shadow:
    0 0 0 5px rgba(32, 34, 113, 0.74),
    0 7px 18px rgba(17, 18, 70, 0.38);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.point-marker::after {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: white;
  content: "";
}

@keyframes point-to-photo {
  0%,
  100% {
    transform: translateY(2px);
  }

  50% {
    transform: translateY(-3px);
  }
}

.submit-button {
  width: 100%;
  min-height: 66px;
  margin-top: 20px;
  font-size: 1.08rem;
}

.button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.submit-button.is-busy .button-spinner {
  display: inline-block;
}

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

.success-state {
  min-height: 380px;
}

.success-mark {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 28px;
  background: var(--green);
  color: var(--navy);
  font-size: 2.2rem;
  font-weight: 900;
  transform: rotate(-4deg);
}

.status-message {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #edb3bf;
  border-radius: 16px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.captcha-dialog {
  width: min(calc(100% - 28px), 430px);
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: transparent;
  color: var(--navy);
  box-shadow: 0 28px 90px rgba(24, 21, 66, 0.34);
}

.captcha-dialog::backdrop {
  background: rgba(24, 22, 61, 0.54);
  backdrop-filter: blur(5px);
}

.captcha-card {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 30px 26px 26px;
  border: 3px solid var(--navy);
  border-radius: 30px;
  background: var(--cream);
  text-align: center;
}

.captcha-close {
  position: absolute;
  top: 13px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e5e1ff;
  color: var(--navy);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.captcha-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.captcha-card h2 {
  margin-bottom: 6px;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.captcha-card > p {
  max-width: 310px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.turnstile-container {
  width: 100%;
  min-height: 65px;
}

.captcha-status {
  min-height: 21px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.captcha-status.is-error {
  color: var(--danger);
}

.captcha-status.is-success {
  color: #21733d;
}

footer {
  padding: 24px 10px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

footer p {
  margin-bottom: 0;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 900;
}

.footer-actions a,
.footer-actions button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  background: transparent;
  color: var(--purple);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.footer-actions a:hover,
.footer-actions button:hover {
  color: var(--navy);
}

.install-note {
  max-width: 410px;
  margin: 10px auto 0;
  color: var(--navy);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 720px) {
  html,
  body {
    background: var(--cream);
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: max(34px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    border-radius: 0;
    box-shadow: none;
  }

  .privacy-note {
    top: -20px;
    right: 0;
  }

  .site-header::before {
    left: -30px;
  }

  .site-header::after {
    right: -26px;
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 132px;
  }

  .brand {
    gap: 11px;
  }

  .brand-name {
    font-size: clamp(3rem, 15vw, 4rem);
  }

  .brand-mark {
    width: 76px;
    height: 76px;
  }

  .privacy-note {
    display: none;
  }

  .intro {
    margin-bottom: 25px;
  }

  .empty-state,
  .success-state {
    padding: 34px 18px;
    border-radius: 26px;
  }

  .image-stage {
    border-radius: 25px;
  }

  .step-heading {
    align-items: center;
  }

  .captcha-card {
    padding: 27px 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
