/* layout.css — structure only. Every colour, font, and radius resolves through
   the semantic custom properties a theme file supplies (theme-product.css /
   theme-ivcap.css), so one layout serves every brand. Fallbacks below keep the
   page legible even if a theme file fails to load. */

:root {
  --bg: #0b0e14;
  --surface: #131926;
  --surface-border: #232c3b;
  --text: #e8edf4;
  --muted: #8a97ab;
  --primary: #6d5cf0;
  --primary-hover: #5a49e0;
  --primary-contrast: #ffffff;
  --ring: rgba(109, 92, 240, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-eyebrow: var(--font);
  --field-bg: #1a2130;
  --field-border: #2f3a4d;
  --divider: #232c3b;
  --danger: #f2726b;
  --success: #55cf8d;
  --shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.7);
  --backdrop-1: rgba(109, 92, 240, 0.16);
  --backdrop-2: rgba(88, 182, 240, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Ambient backdrop (theme-tuned) ─────────────────────────────────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.blob-a {
  width: 58%;
  height: 72%;
  left: -12%;
  top: -18%;
  background: var(--backdrop-1);
  animation: float-a 34s ease-in-out infinite;
}

.blob-b {
  width: 52%;
  height: 64%;
  right: -18%;
  bottom: -12%;
  background: var(--backdrop-2);
  animation: float-b 29s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(-6%, -10%) scale(1); }
  50%      { transform: translate(10%, 14%) scale(1.07); }
}

@keyframes float-b {
  0%, 100% { transform: translate(12%, 8%) scale(1.05); }
  50%      { transform: translate(-14%, -12%) scale(1); }
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.auth {
  width: 100%;
  display: grid;
  place-items: center;
}

.card {
  width: min(100%, 400px);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.25rem;
}

.mark-wrap {
  display: inline-flex;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.mark {
  width: 44px;
  height: 44px;
}


.eyebrow {
  margin: 0;
  font-family: var(--font-eyebrow);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0.1rem 0 0;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── Messages ───────────────────────────────────────────────────────────── */

.banner {
  margin: 1.25rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  text-align: center;
  text-wrap: pretty;
}

.banner-error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}

.banner-success {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 40%, transparent);
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
}

.banner-info {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

/* ── Form ───────────────────────────────────────────────────────────────── */

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.providers,
.fields {
  display: grid;
  gap: 0.7rem;
}

/* A standalone action block: the verification success page's onward link, which
   is a link rather than a form but wants a form's rhythm. */
.actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:active {
  transform: translateY(1px);
}

/* .btn is shared with anchors (the verification "Continue" link). Nothing else
   strips the UA underline — .alt a is scoped to plain links. */
a.btn {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-provider {
  background: var(--field-bg);
  border-color: var(--field-border);
  color: var(--text);
}

.btn-provider:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 7%, var(--field-bg));
}

/* Branded provider button: [provider logo] [label] [broker logo]. The fixed
   side columns are reserved even when a logo is absent, so the label stays
   centred whether there are zero, one, or two logos. */
.btn.provider {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 0.6rem;
}

.provider-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.provider-text {
  text-align: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--muted);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
}

.alt {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.alt a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.alt a:hover {
  text-decoration: underline;
}

.foot {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .blob-a,
  .blob-b {
    animation: none;
  }
}
