/* Sign-in, forgot password and set password (site/index.html, site/account/*).
   A centered card on a black canvas with a faint gold glow. Black / gold /
   white only; Manrope only (no serif in the portal). The Inner Cirql Coaching
   lockup is the locked kit file (assets/brand/), placed as artwork, never
   re-typeset. Loaded after base.css; every rule is scoped to body.signin so
   the rest of the platform is untouched. */

body.signin {
  --si-gold: #c9a96e;
  --si-gold-hover: #d6ba85;
  --si-black: #000000;
  --si-text: #ffffff;
  --si-text-soft: rgba(255, 255, 255, 0.72);
  --si-text-faint: rgba(255, 255, 255, 0.6);
  --si-line: rgba(255, 255, 255, 0.12);
  --si-field: rgba(255, 255, 255, 0.04);
  --si-field-line: rgba(255, 255, 255, 0.16);
  --si-error: #ff9b8f;

  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 16px 32px;
  color: var(--si-text);
  background-color: var(--si-black);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(201, 169, 110, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 110%, rgba(201, 169, 110, 0.05), transparent 70%);
  background-attachment: fixed;
  font-family: Manrope, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html:has(body.signin) { background: #000; }

.si-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--si-line);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: si-rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes si-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Brand block. The kit PNG carries transparent padding around the ink; the
   box's aspect ratio matches the ink height so object-fit trims it evenly
   without touching the artwork. */
.si-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.si-lockup {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1494 / 492;
  object-fit: cover;
  object-position: center;
}
.si-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--si-text-soft);
}
.si-product::before,
.si-product::after { content: ""; width: 24px; height: 1px; background: var(--si-line); }

.si-head { margin: 32px 0 24px; }
.si-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--si-text);
}
.si-head p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--si-text-soft);
}

/* Form */
.si-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.si-form[hidden] { display: none; }
.si-field { display: flex; flex-direction: column; gap: 8px; }
.si-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.si-form label {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--si-text-soft);
}
.si-input-wrap { position: relative; }
.si-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--si-text-faint); }
.si-form input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--si-text);
  background: var(--si-field);
  border: 1px solid var(--si-field-line);
  border-radius: 12px;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms, background 150ms;
}
.si-form input::placeholder { color: rgba(255, 255, 255, 0.35); }
.si-form input:hover { border-color: rgba(255, 255, 255, 0.26); }
.si-form input:focus {
  border-color: var(--si-gold);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.28);
}
.si-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--si-text);
  -webkit-box-shadow: 0 0 0 1000px #141210 inset;
  caret-color: var(--si-text);
}
.si-input-wrap input { padding-right: 76px; }

/* Show / hide password (assets/js/password-toggle.js). */
.si-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--si-text-soft);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.si-toggle:hover { color: var(--si-text); background: rgba(255, 255, 255, 0.06); }

/* Primary action. Its disabled state is set by the page script while a
   request is in flight; the spinner is CSS only. */
.si-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #000;
  background: var(--si-gold);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 150ms, transform 150ms;
}
.si-submit:hover:not(:disabled) { background: var(--si-gold-hover); }
.si-submit:active:not(:disabled) { transform: scale(0.99); }
.si-submit:disabled { cursor: progress; opacity: 0.75; }
.si-submit:disabled::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: si-spin 700ms linear infinite;
}
@keyframes si-spin { to { transform: rotate(360deg); } }

/* "or" rule and the Google button: a second way in, never the loud one. */
.si-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: rgba(255, 255, 255, 0.45); font-size: 12px; }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.12); }
.si-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 0 20px;
  font-family: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.si-google:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.4); }
.si-google:disabled { cursor: progress; opacity: 0.7; }

/* Messages */
.si-error {
  margin: 16px 0 0;
  min-height: 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: var(--si-error);
}
.si-error:empty { display: none; }
.si-error:not(:empty) {
  padding: 12px 14px;
  background: rgba(255, 155, 143, 0.08);
  border: 1px solid rgba(255, 155, 143, 0.28);
  border-radius: 12px;
}
.si-note {
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--si-text);
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 12px;
}
.si-note[hidden] { display: none; }

/* Links */
body.signin a { color: var(--si-gold); text-decoration: none; border-radius: 4px; }
body.signin a:hover { color: var(--si-gold-hover); text-decoration: underline; text-underline-offset: 3px; }
.si-inline-link { font-size: 13px; font-weight: 600; padding: 2px 0; }
.si-links {
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.si-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Focus: a visible gold ring on everything the keyboard can reach. */
body.signin a:focus-visible,
body.signin button:focus-visible {
  outline: 2px solid var(--si-gold);
  outline-offset: 3px;
}
.si-submit:focus-visible { outline-color: #fff; }

/* Quiet footer under the card. */
.si-footer {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--si-text-faint);
  text-align: center;
}
.si-secure { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.si-secure svg { width: 14px; height: 14px; flex: none; }
.si-footer a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

@media (max-width: 480px) {
  body.signin { justify-content: flex-start; padding-top: 32px; gap: 20px; }
  .si-card { padding: 32px 20px 24px; border-radius: 20px; }
  .si-lockup { width: 208px; }
  .si-head { margin: 28px 0 20px; }
  .si-head h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .si-card { animation: none; }
  .si-submit, .si-form input { transition: none; }
  .si-submit:disabled::before { animation: none; border-top-color: rgba(0, 0, 0, 0.25); border-color: #000; }
}
