/* ==========================================================================
   CK Global Academy — dedicated registration page
   Loaded after styles.css. The wizard shares its component styles with the
   landing page; everything here is about giving that wizard a whole screen:
   one viewport on a 13" laptop, a calm two-column read on tablets, and a
   thumb-friendly single column on phones.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset — this page skips Bootstrap, so the few resets the markup relied on
   are restated here rather than pulling in 200KB for a reboot.
   -------------------------------------------------------------------------- */
.register-page h1,
.register-page h2,
.register-page h3,
.register-page h4,
.register-page p,
.register-page ul,
.register-page ol {
  margin: 0;
}

.register-page ul,
.register-page ol {
  padding: 0;
  list-style: none;
}

.register-page button,
.register-page input,
.register-page select,
.register-page textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.register-page template {
  display: none;
}

/* The wizard hides steps, buttons, and conditional fields with the `hidden`
   attribute, and every one of those elements has a `display` of its own —
   which beats the UA rule. Bootstrap's reboot used to carry this; the page
   no longer loads it. */
.register-page [hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
body.register-page {
  --reg-gutter: 1.15rem;
  --reg-topbar: 58px;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(68, 49, 153, 0.34), transparent 62%),
    radial-gradient(900px 520px at 92% 4%, rgba(193, 51, 131, 0.2), transparent 60%),
    var(--bg-0);
  font-size: 0.95rem;
}

.register-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--reg-topbar);
  padding: 0.5rem var(--reg-gutter);
  border-bottom: 1px solid var(--border);
  background: rgba(12, 8, 24, 0.72);
}

.register-topbar .brand-mark {
  height: 34px;
}

