/* ============================================================
   c2g-design.css — Cals2Gains Design System (global)
   Author: Cals2Gains team
   Purpose: Unified, professional, modern look across ALL
            subpages of cals2gains.com. ADDITIVE (no class
            conflicts). Mobile-first. Dark theme native.

   Sections:
     1. Reset
     2. Tokens (CSS custom properties)
     3. Typography
     4. Components (buttons, cards, hero, sections, table…)
     5. Utilities
     6. Animations
     7. Responsive
     8. Reduced motion
     9. Print styles
   ============================================================ */


/* ----------------------------------------------------------
   1. Reset (modern, lightweight)
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }


/* ----------------------------------------------------------
   2. Tokens
   ---------------------------------------------------------- */
:root {
  /* Brand colors */
  --c-coral: #FF6A4D;
  --c-violet: #9C8CFF;
  --c-orange: #FF9800;
  --c-gold: #FFD700;
  --c-dark: #17121D;
  --c-deep: #1E1829;
  --c-deep-2: #251D33;
  --c-bone: #F7F2EA;

  /* Alpha shades */
  --c-bone-90: rgba(247, 242, 234, 0.9);
  --c-bone-60: rgba(247, 242, 234, 0.6);
  --c-bone-40: rgba(247, 242, 234, 0.4);
  --c-bone-15: rgba(247, 242, 234, 0.15);
  --c-bone-08: rgba(247, 242, 234, 0.08);
  --c-violet-15: rgba(156, 140, 255, 0.15);
  --c-violet-25: rgba(156, 140, 255, 0.25);
  --c-violet-40: rgba(156, 140, 255, 0.40);
  --c-coral-15: rgba(255, 106, 77, 0.15);
  --c-coral-25: rgba(255, 106, 77, 0.25);

  /* Gradients */
  --g-primary: linear-gradient(135deg, #9C8CFF, #FF6A4D);
  --g-tripwire: linear-gradient(135deg, #FF6A4D, #FF9800);
  --g-text: linear-gradient(135deg, #9C8CFF, #FF6A4D);
  --g-soft: linear-gradient(180deg, rgba(156,140,255,0.06), rgba(255,106,77,0.04));

  /* Typography */
  --f-display: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: 'Instrument Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid font sizes */
  --fs-h1: clamp(2rem, 5vw, 3.4rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.5rem);
  --fs-h4: clamp(1.05rem, 1.5vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.85rem;
  --fs-eyebrow: 0.72rem;

  /* Spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Shadows / glow */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.20);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.30);
  --shadow-glow: 0 0 32px rgba(156, 140, 255, 0.18);
  --shadow-glow-coral: 0 0 32px rgba(255, 106, 77, 0.20);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-med: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ----------------------------------------------------------
   3. Typography (base — applies even without c2g-* classes)
   ---------------------------------------------------------- */
html { background-color: var(--c-dark); }

body {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-bone);
  background-color: var(--c-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 0;
  color: var(--c-bone);
}
h1 { font-size: var(--fs-h1); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); font-weight: 700; }

p { margin-top: 0; }

a { color: var(--c-violet); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-coral); }
a:focus-visible {
  outline: 2px solid var(--c-violet);
  outline-offset: 3px;
  border-radius: 2px;
}

code, pre, kbd, samp { font-family: var(--f-mono); }

::selection { background: var(--c-violet); color: var(--c-dark); }

/* Eyebrow */
.c2g-eyebrow {
  font-family: var(--f-display);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-violet);
  display: inline-block;
  margin-bottom: var(--s-3);
}

/* Animated underline link */
.c2g-link {
  color: var(--c-bone);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--t-med);
  padding-bottom: 1px;
}
.c2g-link:hover { background-size: 100% 1px; color: var(--c-coral); }


/* ----------------------------------------------------------
   4. Components
   ---------------------------------------------------------- */

/* 4.1 Container & sections ---------------------------------- */
.c2g-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.c2g-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-7) var(--s-5);
}

.c2g-section--alt {
  background-color: var(--c-deep);
  max-width: none;
  padding-left: max(var(--s-5), calc((100vw - 1100px) / 2));
  padding-right: max(var(--s-5), calc((100vw - 1100px) / 2));
}

/* 4.2 Hero ------------------------------------------------- */
.c2g-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-8) var(--s-5);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(156, 140, 255, 0.12), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 106, 77, 0.08), transparent 60%);
}
.c2g-hero__title {
  font-size: var(--fs-h1);
  margin-bottom: var(--s-4);
  max-width: 24ch;
}
.c2g-hero__subtitle {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto var(--s-6);
  color: var(--c-bone-90);
}

/* 4.3 Buttons ---------------------------------------------- */
.c2g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-full);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-med), background var(--t-med), color var(--t-med), border-color var(--t-med);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.c2g-btn:focus-visible {
  outline: 2px solid var(--c-violet);
  outline-offset: 3px;
}

