/* =========================================================
   Registration page (register.html)
   ========================================================= */

.register {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(40px, 8vh, 90px)) var(--gutter) clamp(80px, 12vh, 140px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.register__intro { position: sticky; top: calc(var(--nav-h) + 40px); }
.register__title { font-size: clamp(52px, 7vw, 104px); line-height: 0.92; letter-spacing: -0.015em; }
.register__lead { margin-top: 24px; }
.perks { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.perk {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}
.perk__i { flex: none; font-size: 11px; letter-spacing: 0.2em; color: var(--bio); }
.register__time { margin-top: 24px; font-size: 12.5px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .register { grid-template-columns: 1fr; }
  .register__intro { position: static; }
}

/* ---- Glass card ---- */
.card {
  position: relative;
  padding: clamp(22px, 4vw, 48px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(233,241,246,.05), rgba(233,241,246,.018));
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 40px 120px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.card::before {
  content: "";
  position: absolute; left: 12%; right: 12%; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--bio), transparent);
  opacity: 0.7;
}

/* ---- Form structure ---- */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.group-set + .group-set {
  margin-top: clamp(34px, 5vh, 48px);
  padding-top: clamp(28px, 4vh, 40px);
  border-top: 1px solid var(--line);
}
/* float pulls the legend out of the fieldset border and into normal flow */
.legend {
  float: left;
  width: 100%;
  display: flex; gap: 12px;
  margin-bottom: 22px;
  padding: 0;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-mute);
}
.legend__n { color: var(--bio); }
.legend + * { clear: both; }
fieldset.field > .label { float: left; width: 100%; }
fieldset.field > .label + * { clear: both; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.field { display: block; }
fieldset.field > * + * { margin-top: 10px; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

.label { padding: 0; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.req { color: var(--accent); }
.opt { color: var(--ink-faint); font-weight: 300; }
.field__hint { font-size: 12px; color: var(--ink-faint); }
.field__error { font-size: 12.5px; color: var(--danger); }
.field__error:empty { display: none; }

/* ---- Inputs ---- */
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(233, 241, 246, 0.035);
  color: var(--ink-strong);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--ink-faint); opacity: 1; }
.input:hover { border-color: rgba(233, 241, 246, 0.26); }
.input:focus {
  border-color: rgba(201, 182, 255, 0.6);
  background: rgba(233, 241, 246, 0.05);
  box-shadow: 0 0 0 4px rgba(201, 182, 255, 0.12);
}
textarea.input { min-height: 120px; padding: 14px 18px; line-height: 1.55; resize: vertical; }
select.input {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238d99a2' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
select.input option { background: #0b1016; color: var(--ink); }
.field.is-invalid .input { border-color: rgba(255, 155, 143, 0.7); }

/* ---- Chips (checkbox / radio groups) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  background: rgba(233, 241, 246, 0.03);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
  user-select: none;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.chip span::before {
  content: "";
  width: 7px; height: 7px;
  transform: rotate(45deg);
  border: 1px solid var(--ink-faint);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.chip:hover span { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(233, 241, 246, 0.32); }
.chip input:checked + span {
  color: var(--ink-strong);
  background: rgba(143, 227, 168, 0.09);
  box-shadow: inset 0 0 0 1px rgba(143, 227, 168, 0.5), 0 0 24px rgba(143, 227, 168, 0.12);
}
.chip input:checked + span::before { background: var(--bio); border-color: var(--bio); box-shadow: 0 0 10px var(--bio); }
.chips--radio .chip input:checked + span {
  background: rgba(201, 182, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(201, 182, 255, 0.55), 0 0 24px rgba(201, 182, 255, 0.14);
}
.chips--radio .chip input:checked + span::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field.is-invalid .chip span { box-shadow: inset 0 0 0 1px rgba(255, 155, 143, 0.45); }

/* ---- Consent ---- */
.consent { margin-top: clamp(30px, 5vh, 44px); }
.check { display: flex; align-items: flex-start; gap: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); cursor: pointer; }
.check input {
  appearance: none;
  flex: none;
  display: grid; place-content: center;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(233, 241, 246, 0.035);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.check input::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 1.6px solid #0a0c12;
  border-bottom: 1.6px solid #0a0c12;
  transform: translate(0, -1px) rotate(-45deg) scale(0);
  transition: transform 0.2s var(--ease-out);
}
.check input:checked { background: var(--bio); border-color: var(--bio); box-shadow: 0 0 16px rgba(143, 227, 168, 0.4); }
.check input:checked::after { transform: translate(0, -1px) rotate(-45deg) scale(1); }
.field.is-invalid .check input { border-color: rgba(255, 155, 143, 0.7); }

/* ---- Honeypot (hidden from humans) ---- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Submit row ---- */
.form-footer {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.form-status { font-size: 13.5px; color: var(--danger); }
.form-footer .btn { margin-left: auto; }
.btn__label--sending { display: none; }
.btn.is-loading .btn__label { display: none; }
.btn.is-loading .btn__label--sending { display: inline; }
.btn .spinner {
  display: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(10, 12, 18, 0.25);
  border-top-color: #0a0c12;
  animation: spin 0.8s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .arrow { display: none; }
.btn[disabled] { cursor: progress; opacity: 0.85; }
@media (max-width: 560px) { .form-footer .btn { width: 100%; } }

/* ---- Success ---- */
.success { padding-block: clamp(24px, 6vh, 60px); text-align: center; outline: none; }
.sprout { width: 120px; height: 150px; margin: 0 auto 30px; overflow: visible; }
.sprout path {
  fill: none;
  stroke: var(--bio);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 8px rgba(143, 227, 168, 0.6));
  animation: draw 1.4s var(--ease-out) forwards;
}
.sprout path:nth-of-type(2) { animation-delay: 0.6s; }
.sprout path:nth-of-type(3) { animation-delay: 0.9s; }
.sprout path:nth-of-type(4) { animation-delay: 0.1s; }
.sprout circle {
  fill: var(--accent);
  opacity: 0;
  filter: drop-shadow(0 0 6px var(--accent));
  animation: pop 0.6s var(--ease-out) 1.6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
.sprout circle { transform-box: fill-box; transform-origin: center; }
.success__title { font-size: clamp(40px, 5vw, 64px); }
.success__lead { margin: 20px auto 0; text-align: center; }
.success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
