/* ====================================================================
   playroom studios — Talent Portal: Component CSS
   ====================================================================
   Requires tokens.css to be loaded first.
   All components are class-based and stack-agnostic (vanilla CSS).
   ==================================================================== */

/* ----- Reset / base ------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-bg);
  color: var(--surface-fg);
  font-family: var(--pr-font-display);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base) var(--ease-out),
              color var(--t-base) var(--ease-out);
  min-height: 100vh;
}

::selection { background: var(--accent); color: var(--accent-fg); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ----- Mono label utility ------------------------------------------ */
.mono {
  font-family: var(--pr-font-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--t-mono);
}

/* ----- Page layout -------------------------------------------------- */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ====================================================================
   TOPBAR
   ==================================================================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--sp-7);
  border-bottom: 1px solid var(--surface-line);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-status {
  color: var(--surface-fg-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.topbar-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ----- Lang toggle (DE/EN) ------------------------------------------ */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--surface-line);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 0;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  color: var(--surface-fg-3);
  border-radius: var(--r-pill);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all var(--t-fast) var(--ease-out);
}
.lang-toggle button.active {
  background: var(--surface-fg);
  color: var(--surface-bg);
}

/* ====================================================================
   HERO
   ==================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
  padding: var(--sp-9) var(--sp-7) var(--sp-10);
  align-items: stretch;
  position: relative;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 600px;
}
.eyebrow {
  color: var(--surface-fg-3);
  margin-bottom: var(--sp-6);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--surface-fg-3);
}
.headline {
  font-size: var(--t-display);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.headline em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  font-size: var(--t-body-lg);
  line-height: 1.5;
  color: var(--surface-fg-2);
  max-width: 460px;
  margin: 0 0 var(--sp-7);
}

/* ----- Right column header ------------------------------------------ */
.register-head {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 var(--sp-5);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--surface-line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.register-head::before {
  content: "↓";
  color: var(--accent);
  font-weight: 400;
  font-size: 28px;
  line-height: 0;
  transform: translateY(2px);
}

/* ----- Action grid (right column of hero) --------------------------- */
.action-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-self: stretch;
}
.action-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-card);
  padding: var(--sp-6) 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: stretch;
  transition: all var(--t-base) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
}
.action-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--surface-fg-2);
  transform: translateX(4px);
}
.action-card .card-num {
  color: var(--surface-fg-3);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  align-self: start;
  padding-top: 4px;
  min-width: 24px;
}
.action-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.action-card .card-body h3 {
  font-size: var(--t-h3);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}
.action-card .card-body p {
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--surface-fg-2);
  margin: 0;
  max-width: 360px;
  flex: 1;
}
.action-card .card-cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.action-card .card-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-fg);
  color: var(--surface-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  transition: all var(--t-base) var(--ease-out);
}
.action-card:hover .card-arrow {
  background: var(--accent);
  color: var(--accent-fg);
  transform: translateX(2px);
}
.action-card .card-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform var(--t-base) var(--ease-out);
}
.action-card:hover .card-arrow svg { transform: translateX(2px); }