.c2g-btn--primary {
  background: var(--g-primary);
  color: var(--c-dark);
  box-shadow: var(--shadow-sm);
}
.c2g-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
  color: var(--c-dark);
}

.c2g-btn--ghost {
  background: transparent;
  color: var(--c-bone);
  border-color: var(--c-bone-15);
}
.c2g-btn--ghost:hover {
  border-color: var(--c-violet);
  color: var(--c-violet);
  transform: translateY(-1px);
}

.c2g-btn--tripwire {
  background: var(--g-tripwire);
  color: var(--c-dark);
  box-shadow: var(--shadow-glow-coral);
}
.c2g-btn--tripwire:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(255, 106, 77, 0.35);
  color: var(--c-dark);
}

.c2g-btn--lg { font-size: 1.05rem; padding: var(--s-4) var(--s-6); min-height: 52px; }
.c2g-btn--sm { font-size: 0.85rem; padding: var(--s-2) var(--s-4); min-height: 36px; }

.c2g-btn--block { display: flex; width: 100%; }

/* 4.4 Cards ------------------------------------------------ */
.c2g-card {
  background: var(--c-deep);
  border: 1px solid var(--c-violet-15);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-med);
}
.c2g-card:hover {
  border-color: var(--c-violet-25);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.c2g-card--feature {
  position: relative;
  overflow: hidden;
}
.c2g-card--feature::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--g-primary);
}
.c2g-card__title { margin: 0 0 var(--s-2); font-size: var(--fs-h4); }
.c2g-card__body { color: var(--c-bone-90); margin: 0; }

/* 4.5 Trust badges / pills --------------------------------- */
.c2g-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  background: var(--c-violet-15);
  color: var(--c-bone);
  font-family: var(--f-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--c-violet-25);
}
.c2g-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-violet);
  box-shadow: 0 0 0 0 rgba(156, 140, 255, 0.7);
  animation: c2g-pulse 2s infinite;
}
.c2g-badge--coral { background: var(--c-coral-15); border-color: var(--c-coral-25); }
.c2g-badge--coral::before { background: var(--c-coral); animation: c2g-pulse-coral 2s infinite; }

@keyframes c2g-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(156, 140, 255, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(156, 140, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(156, 140, 255, 0); }
}
@keyframes c2g-pulse-coral {
  0%   { box-shadow: 0 0 0 0 rgba(255, 106, 77, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 106, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 77, 0); }
}

/* 4.6 Tooltip / pill -------------------------------------- */
.c2g-tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--c-bone-40);
  cursor: help;
}
.c2g-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--c-deep-2);
  color: var(--c-bone);
  border: 1px solid var(--c-violet-25);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast);
  box-shadow: var(--shadow-md);
  z-index: 50;
}
.c2g-tooltip:hover::after,
.c2g-tooltip:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 4.7 Cookie banner / GDPR consent ------------------------ */
.c2g-cookie-banner {
  position: fixed;
  left: var(--s-4);
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 100;
  background: var(--c-deep);
  border: 1px solid var(--c-violet-25);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  animation: c2g-slideUp .4s ease both;
}
.c2g-cookie-banner__text { flex: 1 1 280px; font-size: 0.9rem; color: var(--c-bone-90); margin: 0; }
.c2g-cookie-banner__actions { display: flex; gap: var(--s-2); }

/* 4.8 Tables ----------------------------------------------- */
.c2g-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 0.95rem;
}
.c2g-table thead {
  background: var(--c-deep-2);
  position: sticky;
  top: 0;
}
.c2g-table th, .c2g-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--c-bone-08);
}
.c2g-table th {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-violet);
  font-size: 0.85rem;
  text-transform: uppercase;
}
.c2g-table tbody tr:nth-child(even) { background: rgba(247, 242, 234, 0.02); }
.c2g-table tbody tr:hover { background: var(--c-violet-15); }

/* 4.9 Sticky CTA mobile ----------------------------------- */
.c2g-cta-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--s-3) var(--s-5);
  background: var(--c-deep);
  border-top: 1px solid var(--c-violet-25);
  z-index: 90;
  transform: translateY(110%);
  transition: transform var(--t-med);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.c2g-cta-sticky.is-visible { transform: translateY(0); }
@media (min-width: 768px) {
  .c2g-cta-sticky { display: none; }
}

