/* Meet Brokers — Design tokens
   Basado en Manual de Marca oficial (Feb 2025).
   Palette: Verde Oscuro #596156 + grises + blanco/negro.
   Fonts: Calvino (display) + Founders Grotesk (text). Web fallbacks below.
*/
:root {
  /* Core brand — oficial manual */
  --verde: #596156;
  --verde-oscuro: #3a3e38;
  --verde-deep: #252825;
  --verde-tint: #7a8475;

  /* Grises oficiales */
  --gris-claro: #B7B7B7;
  --gris-oscuro: #4C4C4C;

  /* Accent: latón sofisticado — extensión del manual para data/off-market/UI accents.
     Muted, desaturado, cercano al verde en temperatura. */
  --dorado: #B89968;
  --dorado-light: #D4B886;
  --dorado-deep: #8a6f44;

  /* Surfaces */
  --crema: #F2F1EC;
  --crema-warm: #ECEAE2;
  --warm-white: #FAFAF7;
  --white: #FFFFFF;
  --carbon: #000000;
  --carbon-soft: #1a1a1a;

  /* Text */
  --ink: #000000;
  --ink-soft: #4C4C4C;
  --ink-muted: #6b6b67;
  --ink-light: #B7B7B7;
  --ink-invert: #FAFAF7;

  /* Lines */
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);
  --line-invert: rgba(250, 250, 247, 0.14);

  /* Type — Calvino + Founders Grotesk con fallbacks coherentes */
  --font-display: "Cormorant Garamond", "Calvino", "Playfair Display", Georgia, serif;
  --font-body: "Inter Tight", "Founders Grotesk", "Neue Haas Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale (desktop) — display uses clamp for responsiveness */
  --fs-display-xl: clamp(72px, 10vw, 168px);
  --fs-display-l: clamp(56px, 7vw, 120px);
  --fs-display-m: clamp(44px, 5.5vw, 88px);
  --fs-h1: clamp(40px, 4.5vw, 72px);
  --fs-h2: clamp(32px, 3.6vw, 56px);
  --fs-h3: clamp(24px, 2.2vw, 34px);
  --fs-h4: 22px;
  --fs-body-lg: 19px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-eyebrow: 11px;

  /* Spacing scale (8pt based) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-14: 56px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-28: 112px; --s-32: 128px;
  --s-40: 160px;

  /* Radius */
  --r-none: 0px;
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-full: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --container: 1400px;
  --container-wide: 1600px;
  --container-narrow: 1040px;
  --header-h: 80px;
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 3px;
}
input, select, textarea { font: inherit; color: inherit; }

/* ---------- Type ---------- */
.display-xl, .display-l, .display-m, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
  text-wrap: balance;
}
.display-xl { font-size: var(--fs-display-xl); letter-spacing: -0.035em; line-height: 0.9; }
.display-l  { font-size: var(--fs-display-l); letter-spacing: -0.03em; }
.display-m  { font-size: var(--fs-display-m); letter-spacing: -0.025em; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); line-height: 1.02; }
.h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; line-height: 1.1; }

.italic-accent { font-style: italic; font-weight: 300; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  display: inline-block;
  opacity: 0.6;
}
.eyebrow.eyebrow--dorado { color: var(--dorado); }
.surface-dark .eyebrow.eyebrow--dorado, .surface-carbon .eyebrow.eyebrow--dorado { color: var(--dorado-light); }
.eyebrow.eyebrow--invert { color: rgba(250,250,247,0.7); }

.lede {
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}
.small { font-size: var(--fs-small); color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  transition: all .35s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-block; width: 14px; height: 10px;
  transition: transform .35s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--verde); color: var(--warm-white); }