/* ----- Login row ---------------------------------------------------- */
.login-row {
  margin-top: var(--sp-5);
  padding: 20px 0 0;
  border-top: 1px solid var(--surface-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-row span {
  color: var(--surface-fg-3);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.login-row a {
  color: var(--surface-fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease-out);
  font-weight: 500;
  font-size: var(--t-small);
}
.login-row a:hover { color: var(--accent); }

/* ----- Hero meta + audio hint --------------------------------------- */
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.audio-hint {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--surface-fg-2);
  font-size: 13px;
  padding: var(--sp-4) 20px;
  border: 1px solid var(--surface-line);
  border-radius: var(--r-card);
  background: var(--surface-card);
  max-width: 380px;
}

/* ----- Animated waveform (CSS-only) --------------------------------- */
.waveform {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}
.waveform span {
  display: block;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  animation: wave 1.4s ease-in-out infinite;
}
.waveform span:nth-child(1) { height: 30%;  animation-delay: 0.0s; }
.waveform span:nth-child(2) { height: 65%;  animation-delay: 0.1s; }
.waveform span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.waveform span:nth-child(4) { height: 80%;  animation-delay: 0.3s; }
.waveform span:nth-child(5) { height: 45%;  animation-delay: 0.4s; }
.waveform span:nth-child(6) { height: 90%;  animation-delay: 0.5s; }
.waveform span:nth-child(7) { height: 60%;  animation-delay: 0.6s; }
.waveform span:nth-child(8) { height: 35%;  animation-delay: 0.7s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

/* ====================================================================
   "How it works" — 3-step factual section
   ==================================================================== */
.how {
  padding: var(--sp-9) var(--sp-7);
  border-top: 1px solid var(--surface-line);
  border-bottom: 1px solid var(--surface-line);
}
.how-head {
  color: var(--surface-fg-3);
  margin-bottom: 56px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.how-step {
  padding: 0 var(--sp-6) 0 0;
  position: relative;
}
.how-step + .how-step {
  padding-left: var(--sp-6);
  border-left: 1px solid var(--surface-line);
}
.how-step .step-num {
  color: var(--accent);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
.how-step h4 {
  font-size: var(--t-h4);
  font-weight: 800;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
  line-height: 1.1;
}
.how-step p {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--surface-fg-2);
  margin: 0;
}

/* ====================================================================
   FOOTER
   ==================================================================== */
.site-footer {
  padding: var(--sp-6) var(--sp-7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--surface-fg-3);
}
.site-footer .left { display: flex; gap: var(--sp-5); }
.site-footer a:hover { color: var(--surface-fg); }

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding: var(--sp-7) var(--sp-5) var(--sp-9);
  }
  .hero-left { min-height: auto; }
  .topbar,
  .how,
  .site-footer {
    padding-left: var(--sp-5);
    padding-right: var(--sp-5);
  }
  .how-grid { grid-template-columns: 1fr; }
  .how-step + .how-step {
    padding-left: 0;
    padding-top: var(--sp-6);
    border-left: none;
    border-top: 1px solid var(--surface-line);
    margin-top: var(--sp-6);
  }
  .how { padding: 56px var(--sp-5); }
}

/* ====================================================================
   REGISTER PAGE — Auth-Layout, Form-Card, Steps, Strength-Meter
   ==================================================================== */

/* Brand-Lockup (auch von index.html inline genutzt — hier zentral) */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--surface-fg);
}
.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  background-color: currentColor;
  -webkit-mask: url(../assets/logo-mark.png) center / contain no-repeat;
          mask: url(../assets/logo-mark.png) center / contain no-repeat;
}
.brand-wordmark {
  display: block;
  width: 115px;
  height: 32px;
  background-color: currentColor;
  -webkit-mask: url(../assets/wordmark.png) center / contain no-repeat;
          mask: url(../assets/wordmark.png) center / contain no-repeat;
}

/* ----- Auth shell -------------------------------------------------- */
.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-9);
  padding: var(--sp-8) var(--sp-7) var(--sp-9);
  align-items: stretch;
}
.auth-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 640px;
  padding-right: var(--sp-5);
}
.auth-right {
  display: flex;
  flex-direction: column;
}

/* ----- Breadcrumb -------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--surface-fg-3);
  margin-bottom: var(--sp-6);
}
.breadcrumb a { color: var(--surface-fg-2); }
.breadcrumb a:hover { color: var(--surface-fg); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .crumb-current { color: var(--accent); }

/* ----- Auth headline ----------------------------------------------- */
.auth-headline {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-5);
  text-wrap: balance;
}
.auth-headline em {
  font-style: normal;
  color: var(--accent);
}
.auth-lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--surface-fg-2);
  max-width: 460px;
  margin: 0 0 var(--sp-7);
}

/* ----- Steps indicator --------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--surface-line);
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--surface-line);
}
.step-idx {
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  color: var(--surface-fg-3);
}
.step-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--surface-fg-2);
}
.step-state {
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--surface-fg-3);
}
.step.is-current .step-idx,
.step.is-current .step-state {
  color: var(--accent);
}
.step.is-current .step-title {
  color: var(--surface-fg);
}

/* ----- Auth meta (audio-hint container under steps) ---------------- */
.auth-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