/* 4.10 Forms (inputs / textareas) ------------------------- */
.c2g-input, .c2g-textarea, .c2g-select {
  width: 100%;
  background: var(--c-deep);
  color: var(--c-bone);
  border: 1px solid var(--c-bone-15);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.c2g-input:focus, .c2g-textarea:focus, .c2g-select:focus {
  outline: none;
  border-color: var(--c-violet);
  box-shadow: 0 0 0 3px var(--c-violet-25);
}
.c2g-textarea { min-height: 120px; resize: vertical; }

/* 4.11 Lists ---------------------------------------------- */
.c2g-list { padding-left: 0; list-style: none; }
.c2g-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: var(--s-2);
}
.c2g-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6em;
  height: 0.6em;
  border-radius: 2px;
  background: var(--g-primary);
  transform: rotate(45deg);
}

/* 4.12 Quote / testimonial -------------------------------- */
.c2g-quote {
  border-left: 3px solid var(--c-violet);
  padding: var(--s-3) var(--s-5);
  margin: var(--s-5) 0;
  font-style: italic;
  color: var(--c-bone-90);
  background: var(--c-violet-15);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}


/* ----------------------------------------------------------
   5. Utilities
   ---------------------------------------------------------- */
.c2g-text-grad {
  background: var(--g-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.c2g-flex-center { display: flex; align-items: center; justify-content: center; }
.c2g-flex-col { display: flex; flex-direction: column; }
.c2g-flex-wrap { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.c2g-grid-2,
.c2g-grid-3,
.c2g-grid-4 {
  display: grid;
  gap: var(--s-5);
}
.c2g-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.c2g-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.c2g-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.c2g-text-center { text-align: center; }
.c2g-text-muted  { color: var(--c-bone-60); }
.c2g-text-small  { font-size: var(--fs-small); }

.c2g-mt-1 { margin-top: var(--s-1); }
.c2g-mt-2 { margin-top: var(--s-2); }
.c2g-mt-3 { margin-top: var(--s-3); }
.c2g-mt-4 { margin-top: var(--s-4); }
.c2g-mt-5 { margin-top: var(--s-5); }
.c2g-mt-6 { margin-top: var(--s-6); }
.c2g-mt-7 { margin-top: var(--s-7); }
.c2g-mt-8 { margin-top: var(--s-8); }
.c2g-mt-9 { margin-top: var(--s-9); }
.c2g-mb-1 { margin-bottom: var(--s-1); }
.c2g-mb-2 { margin-bottom: var(--s-2); }
.c2g-mb-3 { margin-bottom: var(--s-3); }
.c2g-mb-4 { margin-bottom: var(--s-4); }
.c2g-mb-5 { margin-bottom: var(--s-5); }
.c2g-mb-6 { margin-bottom: var(--s-6); }
.c2g-mb-7 { margin-bottom: var(--s-7); }
.c2g-mb-8 { margin-bottom: var(--s-8); }
.c2g-mb-9 { margin-bottom: var(--s-9); }

.c2g-hide { display: none !important; }
.c2g-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ----------------------------------------------------------
   6. Animations
   ---------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes c2g-slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.c2g-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.c2g-fade-in.c2g-revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ----------------------------------------------------------
   7. Responsive (mobile-first)
   ---------------------------------------------------------- */
@media (min-width: 768px) {
  .c2g-section { padding: var(--s-8) var(--s-5); }
  .c2g-hero    { padding: var(--s-9) var(--s-5); }
}
@media (min-width: 1024px) {
  .c2g-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .c2g-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .c2g-grid-4 { grid-template-columns: repeat(4, 1fr); }
}


/* ----------------------------------------------------------
   8. Reduced motion
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .c2g-fade-in { opacity: 1; transform: none; }
  .c2g-badge::before { animation: none; }
}


/* ----------------------------------------------------------
   9. Print styles (minimal — save ink)
   ---------------------------------------------------------- */
@media print {
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  .c2g-hero,
  .c2g-section--alt {
    background: #fff !important;
  }
  .c2g-cta-sticky,
  .c2g-cookie-banner,
  nav, footer { display: none !important; }
  a { color: #000 !important; text-decoration: underline; }
  .c2g-card { border: 1px solid #ccc; box-shadow: none; }
}

/* ============================================================
   10. Affiliate placeholder fallback (.ph)
   Used by 16 subpages with <img onerror="...insertAdjacentHTML
   ...span class=ph...Texto..."> when affiliate images don't load.
   Makes the fallback look professional instead of bare text.
   ============================================================ */
.ph,
span.ph,
.card-img-fallback,
.card-img-wrap > .card-img-fallback {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  width: 100%;
  padding: var(--s-5);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-align: center;
  color: rgba(23, 18, 29, 0.92);
  background: linear-gradient(135deg, var(--c-violet) 0%, var(--c-coral) 100%);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.ph::before,
span.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,0.10), transparent 50%);
  pointer-events: none;
}
/* Variant: smaller for inline grid card */
.product-card .ph,
.aff-card .ph,
.c2g-card .ph {
  min-height: 160px;
  font-size: 0.95rem;
}
