/* CubeWP Signup — Design System */

:root {
  /* ─────────────────────────────────────────────────────────────────────────
     CubeWP brand tokens — sourced from the LIVE marketing site
     (sites.cubewp.com/styles.css) so the dashboard and the landing page read as
     one product. The previous block was themed to "cubewp.com/home-new", an
     older site, which is why the two had drifted apart.

     Variable NAMES are unchanged on purpose: every existing rule (and the
     control panel, which uses the same names) re-skins automatically with zero
     markup churn. Only VALUES changed.
     ───────────────────────────────────────────────────────────────────────── */

  /* Neutrals — marketing --paper/--surface/--ink/--muted/--faint */
  --bg:       #faf9f6;   /* was #f7f7fb (cool lilac) → warm paper */
  --surface:  #ffffff;
  --border:   #edebe4;   /* was #ececf5 (cool) → warm */
  --border-2: #e3e0d8;   /* one step darker than --border, same warm family */
  --text:     #17162a;   /* marketing --ink */
  --muted:    #4a4860;   /* marketing --muted */
  --muted-2:  #8e8ba3;   /* marketing --faint */

  /* Accent — marketing --indigo / --indigo-bright.
     NOTE: hover now goes LIGHTER (as the marketing site does), not darker. */
  --accent:   #5b3bf5;
  --accent-h: #7a5cff;

  /* Functional status colours.
     DELIBERATE DEVIATION: the marketing hue set (teal #10c8a3, coral #ff6b5c,
     amber #ffb23a) is beautiful but fails WCAG AA as TEXT on white (~2.5–2.9:1).
     Status text/among small UI must stay legible, so the accessible values are
     kept here and the brand hues are exposed separately below for decorative
     use (pills, illustrations, chart fills). */
  --success:  #16a34a;
  --danger:   #dc2626;
  --warn:     #d97706;
  --info:     #3e9bff;

  /* Brand hue set — decorative only (never small text on white) */
  --brand-teal:  #10c8a3;
  --brand-coral: #ff6b5c;
  --brand-amber: #ffb23a;
  --brand-sky:   #3e9bff;
  --brand-rose:  #ff74a8;

  /* Radii — existing values PRESERVED to avoid layout regressions on screens
     that can't be visually verified yet; the marketing scale is added alongside
     for progressive adoption (--radius already equals marketing --r-sm). */
  --radius:    12px;
  --radius-sm: 8px;
  --r-sm: 12px;
  --r:    20px;
  --r-lg: 28px;

  /* Depth — one shared shadow token (replaces 7 ad-hoc values over time) */
  --shadow-sm:  0 4px 16px -4px rgba(10, 8, 26, .05);
  --border-ink: rgba(10, 8, 26, .08);

  /* Layout + motion */
  --maxw:  1172px;
  --nav-h: 72px;
  --ease:  cubic-bezier(.16, 1, .3, 1);

  /* Type — marketing uses Bricolage Grotesque (display), Plus Jakarta Sans
     (body) and JetBrains Mono (figures/eyebrows). */
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body:    "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Headings use the marketing display face; figures/eyebrows use the mono face.
   Both fall back through the stack in --font-* if the webfont hasn't loaded. */
h1, h2, h3, .dash-tab-title, .logo {
  font-family: var(--font-display);
}

/* Tabular figures — money, dates, counts, ids. Marketing uses JetBrains Mono
   for exactly this, and it makes columns of numbers align. */
.mono, .tabular, code, .billing-amount, .domain-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}

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

.field {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .01em;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

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

/* Primary button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
  margin-top: 8px;
}
.btn-primary:hover  { background: var(--accent-h); }
.btn-primary:active { transform: scale(.99); }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }

/* ── OTP input row ───────────────────────────────────────── */

.otp-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.otp-box {
  width: 52px !important;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  padding: 0 !important;
  border-radius: var(--radius-sm) !important;
  caret-color: var(--accent);
}

/* ── Plan cards ──────────────────────────────────────────── */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: border-color .15s;
}

.plan-card:hover { border-color: var(--muted); }

.plan-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.plan-price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.plan-features {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-features li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 12px;
}

.btn-plan {
  width: 100%;
  padding: 11px 16px;
  background: var(--border-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.btn-plan:hover { background: var(--border); }

/* ── Subdomain preview ───────────────────────────────────── */

.subdomain-preview {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 15px;
  gap: 1px;
}

.sdpre-host {
  font-weight: 700;
  color: var(--accent);
}

.sdpre-suffix { color: var(--muted); }

.sd-check {
  margin-left: auto;
  font-size: 13px;
}
.sd-check.ok      { color: var(--success); }
.sd-check.taken   { color: var(--danger);  }
.sd-check.loading { color: var(--muted);   }

/* ── Payment step ────────────────────────────────────────── */

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pay-secure {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.5;
}

/* ── Done step ───────────────────────────────────────────── */

.copy-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s;
  display: flex;
  align-items: center;
}
.copy-btn:hover { color: var(--text); }

/* ── Spinner ─────────────────────────────────────────────── */

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

.spinner-md {
  width: 36px; height: 36px;
  border: 3px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text);
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: slideUp .25s ease;
  max-width: 320px;
}

.toast.hidden { display: none; }
.toast.error  { border-color: var(--danger);  color: var(--danger);  }
.toast.ok     { border-color: var(--success); color: var(--success); }

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .plan-grid { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
