/* ============================================================
   Inner-Circle Component Layer — v1 (tesla-21)
   Linked ONLY by money pages: index, inner-circle, builder,
   home-services, dashboard, wallet. Additive to styles.css —
   never override existing .tsection/.tbtn/.tnav rules.
   ============================================================ */

:root {
  /* Typography scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: clamp(18px, 2vw, 20px);
  --fs-xl: clamp(22px, 2.5vw, 26px);
  --fs-2xl: clamp(28px, 3.5vw, 36px);
  --fs-3xl: clamp(34px, 4.5vw, 48px);
  --fs-hero: clamp(40px, 6vw, 72px);

  /* Spacing */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 72px;

  /* Radii */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(15, 18, 35, .05), 0 4px 14px rgba(15, 18, 35, .06);
  --shadow-2: 0 2px 6px rgba(15, 18, 35, .07), 0 12px 32px rgba(15, 18, 35, .10);
  --shadow-3: 0 4px 12px rgba(15, 18, 35, .10), 0 24px 60px rgba(15, 18, 35, .16);
  --shadow-gold: 0 8px 30px rgba(212, 175, 55, .25);

  --c-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Glass primitives ---------- */
.glass {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(29, 29, 31, .08);
  border-radius: var(--r-md);
}
.glass-dark {
  background: rgba(20, 17, 10, .62);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--r-md);
  color: #fff;
}
@supports (backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px)) {
  .glass {
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
  }
  .glass-dark {
    background: rgba(20, 17, 10, .42);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
  }
}

/* ---------- Cards ---------- */
.c-card {
  position: relative;
  background: var(--bg, #fff);
  border: 1px solid rgba(29, 29, 31, .08);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: var(--sp-6);
  transition: box-shadow .25s var(--c-ease), transform .25s var(--c-ease), border-color .25s var(--c-ease);
}
.c-card--hover:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
  border-color: rgba(30, 58, 138, .22);
}
.c-card.c-card--glass {
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.c-card--dark {
  background: rgba(22, 24, 32, .92);
  border-color: rgba(255, 255, 255, .10);
  color: #f5f5f7;
}
.c-card--gold { border-color: rgba(212, 175, 55, .45); }
.c-card--gold::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: var(--gold-grad, linear-gradient(135deg, #e7c75a, #d4af37 45%, #b8901f));
}
.c-card--featured {
  border-color: rgba(212, 175, 55, .55);
  box-shadow: var(--shadow-2), var(--shadow-gold);
  transform: translateY(-4px) scale(1.015);
  z-index: 2;
}
.c-card--featured.c-card--hover:hover { transform: translateY(-7px) scale(1.015); }

/* ---------- Badges ---------- */
.c-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid transparent;
}
.c-badge--gold {
  background: var(--gold-grad, linear-gradient(135deg, #e7c75a, #d4af37 45%, #b8901f));
  color: #14110a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, .35);
}
.c-badge--accent { background: var(--accent, #1E3A8A); color: #fff; }
.c-badge--ghost {
  background: transparent;
  border-color: rgba(29, 29, 31, .18);
  color: var(--text-muted, #6e6e73);
}
.c-badge--ghost-light { background: transparent; border-color: rgba(255,255,255,.28); color: rgba(255,255,255,.85); }

/* ---------- Form kit ---------- */
.c-field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.c-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text, #1d1d1f);
  letter-spacing: .01em;
}
.c-input, .c-select, .c-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--text, #1d1d1f);
  background: var(--bg, #fff);
  border: 1px solid rgba(29, 29, 31, .16);
  border-radius: var(--r-sm);
  transition: border-color .2s var(--c-ease), box-shadow .2s var(--c-ease);
}
.c-textarea { min-height: 120px; resize: vertical; }
.c-input:focus, .c-select:focus, .c-textarea:focus {
  outline: none;
  border-color: var(--accent, #1E3A8A);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, .18);
}
.c-on-dark .c-label { color: rgba(255, 255, 255, .88); }
.c-on-dark .c-input, .c-on-dark .c-select, .c-on-dark .c-textarea {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}
.c-on-dark .c-input:focus, .c-on-dark .c-select:focus, .c-on-dark .c-textarea:focus {
  border-color: var(--gold, #d4af37);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .22);
}
.c-help { font-size: var(--fs-xs); color: var(--text-muted, #6e6e73); }
.c-error { font-size: var(--fs-xs); color: #c0392b; font-weight: 600; }

/* ---------- Stats / price ---------- */
.c-stat { display: flex; flex-direction: column; gap: var(--sp-1); }
.c-stat__value {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.c-stat__value--gold {
  background: var(--gold-grad, linear-gradient(135deg, #e7c75a, #d4af37 45%, #b8901f));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.c-stat__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted, #6e6e73);
}
.c-price { display: flex; align-items: baseline; gap: 6px; }
.c-price__amount {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}
.c-price__period { font-size: var(--fs-sm); color: var(--text-muted, #6e6e73); font-weight: 500; }

.c-divider-gold {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .65), transparent);
  margin: var(--sp-5) 0;
}

/* ---------- Stat strip ---------- */
.c-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  text-align: center;
}
@media (max-width: 760px) { .c-stat-strip { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); } }

/* ---------- Table ---------- */
.c-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.c-table th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted, #6e6e73);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(29, 29, 31, .12);
}
.c-table td { padding: 12px; border-bottom: 1px solid rgba(29, 29, 31, .07); }
.c-table tr:last-child td { border-bottom: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .u-reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: c-reveal .7s var(--c-ease) forwards;
  }
  .u-reveal-2 { animation-delay: .12s; }
  .u-reveal-3 { animation-delay: .24s; }
  @keyframes c-reveal { to { opacity: 1; transform: none; } }
}

/* ---------- Utilities ---------- */
.u-text-gold {
  background: var(--gold-grad, linear-gradient(135deg, #e7c75a, #d4af37 45%, #b8901f));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.u-grid { display: grid; gap: var(--sp-5); }
.u-grid--3 { grid-template-columns: repeat(3, 1fr); }
.u-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .u-grid--3, .u-grid--4 { grid-template-columns: 1fr; } }
@media (max-width: 1100px) and (min-width: 901px) { .u-grid--4 { grid-template-columns: repeat(2, 1fr); } }