.btn-primary:hover { background: var(--verde-oscuro); }
.btn-dorado { background: var(--dorado); color: var(--carbon); }
.btn-dorado:hover { background: var(--dorado-light); }
.btn-dark { background: var(--carbon); color: var(--warm-white); }
.btn-dark:hover { background: var(--verde-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--warm-white); border-color: var(--ink); }
.btn-ghost-invert { color: var(--warm-white); border: 1px solid var(--line-invert); }
.btn-ghost-invert:hover { background: var(--warm-white); color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: gap .3s var(--ease-out), color .3s var(--ease-out);
}
.link-arrow:hover { gap: 16px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-wide { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) {
  .container, .container-wide, .container-narrow { padding: 0 20px; }
}
.section { padding: var(--s-16) 0; }
.section-lg { padding: var(--s-20) 0; }
.section-sm { padding: var(--s-12) 0; }
.section-tight-top { padding-top: var(--s-8); }
.section-tight-bottom { padding-bottom: var(--s-8); }

/* ---------- Surfaces ---------- */
.surface-warm { background: var(--warm-white); color: var(--ink); }
.surface-crema { background: var(--crema); color: var(--ink); }
.surface-white { background: var(--white); color: var(--ink); }
.surface-dark { background: var(--verde-deep); color: var(--ink-invert); }
.surface-carbon { background: var(--carbon); color: var(--ink-invert); }
.surface-verde { background: var(--verde); color: var(--ink-invert); }
.surface-dark .eyebrow, .surface-carbon .eyebrow, .surface-verde .eyebrow { color: rgba(250,250,247,0.65); }
.surface-dark .muted, .surface-carbon .muted, .surface-verde .muted { color: rgba(250,250,247,0.65); }
.surface-dark .lede, .surface-carbon .lede, .surface-verde .lede { color: rgba(250,250,247,0.82); }
.surface-dark .h1, .surface-dark .h2, .surface-dark .h3,
.surface-carbon .h1, .surface-carbon .h2, .surface-carbon .h3,
.surface-verde .h1, .surface-verde .h2, .surface-verde .h3,
.surface-dark .display-l, .surface-dark .display-xl, .surface-dark .display-m,
.surface-carbon .display-l, .surface-carbon .display-xl, .surface-carbon .display-m,
.surface-verde .display-l, .surface-verde .display-xl, .surface-verde .display-m
{ color: var(--warm-white); }

/* ---------- Grid helpers ---------- */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-12 { grid-template-columns: repeat(6, 1fr); gap: 20px; }
}

/* ---------- Image placeholder system ---------- */
.img-ph {
  position: relative;
  background: var(--crema-warm);
  overflow: hidden;
}
.img-ph img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.img-ph:hover img { transform: scale(1.04); }
.img-ph .img-tag {
  position: absolute; left: 16px; bottom: 16px;
  padding: 6px 10px;
  background: rgba(28,28,26,0.7);
  color: var(--warm-white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-21-9 { aspect-ratio: 21 / 9; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.4s; }

.line-draw { width: 0; height: 1px; background: currentColor; transition: width 1.2s var(--ease-out); }
.line-draw.visible { width: 64px; }
.line-draw.long.visible { width: 120px; }

/* ---------- Divider ---------- */
.rule { height: 1px; background: var(--line); width: 100%; }
.rule-invert { background: var(--line-invert); }

/* ---------- Tag / chip ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(28,28,26,0.06);
  color: var(--ink-soft);
  border-radius: var(--r-sm);
  font-weight: 500;
}
.tag.tag--dorado { background: rgba(89, 97, 86, 0.14); color: var(--verde-oscuro); }
.tag.tag--verde { background: rgba(89, 97, 86, 0.14); color: var(--verde-oscuro); }
.tag.tag--invert { background: rgba(250,250,247,0.12); color: var(--warm-white); }

/* ---------- Form bits ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500;
}
.field input, .field select, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  font-size: 16px;
  transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--verde);
}
.surface-dark .field input, .surface-dark .field select,
.surface-carbon .field input, .surface-carbon .field select {
  color: var(--warm-white);
  border-bottom-color: rgba(250,250,247,0.24);
}
.surface-dark .field label, .surface-carbon .field label { color: rgba(250,250,247,0.55); }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 20px; } .mt-8 { margin-top: 28px; }
.mt-12 { margin-top: 36px; } .mt-16 { margin-top: 48px; } .mt-24 { margin-top: 72px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 20px; } .mb-8 { margin-bottom: 28px; }
.mb-12 { margin-bottom: 36px; } .mb-16 { margin-bottom: 48px; }
.text-center { text-align: center; }

/* Selection */
::selection { background: var(--dorado); color: var(--carbon); }

/* ---------- Scroll animations observer auto ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .line-draw { width: 64px; transition: none; }
  .img-ph:hover img { transform: none; }
}
