/* ============================================================
   SGC Consumer Layout — companion to sgc-tokens.css
   Consumer-facing pages: shell, animations, components.
   Always load AFTER sgc-tokens.css.
   ============================================================ */

/* ── Shell & Body ────────────────────────────────────────── */
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-base);
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--fg-1);
  overflow-x: hidden;
}

/* Ambient drifting orbs */
body::before, body::after {
  content: ""; position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%;
}
body::before {
  width: 520px; height: 520px; top: -180px; right: -180px;
  background: radial-gradient(circle, rgba(255,255,255,.45) 0%, rgba(255,255,255,.1) 45%, transparent 70%);
  animation: orbDrift 14s ease-in-out infinite;
}
body::after {
  width: 400px; height: 400px; bottom: 40px; left: -140px;
  background: radial-gradient(circle, rgba(255,255,255,.32) 0%, rgba(255,255,255,.05) 50%, transparent 72%);
  animation: orbDrift 18s ease-in-out infinite reverse;
}
@keyframes orbDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(8px,12px) scale(1.06); }
}

/* Content shell */
.shell {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.shell.wide { max-width: 880px; }

/* ── Entrance Animations ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.anim-fadeUp  { animation: fadeUp  .55s var(--ease-out)    both; }
.anim-scaleIn { animation: scaleIn .55s var(--ease-spring) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .18s; }
.delay-3 { animation-delay: .28s; }
.delay-4 { animation-delay: .38s; }

/* ── Top Nav ─────────────────────────────────────────────── */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 8px;
}
.logo-pill {
  display: inline-flex; align-items: center;
  padding: 7px 16px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
}
.logo-pill img { height: 20px; width: auto; }

/* ── Hero Card ───────────────────────────────────────────── */
.hcard {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hcard-head {
  background: var(--grad-rose);
  padding: 26px 22px 20px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hcard-head::before {
  content: ''; position: absolute; inset: -50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.12), transparent 70%);
  animation: rotHdr 20s linear infinite;
  pointer-events: none;
}
@keyframes rotHdr { to { transform: rotate(360deg); } }
.hcard-body { padding: 20px 22px 24px; text-align: center; }
.hcard-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  background: var(--rose-200); color: var(--rose-600);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  margin-bottom: 10px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-sans); font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease-out),
              transform  var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-med)  var(--ease-out);
  position: relative; overflow: hidden;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad-rose); color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.8s linear infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(177,90,53,.36); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-cta); }

.btn-secondary {
  background: var(--bg-surface); color: var(--rose-600);
  border: 1.5px solid var(--rose-300);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--rose-50); border-color: var(--rose-500); }

.btn-quiet {
  background: rgba(177,90,53,.06); color: var(--rose-700);
  border: none;
}
.btn-quiet:hover { background: rgba(177,90,53,.12); }

.btn-ghost {
  background: transparent; color: var(--ink-600);
  border: none;
}
.btn-ghost:hover { background: rgba(0,0,0,.04); }

.btn-pill   { border-radius: var(--radius-pill); padding: 14px 28px; }
.btn-full   { width: 100%; justify-content: center; }
.btn-sm     { padding: 9px 16px; font-size: 13px; }
.btn:disabled, .btn.btn-disabled {
  background: var(--ink-200) !important; color: var(--ink-400) !important;
  cursor: not-allowed; box-shadow: none !important; transform: none !important;
}

/* ── Form Fields ─────────────────────────────────────────── */
.field-label {
  display: block;
  margin-left: 4px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-800);
}
.field-input {
  width: 100%; padding: 13px 16px;
  box-sizing: border-box;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink-800);
  background: var(--bg-surface);
  border: 2px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inset);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow   var(--dur-fast) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.field-input::placeholder { color: var(--ink-400); }
.field-input:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow-inset);
}
.field-input.is-invalid { border-color: var(--poor); }
.field-msg { font-size: 13px; margin: 5px 0 0 4px; color: var(--poor); font-weight: 500; }

.form-layout { display: flex; flex-direction: column; gap: 20px; }
.field-row   { display: flex; align-items: center; gap: 10px; }

/* ── Chips ───────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
}
.chip-rose  { background: var(--rose-200);   color: var(--rose-600); }
.chip-blue  { background: var(--novis-100);  color: var(--novis-700); }
.chip-good  { background: var(--good-bg);    color: #15803d; }
.chip-warn  { background: var(--warn-bg);    color: #b45309; }
.chip-poor  { background: var(--poor-bg);    color: #b91c1c; }
.chip-ghost {
  background: rgba(255,255,255,.8);
  border: 1px solid var(--ink-200);
  backdrop-filter: blur(4px);
  color: var(--ink-700);
}

/* ── Stepper ─────────────────────────────────────────────── */
.steps-bar {
  display: flex; position: relative;
  padding: 8px 28px 4px;
}
.steps-bar::before {
  content: ''; position: absolute;
  top: 35px; left: 64px; right: 64px;
  height: 5px;
  background: var(--ink-200); border-radius: var(--radius-pill);
  z-index: 0;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; padding: 0 8px; position: relative;
}
.step-n {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-200); color: #fff;
  font-weight: 700; font-size: 22px;
  border: 4px solid var(--bg-base);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  transition: all var(--dur-med) var(--ease-out);
  position: relative; z-index: 1;
}
.step.done .step-n,
.step.active .step-n { background: var(--grad-rose); }
.step.active .step-n {
  box-shadow: 0 0 0 6px rgba(177,90,53,.18), var(--shadow-sm);
  transform: scale(1.05);
}
.step-label { font-size: 13px; color: var(--ink-400); font-weight: 500; white-space: nowrap; }
.step.active .step-label,
.step.done  .step-label { color: var(--ink-800); font-weight: 700; }

/* ── Info & Alert ────────────────────────────────────────── */
.info-box {
  font-size: 13px; color: var(--ink-500); line-height: 1.6;
  background: var(--rose-50); padding: 12px 16px;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--rose-600);
  display: flex; align-items: flex-start; gap: 8px;
}
.info-box i { color: var(--rose-600); margin-top: 2px; flex-shrink: 0; }

.alert {
  padding: 10px 14px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.alert-error   { background: var(--poor-bg); color: #b91c1c; border: 1px solid rgba(220,38,38,.2); }
.alert-success { background: var(--good-bg); color: #15803d; border: 1px solid rgba(22,163,74,.2); }

/* ── Group Box (form section card) ──────────────────────── */
.group-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.group-box h2 {
  font-size: var(--fs-lg); font-weight: 800; color: var(--ink-800);
  margin: 0 0 18px;
  display: flex; align-items: center; gap: 8px;
}
.group-box h2 i { color: var(--rose-600); }

/* ── Value Badge ─────────────────────────────────────────── */
.value-badge {
  min-width: 76px; padding: 10px 12px;
  text-align: center;
  background: var(--rose-50); color: var(--ink-800);
  border: 1.5px solid var(--rose-200);
  border-radius: var(--radius-md);
  font-family: var(--font-numeric); font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

/* ── Language Select ─────────────────────────────────────── */
.lang-select {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 13px; font-family: var(--font-sans);
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .shell { padding: 0 12px 40px; }
  .hcard-body, .group-box { padding: 16px; }
  .steps-bar { padding: 8px 12px 4px; }
  .steps-bar::before { left: 38px; right: 38px; }
  .step-n { width: 44px; height: 54px; font-size: 18px; }
  .btn-pill { padding: 12px 22px; }
}