/* ----- Form-Card --------------------------------------------------- */
.form-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-line);
  border-radius: var(--r-card);
  padding: 40px 44px;
}
.form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--sp-5);
  margin-bottom: 28px;
  border-bottom: 1px solid var(--surface-line);
}
.form-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.form-head h2::before {
  content: "↓";
  color: var(--accent);
  font-weight: 400;
  font-size: 24px;
  line-height: 0;
  transform: translateY(2px);
}
.form-meta {
  color: var(--surface-fg-3);
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ----- Form-Grid + Field ------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.field-full {
  grid-column: 1 / -1;
}
.field label {
  font-family: var(--pr-font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--surface-fg-3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.field .hint {
  font-family: var(--pr-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--surface-fg-3);
  opacity: 0.85;
  text-transform: none;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--surface-line);
  color: var(--surface-fg);
  font-family: var(--pr-font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  padding: 12px 0;
  outline: none;
  transition: border-color var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
}
.field input::placeholder {
  color: var(--surface-fg-3);
  opacity: 0.6;
}
.field input:hover {
  border-bottom-color: var(--surface-fg-2);
}
.field input:focus {
  border-bottom-color: var(--accent);
}

/* ----- Strength-Meter ---------------------------------------------- */
.strength-meter {
  margin-top: 8px;
}
.strength-bar {
  height: 2px;
  background: var(--surface-line);
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width var(--t-base) var(--ease-out);
}
.strength-label {
  display: block;
  margin-top: 6px;
  font-family: var(--pr-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ----- Consent / Custom Checkbox ----------------------------------- */
.consent {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--surface-line);
  border-radius: var(--r-card);
  background: var(--surface-card);
}
.consent .checkbox {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--surface-fg-2);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  margin: 2px 0 0;
  position: relative;
  transition: all var(--t-fast) var(--ease-out);
}
.consent input[type="checkbox"]:hover {
  border-color: var(--surface-fg);
}
.consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--accent-fg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent .consent-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--surface-fg-2);
}
.consent .consent-text a {
  color: var(--surface-fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.consent .consent-text a:hover {
  color: var(--accent);
}

/* ----- Submit-Row -------------------------------------------------- */
.submit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--surface-line);
}
.submit-row .login-link {
  color: var(--surface-fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  font-size: 14px;
  font-weight: 500;
}
.submit-row .login-link:hover {
  color: var(--accent);
}

/* ----- Primary Button ---------------------------------------------- */
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  border-radius: var(--r-button);
  padding: 18px 32px;
  font-family: var(--pr-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: all var(--t-base) var(--ease-out);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateX(2px);
  filter: brightness(1.06);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* ----- Form-Success ------------------------------------------------ */
.form-success {
  font-size: 15px;
  line-height: 1.5;
  color: var(--surface-fg);
  padding: 20px;
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--surface-card);
}

/* ----- Form-Error -------------------------------------------------- */
.form-error {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
}

/* ----- Type-Switch (Sprecher / Agentur) ---------------------------- */
body[data-register-type="sprecher"] .eyebrow-agentur,
body[data-register-type="sprecher"] .headline-agentur,
body[data-register-type="sprecher"] .lede-agentur,
body[data-register-type="sprecher"] .step-title-agentur,
body[data-register-type="sprecher"] .audio-text-agentur,
body[data-register-type="sprecher"] .form-head-agentur,
body[data-register-type="sprecher"] .agenturname-row,
body[data-register-type="sprecher"] .consent-text-agentur,
body[data-register-type="sprecher"] .submit-agentur {
  display: none;
}
body[data-register-type="agentur"] .eyebrow-sprecher,
body[data-register-type="agentur"] .headline-sprecher,
body[data-register-type="agentur"] .lede-sprecher,
body[data-register-type="agentur"] .step-title-sprecher,
body[data-register-type="agentur"] .audio-text-sprecher,
body[data-register-type="agentur"] .form-head-sprecher,
body[data-register-type="agentur"] .consent-text-sprecher,
body[data-register-type="agentur"] .submit-sprecher {
  display: none;
}

/* ----- Responsive (< 960px) ---------------------------------------- */
@media (max-width: 960px) {
  .auth {
    grid-template-columns: 1fr;
    gap: 56px;
    padding: var(--sp-7) var(--sp-5) var(--sp-8);
  }
  .auth-left {
    min-height: auto;
    padding-right: 0;
  }
  .form-card {
    padding: 28px var(--sp-5);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .submit-row {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
}