.register-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.register-help,
.register-back {
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.register-help:hover,
.register-back:hover {
  color: var(--magenta-bright);
}

.register-shell {
  width: min(100%, 1440px);
  min-height: 0;
  margin: 0 auto;
  padding: var(--reg-gutter);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

/* --------------------------------------------------------------------------
   Left rail — what the visitor is signing up for
   -------------------------------------------------------------------------- */
.register-aside {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(193, 51, 131, 0.16), rgba(21, 16, 38, 0.9) 58%),
    var(--bg-1);
}

.register-eyebrow {
  color: var(--magenta-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.register-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--text-hi);
  text-wrap: auto;
}

.register-meta {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.register-meta li {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--text-body);
}

.register-meta span {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.register-summary {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.register-when {
  display: none;
  color: var(--text-body);
  font-size: 0.84rem;
  font-weight: 700;
}

.register-aside-detail {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.register-aside-label {
  margin-bottom: 0.35rem !important;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.register-page .webinar-points {
  margin: 0 0 0.7rem;
}

.register-page .webinar-points li {
  padding: 0.22rem 0 0.22rem 1.6rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.register-page .webinar-points li::before {
  top: 0.55rem;
  width: 14px;
  height: 14px;
  background-size: 9px;
}

.register-page .webinar-assurance {
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Right column — the wizard fills the height it is given
   -------------------------------------------------------------------------- */
.register-main {
  display: grid;
  min-height: 0;
}

.register-page .form-card.webinar-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 1.15rem 1.25rem 1rem;
  overflow: hidden;
}

.register-formtop {
  display: grid;
  gap: 0.9rem 1.5rem;
  align-items: end;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.register-page .webinar-form-head {
  display: block;
  padding: 0;
  border: 0;
}

.register-page .webinar-form-head > div {
  display: grid;
  gap: 0.25rem;
}

.register-page .webinar-form-head h2 {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--orange);
}

.register-page .webinar-form-head span {
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}

.register-page .form-progress {
  gap: 0.55rem;
}

/* --------------------------------------------------------------------------
   Steps — the one region allowed to scroll when a step genuinely needs it
   -------------------------------------------------------------------------- */
.register-steps {
  flex: 1 1 auto;
  min-height: 0;
}

.register-page .form-step {
  min-height: 0;
  gap: 0.7rem;
  padding: 0;
}

.register-page .form-step-label {
  padding: 0;
  background: transparent;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.register-page .webinar-form label {
  gap: 0.3rem;
  font-size: 0.8rem;
  /* Field labels are one short line; the body's 1.65 leading only added
     dead space above every input. */
  line-height: 1.3;
  /* Without this, a neighbour carrying a validation message stretches the
     row and every other input in it grows into a tall empty box. */
  align-content: start;
}

.register-page .errorlist {
  font-size: 0.74rem;
  line-height: 1.4;
}

.register-page .age-limit-warning {
  color: #ffb7cf;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
}

.register-page input[aria-invalid="true"] {
  border-color: #ff709f;
  box-shadow: 0 0 0 3px rgba(255, 112, 159, 0.16);
}

.register-page .webinar-form input,
.register-page .webinar-form select,
.register-page .webinar-form textarea {
  min-height: 46px;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
}

.register-page .webinar-form textarea {
  min-height: 92px;
}

/* Attendee type — three wide plates instead of three tall squares. */
.register-page .role-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.register-page .role-option {
  aspect-ratio: auto;
  height: clamp(140px, 28vh, 240px);
  min-height: 0;
}

/* Desktop role cards use separate copy and artwork zones. The image is kept
   behind the right-hand zone only, so labels never compete with faces. */
.register-page .role-option > img {
  inset: 0 0 0 auto;
  z-index: 0;
  width: 70%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: right bottom;
}

.register-page .role-option-shade {
  inset: 0 0 0 auto;
  z-index: 1;
  width: 70%;
  background: linear-gradient(180deg, rgba(16, 13, 32, 0.14), transparent 52%, rgba(16, 13, 32, 0.12));
}

.register-page .role-option-copy {
  box-sizing: border-box;
  width: 46%;
  height: 100%;
  padding: 0.85rem 0.95rem;
  border-right: 1px solid rgba(141, 124, 226, 0.18);
  background: #100d20;
}

.register-page .role-option-copy strong {
  font-size: 0.98rem;
}

.register-page .role-option-copy small {
  max-width: 100%;
  font-size: 0.74rem;
}

.register-page .role-option-symbol {
  display: none;
}

/* Repeat-attendee builders */
.register-page .people-builder {
  gap: 0.6rem;
}

.register-page .people-builder h3,
.register-page .person-card h4 {
  margin: 0;
  color: var(--text-hi);
  font-size: 0.95rem;
}

.register-page .people-builder-head .button,
.register-page .add-person-button {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}

.register-page .people-builder-head {
  justify-content: flex-start;
}

.register-page .add-person-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 22px rgba(45, 15, 74, 0.28);
}

.register-page .add-person-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: var(--indigo);
  color: #fff;
  transform: translateY(-1px);
}

.register-page .add-person-button:focus-visible {
  outline: 3px solid rgba(183, 100, 215, 0.38);
  outline-offset: 2px;
}

.register-page .add-person-button-mobile {
  display: none;
}

.register-page .person-nav-button {
  width: 38px;
  height: 38px;
  font-size: 1rem;
}

.register-page .people-carousel-nav {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 0.5rem;
}

.register-page .people-position {
  font-size: 0.8rem;
}

.register-page .person-card {
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
}

.register-page .person-card textarea {
  min-height: 64px;
}

/* Final step */
.final-grid {
  display: grid;
  gap: 0.9rem;
}

.final-side {
  display: grid;
  align-content: start;
  gap: 0.6rem;
}

.final-reassure {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

.register-page .consent-check {
  font-size: 0.85rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Footer — navigation always in the same place, never chased down the page
   -------------------------------------------------------------------------- */
.register-footer {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.register-page .form-note,
.register-page .form-alt {
  margin: 0;
  font-size: 0.78rem;
  text-align: center;
}

.register-page .wizard-actions {
  padding: 0;
}

/* --------------------------------------------------------------------------
   Success / paused states
   -------------------------------------------------------------------------- */
.register-state {
  position: relative;
  align-self: center;
  justify-self: center;
  gap: 0.75rem;
  width: min(100%, 680px);
  padding: 1.75rem;
  overflow: hidden;
  border-color: rgba(226, 114, 176, 0.34);
}

/* Shape and fade come from the shared top edge accent in styles.css. */
.register-state::before {
  --edge-accent: var(--magenta-bright);
}

.register-state h2 {
  font-family: var(--font-heading);
  font-size: 1.32rem;
  line-height: 1.25;
  color: var(--text-hi);
}

.register-state p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.register-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

/* --------------------------------------------------------------------------
   Tablet and up — the two-column workspace
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  body.register-page {
    --reg-gutter: 1.5rem;
  }

  .register-formtop {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.72fr);
  }

  .register-footer {
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    align-items: center;
    gap: 0.35rem 1.5rem;
  }

  .register-page .form-note,
  .register-page .form-alt {
    grid-column: 1;
    text-align: left;
  }

  .register-page .wizard-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  /* Fields run wide instead of deep: one row where the old card needed two. */
  .register-page .webinar-form .form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.7rem 0.9rem;
  }

  .register-page .form-step[data-step="details"] .form-grid > label:has([name="full_name"]),
  .register-page .person-card .form-grid > label:has([data-person-field="full_name"]) {
    grid-column: span 4;
  }

  .register-page .form-step[data-step="details"] .form-grid > label:has([name="age"]),
  .register-page .person-card .form-grid > label:has([data-person-field="age"]) {
    grid-column: span 2;
  }

  .register-page .form-step[data-step="details"] .form-grid > label:has([name="phone"]),
  .register-page .form-step[data-step="details"] .form-grid > label:has([name="email"]),
  .register-page .person-card .form-grid > label:has([data-person-field="phone"]),
  .register-page .person-card .form-grid > label:has([data-person-field="email"]) {
    grid-column: span 3;
  }

  .register-page .form-step[data-step="details"] .form-grid > label:has([name="profession"]),
  .register-page .form-step[data-step="details"] .form-grid > label:has([name="sector"]) {
    grid-column: span 6;
  }

  .register-page .form-step[data-panel="student"] .form-grid > label,
  .register-page .person-card .form-grid > label {
    grid-column: span 3;
  }

  .register-page .person-card .form-grid > .person-description {
    grid-column: span 6;
  }

  .register-page .people-builder {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.55fr);
    align-items: center;
  }

  .register-page .people-builder-head {
    grid-column: 1;
  }

  .register-page .people-carousel-nav {
    grid-column: 2;
  }

  .register-page .people-list {
    grid-column: 1 / -1;
  }

  .final-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.25rem;
  }
}

/* Desktop: the rail moves beside the form, and an attendee card — the deepest
   thing in the flow — runs as wide as the row allows, including the note,
   which sits beside the fields instead of adding a row of its own.
   Below this width the rail stacks on top: a portrait tablet split in two
   leaves the form too narrow to read its own labels. */
@media (min-width: 992px) {
  .register-shell {
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .register-page .person-card .form-grid > .person-description {
    grid-column: span 3;
  }

  .register-page .person-card .person-description textarea {
    min-height: 46px;
  }

  .register-page .person-card {
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
  }
}

/* --------------------------------------------------------------------------
   Laptop (13" and up) — the whole flow inside one viewport, no page scroll.
   The step area takes whatever height is left and scrolls only if a step
   really is taller than the screen.
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (min-height: 600px) {
  body.register-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .register-shell {
    height: 100%;
  }

  .register-main,
  .register-aside {
    height: 100%;
    overflow: hidden;
  }

  .register-aside {
    overflow-y: auto;
  }

  .register-steps {
    overflow-y: auto;
    /* Room for the scrollbar so a scrolling step does not shift the fields. */
    padding-right: 0.35rem;
    margin-right: -0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 114, 176, 0.45) transparent;
  }

  .register-steps::-webkit-scrollbar {
    width: 6px;
  }

  .register-steps::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(226, 114, 176, 0.4);
  }
}

@media (min-width: 1200px) {
  .register-shell {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1.5rem;
  }

  .register-page .form-card.webinar-form {
    padding: 1.35rem 1.6rem 1.15rem;
  }
}

/* Short laptops: buy the step area back from the chrome around it. */
@media (min-width: 992px) and (max-height: 760px) {
  .register-page .form-card.webinar-form {
    gap: 0.65rem;
    padding: 0.9rem 1.15rem 0.85rem;
  }

  .register-formtop {
    padding-bottom: 0.55rem;
  }

  .register-page .webinar-form input,
  .register-page .webinar-form select {
    min-height: 42px;
  }

  .register-page .webinar-form textarea {
    min-height: 76px;
  }

  .register-page .form-step {
    gap: 0.55rem;
  }

  .register-page .webinar-form .form-grid {
    gap: 0.5rem 0.9rem;
  }

  .register-page .person-card .person-description textarea {
    min-height: 42px;
  }

  .register-page .person-card {
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
  }

  .register-page .form-progress-steps span {
    width: 26px;
    height: 26px;
  }

  .register-page .form-progress-steps li::before,
  .register-page .form-progress-steps li::after {
    top: 13px;
  }

  /* The same promise is repeated on the closing step; on a short screen the
     step itself is worth more than the footnote. */
  .register-footer .form-note {
    display: none;
  }

  .register-aside-detail {
    padding-top: 0.65rem;
  }
}

/* --------------------------------------------------------------------------
   Phones — most attendees arrive here. One column, big targets, and the
   context rail shrinks to the two facts that matter.
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  body.register-page {
    font-size: 0.94rem;
  }

  .register-topbar .wordmark-tag {
    display: none;
  }

  .register-help {
    display: none;
  }

  .register-aside {
    gap: 0.35rem;
    padding: 0.85rem 0.95rem;
  }

  .register-title {
    font-size: 1.18rem;
  }

  /* The rail shrinks to a headline and one line of facts — everything else
     belongs to the landing page on a phone screen; here it would push the
     first question below the fold. */
  .register-meta,
  .register-aside-detail,
  .register-summary {
    display: none;
  }

  .register-when {
    display: block;
  }

  .register-page .form-card.webinar-form {
    gap: 0.65rem;
    padding: 0.9rem 0.9rem 0.85rem;
  }

  .register-formtop {
    gap: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .register-page .form-step {
    gap: 0.6rem;
  }

  .register-page .webinar-form-head h2 {
    font-size: 1.2rem;
  }

  .register-page .form-progress-steps small {
    font-size: 0.62rem;
  }

  .register-page .role-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  /* On phones, clarity beats another photo card. These become compact radio
     rows with a role icon, direct copy, and an unmistakable selected state. */
  .register-page .role-option {
    aspect-ratio: auto;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 26px;
    gap: 0.75rem;
    align-items: center;
    height: auto;
    min-height: 72px;
    padding: 0.7rem 0.75rem;
    overflow: visible;
    border-color: rgba(141, 124, 226, 0.3);
    background: #100d20;
  }

  .register-page .role-option > img,
  .register-page .role-option-shade {
    display: none;
  }

  .register-page .role-option-symbol {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 157, 77, 0.42);
    border-radius: 12px;
    background: rgba(255, 157, 77, 0.07);
    color: var(--orange);
  }

  .register-page .role-option-symbol svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .register-page .role-option:has(input:checked) {
    border-color: var(--purple-bright);
    background: linear-gradient(90deg, rgba(121, 44, 162, 0.28), rgba(16, 13, 32, 0.98));
    box-shadow: inset 3px 0 0 var(--purple-bright), 0 8px 22px rgba(4, 2, 14, 0.24);
  }

  .register-page .role-option:has(input:checked) .role-option-symbol {
    border-color: var(--orange);
    background: rgba(255, 157, 77, 0.12);
  }

  /* Repeated verbatim on the closing step, and two lines of it here is the
     difference between the three choices fitting the screen and not. */
  .register-footer .form-note {
    display: none;
  }

  .register-page .role-option-copy {
    justify-content: center;
    align-self: center;
    min-width: 0;
    width: auto;
    height: auto;
    padding: 0;
    border-right: 0;
    background: transparent;
  }

  .register-page .role-option-copy strong {
    font-size: 0.98rem;
  }

  .register-page .role-option-copy small {
    max-width: none;
    color: var(--text-dim);
    font-size: 0.76rem;
  }

  .register-page .role-option-check {
    position: relative;
    right: auto;
    top: auto;
    justify-self: end;
    transform: none;
  }

  .register-page .webinar-form input,
  .register-page .webinar-form select {
    min-height: 48px;
  }

  .register-page .wizard-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .register-page .wizard-actions .button:first-child {
    width: 100%;
    order: 2;
  }

  .register-page .add-person-button-desktop {
    display: none;
  }

  .register-page .add-person-button-mobile {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    margin-top: 0.15rem;
    font-size: 0.9rem;
  }

  .register-footer {
    gap: 0.55rem;
  }

  .register-page .form-alt {
    font-size: 0.8rem;
  }
}

@media (max-width: 575.98px) {
  .register-page .webinar-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .register-page .people-builder-head {
    gap: 0.6rem;
  }
}

/* --------------------------------------------------------------------------
   Privacy notice
   The notice borrows the registration chrome so the two pages look related,
   but it is a document rather than a wizard and must not inherit the wizard's
   two-column grid or its locked viewport. Both of those are set above under
   min-width: 992px, and together they rendered the whole legal text inside a
   290px column with no scrollbar — everything below the fold was unreachable
   by mouse or keyboard, on the page the consent checkbox links to.
   -------------------------------------------------------------------------- */
.privacy-shell {
  display: block;
  padding-bottom: 3rem;
}

.privacy-card {
  overflow: visible;
  align-self: start;
  justify-self: center;
  width: min(100%, 720px);
  margin-inline: auto;
}

.privacy-card h2 {
  margin-top: 1.25rem;
}

@media (min-width: 992px) {
  .privacy-shell {
    grid-template-columns: none;
  }
}

@media (min-width: 992px) and (min-height: 600px) {
  body.privacy-page {
    height: auto;
    overflow: visible;
  }

  .privacy-shell {
    height: auto;
    overflow: visible;
  }
}
