/* ============================================================
   MyFlowChamp — Signup Page (signup.html)
   Tokens/components already loaded.
   ============================================================ */

/* ── Page background ──────────────────────────────────────── */
body {
  background:
    radial-gradient(circle at 18% 10%, rgba(108, 99, 255, 0.28), transparent 32rem),
    radial-gradient(circle at 86% 16%, rgba(61, 53, 180, 0.22), transparent 34rem),
    radial-gradient(circle at 50% 100%, rgba(61, 220, 132, 0.08), transparent 28rem),
    var(--mfc-bg);
}

/* ── Page shell ───────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(144, 144, 170, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 144, 170, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 72%);
  pointer-events: none;
}

/* ── Brand / logo ─────────────────────────────────────────── */
.brand {
  position: absolute;
  top: 24px;
  left: min(32px, 6vw);
  z-index: 2;
}
.logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; }

/* ── Auth wrap — signup is form-left, story-right ─────────── */
.auth-wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(390px, 500px) minmax(0, 0.94fr);
  gap: 22px;
  align-items: center;
}

/* ── Auth modal (left) ────────────────────────────────────── */
.auth-modal {
  border: 1px solid rgba(144, 144, 170, 0.22);
  border-radius: var(--r-lg);
  padding: 28px;
  background: rgba(28, 31, 42, 0.90);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 36px 100px rgba(2, 6, 23, 0.48);
}
.auth-modal h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--mfc-text);
  margin: 8px 0 0;
  line-height: 1;
}
.auth-modal > p {
  margin: 10px 0 0;
  color: var(--mfc-text-mid);
  font-size: 15px;
  line-height: 1.55;
}

/* ── Form ─────────────────────────────────────────────────── */
form {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
label {
  display: block;
  color: var(--mfc-text-mid);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-sm);
  background: rgba(15, 17, 23, 0.72);
  color: var(--mfc-text);
  padding: 0 14px;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--mfc-text-dim); }
.input:focus {
  border-color: var(--mfc-indigo);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}

/* ── Focus goal templates ─────────────────────────────────── */
.template-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.template {
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-sm);
  background: rgba(15, 17, 23, 0.55);
  color: var(--mfc-text);
  padding: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}
.template:hover { transform: translateY(-1px); }
.template.active {
  border-color: var(--mfc-indigo);
  background: rgba(108, 99, 255, 0.16);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.14);
}
.template strong {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--mfc-text);
}
.template span {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: rgba(108, 99, 255, 0.16);
  color: #C4B5FD;
  font-size: 12px;
  font-weight: 700;
}
.template small {
  display: block;
  margin-top: 4px;
  color: var(--mfc-text-mid);
  font-size: 12px;
  font-weight: 500;
}

/* ── Error message ────────────────────────────────────────── */
.message {
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: var(--r-sm);
  background: rgba(255, 107, 107, 0.10);
  color: #FCA5A5;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.message:not(.hidden) { display: block; }

/* ── Auth links ───────────────────────────────────────────── */
.auth-links {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mfc-text-mid);
  font-size: 14px;
  font-weight: 600;
}
.auth-links a {
  color: var(--mfc-indigo);
  transition: color 0.15s ease;
}
.auth-links a:hover { color: var(--mfc-text); }

/* ── Kicker ───────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C4B5FD;
}

/* ── Story panel (right) ──────────────────────────────────── */
.story {
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-lg);
  padding: 34px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(61, 220, 132, 0.08), rgba(108, 99, 255, 0.16), rgba(61, 53, 180, 0.10)),
    var(--mfc-surface);
  box-shadow: 0 32px 100px rgba(2, 6, 23, 0.34);
  overflow: hidden;
  position: relative;
}
.story::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(61, 220, 132, 0.12);
  pointer-events: none;
}
.story h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 600px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 800;
  color: var(--mfc-text);
}

/* Steps in story */
.steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 520px;
}
.step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-sm);
  padding: 14px;
  background: rgba(15, 17, 23, 0.52);
}
.step-num {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: rgba(108, 99, 255, 0.18);
  color: #C4B5FD;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.step strong {
  display: block;
  color: var(--mfc-text);
  font-weight: 700;
}
.step span {
  color: var(--mfc-text-mid);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 920px) {
  .auth-wrap { grid-template-columns: 1fr; padding-top: 54px; align-items: stretch; }
  .auth-modal { width: min(560px, 100%); margin: 0 auto; }
  .story { min-height: auto; padding: 24px; }
}
@media (max-width: 620px) {
  .page { padding: 16px; align-items: flex-start; overflow: visible; }
  .brand { top: 18px; left: 18px; }
  .logo { height: 36px; }
  .auth-modal { margin-top: 72px; padding: 20px; width: 100%; }
  .story { display: none; }
  .two-col { grid-template-columns: 1fr; }
  /* Keep category cards in a horizontal row on mobile */
  .template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  /* Compact: centered icon + label, hide subtitle */
  .template { padding: 10px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .template span { width: 28px; height: 28px; font-size: 10px; }
  .template strong { font-size: 12px; margin-top: 6px; }
  .template small { display: none; }
  .auth-links { display: grid; justify-content: flex-start; }
}
