/* ==== Design tokens — derived from the brand logo (green medical badge + cream rim) ==== */
:root{
  --green-100: #d9f5da;
  --green-300: #86e470;
  --green-400: #5cd25f;
  --green-500: #3fc24d;
  --green-600: #2fa843;
  --green-700: #1f7a34;
  --green-900: #0a2016;
  --green-950: #071710;
  --cream:     #f5f8e3;
  --ink:       #0e2118;
  --white:     #ffffff;

  --card-bg: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  --card-border: rgba(245,248,227,.16);
  --shadow-lg: 0 30px 80px rgba(3,15,9,.55), 0 2px 0 rgba(255,255,255,.04) inset;

  --ease: cubic-bezier(.22,1,.36,1);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  min-height:100svh;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:"Manrope", "Segoe UI", system-ui, sans-serif;
  color: var(--cream);
  background: radial-gradient(120% 120% at 50% 0%, var(--green-900) 0%, var(--green-950) 60%, #04100a 100%);
  overflow-x:hidden;
}

/* ==== Living background ==== */
.bg{
  position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none;
}
.blob{
  position:absolute;
  border-radius:50%;
  filter: blur(70px);
  opacity:.35;
  will-change: transform;
}
.blob--a{
  width:46vmax; height:46vmax; left:-14vmax; top:-16vmax;
  background: radial-gradient(circle at 30% 30%, var(--green-400), transparent 70%);
  animation: drift-a 26s ease-in-out infinite;
}
.blob--b{
  width:38vmax; height:38vmax; right:-12vmax; bottom:-14vmax;
  background: radial-gradient(circle at 60% 60%, var(--green-600), transparent 70%);
  animation: drift-b 32s ease-in-out infinite;
}
.blob--c{
  width:30vmax; height:30vmax; left:50%; top:50%;
  background: radial-gradient(circle, var(--cream), transparent 72%);
  opacity:.06;
  animation: drift-c 40s ease-in-out infinite;
}
.grain{
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(245,248,227,.05) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity:.3;
}

@keyframes drift-a{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(4vmax, 5vmax) scale(1.08); }
}
@keyframes drift-b{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-5vmax,-3vmax) scale(1.1); }
}
@keyframes drift-c{
  0%,100%{ transform: translate(-50%,-50%) scale(1); }
  50%{ transform: translate(-46%,-54%) scale(1.15); }
}

/* ==== Layout ==== */
.wrap{ position:relative; z-index:1; width:100%; padding: 24px; }

.card{
  position:relative;
  max-width: 420px;
  margin: 0 auto;
  padding: 44px 32px 36px;
  border-radius: 28px;
  text-align:center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  animation: card-in .8s var(--ease) both;
}

@keyframes card-in{
  from{ opacity:0; transform: translateY(18px) scale(.97); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

/* ==== Logo ==== */
.logo-halo{
  position:relative;
  width:120px; height:120px;
  margin: 0 auto 22px;
  display:flex; align-items:center; justify-content:center;
  animation: logo-in 1s var(--ease) .1s both;
}
.logo-halo::before{
  content:"";
  position:absolute; inset:-14px;
  border-radius:50%;
  background: radial-gradient(circle, rgba(63,194,77,.55), transparent 70%);
  filter: blur(18px);
  animation: halo-pulse 3.6s ease-in-out infinite;
}
.logo{
  position:relative;
  width:100%; height:100%;
  border-radius:50%;
  filter: drop-shadow(0 8px 26px rgba(6,25,15,.45));
  animation: logo-float 5.5s ease-in-out infinite;
}

@keyframes logo-in{
  from{ opacity:0; transform: scale(.7); }
  to{ opacity:1; transform: scale(1); }
}
@keyframes halo-pulse{
  0%,100%{ opacity:.55; transform: scale(1); }
  50%{ opacity:.9; transform: scale(1.12); }
}
@keyframes logo-float{
  0%,100%{ transform: translateY(0) scale(1); }
  50%{ transform: translateY(-6px) scale(1.03); }
}

/* ==== Text ==== */
.title{
  margin: 0 0 10px;
  font-size: clamp(22px, 5vw, 27px);
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--white);
  animation: fade-up .7s var(--ease) .15s both;
}
.subtitle{
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(245,248,227,.72);
  animation: fade-up .7s var(--ease) .22s both;
}

@keyframes fade-up{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ==== Checkbox ==== */
.check-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 16px;
  border: 1px solid rgba(245,248,227,.14);
  background: rgba(245,248,227,.05);
  cursor:pointer;
  text-align:left;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
  animation: fade-up .7s var(--ease) .3s both;
}
.check-row:hover{
  background: rgba(245,248,227,.09);
  border-color: rgba(245,248,227,.22);
}
.check-row:active{ transform: scale(.99); }

.check-input{
  position:absolute;
  width:1px; height:1px;
  opacity:0;
  pointer-events:none;
}

.check-box{
  flex:0 0 auto;
  width:24px; height:24px;
  border-radius:8px;
  border: 2px solid rgba(245,248,227,.4);
  background: rgba(255,255,255,.04);
  display:flex; align-items:center; justify-content:center;
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.check-icon{
  width:15px; height:15px;
  fill:none;
  stroke: var(--ink);
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .35s var(--ease);
}
.check-input:checked + .check-box{
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(63,194,77,.18);
}
.check-input:checked + .check-box .check-icon{
  stroke-dashoffset: 0;
}
.check-input:focus-visible + .check-box{
  outline: 2px solid var(--green-300);
  outline-offset: 2px;
}

.check-label{
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cream);
}

/* ==== Button ==== */
.btn-wrap{
  animation: fade-up .7s var(--ease) .38s both;
}
.btn{
  position:relative;
  width:100%;
  padding: 16px 20px;
  border:none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink);
  background: linear-gradient(135deg, var(--green-300), var(--green-600));
  box-shadow: 0 14px 30px rgba(47,168,67,.28);
  cursor: pointer;
  overflow:hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .3s var(--ease), filter .25s var(--ease);
}
.btn::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:not(:disabled):hover::after{ transform: translateX(120%); }
.btn:not(:disabled):hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(47,168,67,.4);
}
.btn:not(:disabled):active{ transform: translateY(0) scale(.98); }

.btn:disabled{
  cursor: not-allowed;
  opacity:.4;
  filter: grayscale(.4);
  box-shadow:none;
}

.btn-spinner{
  display:none;
  width:16px; height:16px;
  margin-left:10px;
  border-radius:50%;
  border: 2px solid rgba(14,33,24,.35);
  border-top-color: var(--ink);
  vertical-align:-3px;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner{ display:inline-block; }
.btn.is-loading{ cursor: progress; }

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

.hint{
  margin: 16px 0 0;
  font-size: 12.5px;
  color: rgba(245,248,227,.5);
  transition: color .25s var(--ease);
  animation: fade-up .7s var(--ease) .45s both;
}

/* ==== Leave transition ==== */
.leave-veil{
  position:fixed; inset:0; z-index:10;
  background: var(--green-950);
  opacity:0;
  pointer-events:none;
  transition: opacity .6s var(--ease);
}
.leave-veil.is-active{
  opacity:1;
  pointer-events:all;
}

/* ==== Responsive ==== */
@media (max-width: 480px){
  .card{ padding: 36px 22px 28px; border-radius: 22px; }
  .logo-halo{ width:96px; height:96px; }
}

@media (min-width: 1024px){
  .card{ max-width: 460px; padding: 52px 40px 40px; }
}

/* ==== Reduced motion ==== */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
