/* =====================================================================
   ReFi Collective — Design Tokens
   Sources: Brand Book ReFi 2025 + 2026 Pitch Deck + Finanzas Regenerativas
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,400&family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
  /* ---------- BRAND PALETTE (from Brand Book) ---------- */
  --refi-blue:    #2678D9;  /* Inversión / agua / capital financiero */
  --refi-green:   #26D987;  /* Regeneración / capital natural */
  --refi-orange:  #FF971A;  /* Energía / capital social / cálido */
  --refi-ink:     #1B212C;  /* Texto principal, fondo oscuro */

  /* Tinted neighbours (derived, oklch harmonised, for surfaces & states) */
  --refi-blue-50:   #EAF2FC;
  --refi-blue-100:  #C7DCF6;
  --refi-blue-300:  #6FA3E5;
  --refi-blue-700:  #1A5BAA;
  --refi-blue-900:  #0E3A73;

  --refi-green-50:  #E6FBF1;
  --refi-green-100: #BFF4DC;
  --refi-green-300: #65E2A8;
  --refi-green-700: #15A364;
  --refi-green-900: #0A6B41;

  --refi-orange-50:  #FFF3E0;
  --refi-orange-100: #FFDDA8;
  --refi-orange-300: #FFB957;
  --refi-orange-700: #C76F00;
  --refi-orange-900: #8A4C00;

  --refi-ink-90:  #2A3340;
  --refi-ink-70:  #4A5566;
  --refi-ink-50:  #7B8595;
  --refi-ink-30:  #B6BDC8;
  --refi-ink-15:  #D8DCE3;
  --refi-ink-08:  #EAECF0;
  --refi-ink-04:  #F4F5F7;

  /* ---------- NEUTRAL / PAPER ---------- */
  --refi-paper:    #FAF8F4;   /* warm off-white, papel reciclado */
  --refi-paper-2:  #F2EFE7;
  --refi-bone:     #ECE6D7;
  --refi-white:    #FFFFFF;

  /* ---------- SEMANTIC SURFACES ---------- */
  --bg:            var(--refi-paper);
  --bg-elevated:   var(--refi-white);
  --bg-inverse:    var(--refi-ink);
  --bg-muted:      var(--refi-ink-04);

  --fg:            var(--refi-ink);
  --fg-muted:      var(--refi-ink-70);
  --fg-subtle:     var(--refi-ink-50);
  --fg-inverse:    var(--refi-paper);
  --fg-on-color:   #FFFFFF;

  --border:        var(--refi-ink-15);
  --border-strong: var(--refi-ink-30);
  --border-soft:   var(--refi-ink-08);

  --accent:        var(--refi-blue);
  --accent-fg:     #FFFFFF;
  --positive:      var(--refi-green);
  --warning:       var(--refi-orange);
  --critical:      #D9434E;

  /* ---------- SIGNATURE GRADIENT (from tagline logo) ---------- */
  /* fucsia → naranja → ámbar → verde → cian — el espectro micelial */
  --refi-spectrum: linear-gradient(
    90deg,
    #E94B86 0%,
    #FF6B3D 22%,
    #FF971A 42%,
    #F6C84A 58%,
    #26D987 78%,
    #2EB8C9 100%
  );
  --refi-spectrum-soft: linear-gradient(
    90deg,
    #E94B86, #FF971A, #26D987, #2EB8C9
  );

  /* ---------- TYPOGRAPHY ---------- */
  --font-serif:  'Merriweather', 'Source Serif Pro', Georgia, serif;
  --font-sans:   'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale — fluid, anchored to 1rem = 16px */
  --fs-display: clamp(48px, 6vw, 88px);
  --fs-h1:      clamp(36px, 4vw, 56px);
  --fs-h2:      clamp(28px, 3vw, 40px);
  --fs-h3:      clamp(22px, 2.2vw, 28px);
  --fs-h4:      20px;
  --fs-lg:      18px;
  --fs-body:    16px;
  --fs-sm:      14px;
  --fs-xs:      12px;
  --fs-eyebrow: 13px;

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.5;
  --lh-loose:   1.7;

  --ls-tight:   -0.02em;
  --ls-normal:  0;
  --ls-wide:    0.08em;
  --ls-eyebrow: 0.14em;

  /* ---------- SPACING (4px base) ---------- */
  --s-0: 0;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* ---------- RADII ---------- */
  /* Soft, organic — never sharp. Pill shapes for CTAs. */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---------- SHADOWS ---------- */
  /* Subtle, warm — never blue/cold. */
  --shadow-xs: 0 1px 2px rgba(27, 33, 44, 0.06);
  --shadow-sm: 0 2px 6px rgba(27, 33, 44, 0.06), 0 1px 2px rgba(27, 33, 44, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(27, 33, 44, 0.14), 0 2px 6px rgba(27, 33, 44, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(27, 33, 44, 0.18), 0 4px 12px rgba(27, 33, 44, 0.06);
  --shadow-glow-green:  0 0 0 6px rgba(38, 217, 135, 0.18);
  --shadow-glow-blue:   0 0 0 6px rgba(38, 120, 217, 0.18);
  --shadow-glow-orange: 0 0 0 6px rgba(255, 151, 26, 0.18);

  /* ---------- MOTION ---------- */
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in:    cubic-bezier(0.6, 0, 0.7, 0.2);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   420ms;

  /* ---------- LAYOUT ---------- */
  --container:  1240px;
  --container-narrow: 880px;
  --gutter:     clamp(16px, 4vw, 48px);
}

/* =====================================================================
   SEMANTIC TYPE STYLES
   ===================================================================== */

html, body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display, .refi-display {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg);
  text-wrap: balance;
}

h1, .h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h2, .h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h3, .h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
}

h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
}

p, .body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  color: var(--fg);
  text-wrap: pretty;
}

.lead {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
}

.small {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--fg-muted);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
}

.tagline {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--fg);
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* Spectrum text — for hero accents */
.spectrum-text {
  background: var(--refi-spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Spectrum underline divider (from tagline logo) */
.spectrum-rule {
  height: 2px;
  width: 100%;
  background: var(--refi-spectrum);
  border: 0;
}

.spectrum-rule--thick { height: 4px; }

/* Focus ring — accessible, on-brand */
:focus-visible {
  outline: 2px solid var(--refi-blue);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
