/* ============================================================
   ContArtVic — Sistema de diseño
   Fintech premium · contabilidad inteligente
   ============================================================ */

@layer tokens, reset, base, layout, components, utilities;

/* ---------- Fuentes (auto-hospedadas, subset latin) ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/plusjakartasans-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrainsmono-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand — paleta dorada */
  --blue-900: #3a2c09;
  --blue-700: #6b4f12;
  --blue-600: #b8861b;
  --blue-500: #d4a226;
  --cyan-500: #e0b53e;
  --teal-500: #f0cf72;
  --emerald-500: #8a9434;

  /* Signature gradients */
  --grad-cta: linear-gradient(120deg, #b8861b 0%, #d9a52e 58%, #f0d27a 100%);
  --grad-ink: linear-gradient(120deg, #241a04 0%, #5a4514 100%);
  --grad-mesh:
    radial-gradient(60% 55% at 78% 8%, rgba(212,162,38,0.20) 0%, transparent 60%),
    radial-gradient(50% 50% at 12% 18%, rgba(184,134,27,0.16) 0%, transparent 58%),
    radial-gradient(45% 45% at 60% 92%, rgba(240,210,122,0.14) 0%, transparent 60%);

  /* Light theme (default) */
  --bg: #faf7f0;
  --bg-2: #f3eede;
  --surface: #ffffff;
  --surface-2: #faf6ec;
  --surface-glass: rgba(255,255,255,0.7);
  --border: rgba(58,44,9,0.12);
  --border-strong: rgba(58,44,9,0.18);
  --ink: #241c08;
  --ink-2: #5b4f33;
  --ink-3: #8c7f5e;
  --accent: var(--blue-600);
  --accent-soft: rgba(184,134,27,0.12);
  --teal: #7e7a24;
  --teal-soft: rgba(138,148,52,0.14);
  --shadow-sm: 0 1px 2px rgba(58,44,9,0.06), 0 2px 8px rgba(58,44,9,0.05);
  --shadow-md: 0 8px 30px rgba(58,44,9,0.10);
  --shadow-lg: 0 30px 70px -20px rgba(58,44,9,0.26);
  --shadow-glow: 0 20px 60px -18px rgba(184,134,27,0.45);
  --ring: rgba(184,134,27,0.40);

  /* Type */
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Rhythm */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --section-y: clamp(72px, 10vw, 144px);
}

[data-theme="dark"] {
  --bg: #14100a;
  --bg-2: #1d1810;
  --surface: #221c12;
  --surface-2: #2a2316;
  --surface-glass: rgba(34,28,18,0.62);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --ink: #f6efdf;
  --ink-2: #d6c8a6;
  --ink-3: #a3936f;
  --accent: #e0b54a;
  --accent-soft: rgba(224,181,74,0.16);
  --teal: #c2c558;
  --teal-soft: rgba(194,197,88,0.16);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 34px rgba(0,0,0,0.5);
  --shadow-lg: 0 40px 80px -24px rgba(0,0,0,0.7);
  --shadow-glow: 0 24px 70px -18px rgba(212,162,38,0.5);
  --grad-mesh:
    radial-gradient(60% 55% at 80% 4%, rgba(212,162,38,0.30) 0%, transparent 60%),
    radial-gradient(52% 52% at 8% 16%, rgba(184,134,27,0.22) 0%, transparent 58%),
    radial-gradient(48% 48% at 62% 94%, rgba(240,210,122,0.20) 0%, transparent 60%);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; top: -48px; left: 12px; z-index: 999;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 18px; font-family: var(--font-display);
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-md);
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(212,162,38,0.26); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .6; }
.section-head { max-width: 660px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); }
.h-display { font-size: clamp(2.6rem, 6.2vw, 4.7rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.28rem); color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.text-grad {
  background: var(--grad-cta);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 24px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em;
  white-space: nowrap; position: relative; isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: #fff; background: var(--grad-cta); background-size: 160% 160%;
  box-shadow: var(--shadow-glow);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: var(--grad-cta); background-size: 160% 160%; background-position: 100% 0;
  opacity: 0; transition: opacity .35s;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost {
  background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn-lg { --h: 58px; padding: 0 30px; font-size: 16.5px; }
.btn-block { width: 100%; }

/* arrow nudge */
.btn .arr { transition: transform .3s; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; font-family: var(--font-display);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-pulse { position: relative; }
.dot-pulse::after { content:""; position:absolute; inset:-4px; border-radius:50%; background:currentColor; opacity:.4; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0%{transform:scale(.6);opacity:.5} 100%{transform:scale(2.4);opacity:0} }


/* ---------- Marquee / trust strip ---------- */
.trust-strip { border-block: 1px solid var(--border); background: var(--surface); }
.trust-strip .wrap { display: flex; align-items: center; gap: 28px; padding-block: 26px; flex-wrap: wrap; justify-content: center; }
.trust-strip p { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.trust-logos { display: flex; align-items: center; gap: clamp(24px,4vw,52px); flex-wrap: wrap; justify-content: center; }
.trust-logos span { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink-3); opacity: .75; letter-spacing: -0.02em; transition: opacity .3s, color .3s; }
.trust-logos span:hover { opacity: 1; color: var(--ink); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.fade-up.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1){ transition-delay:.04s } .stagger.in > *:nth-child(2){ transition-delay:.12s }
.stagger.in > *:nth-child(3){ transition-delay:.2s } .stagger.in > *:nth-child(4){ transition-delay:.28s }
.stagger.in > *:nth-child(5){ transition-delay:.36s } .stagger.in > *:nth-child(6){ transition-delay:.44s }

/* ---------- Placeholder imagery ---------- */
.ph {
  position: relative; background:
    repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 11px, var(--bg-2) 11px, var(--bg-2) 22px);
  display: grid; place-items: center; color: var(--ink-3); overflow: hidden;
}
.ph::after { content: attr(data-label); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); }

/* ============================================================
   UTILITIES — @layer utilities
   ============================================================ */
@layer utilities {
  .mt-10 { margin-top: 10px; }
  .mt-14 { margin-top: 14px; }
  .mt-16 { margin-top: 16px; }
  .mt-18 { margin-top: 18px; }
  .mt-20 { margin-top: 20px; }
  .mt-24 { margin-top: 24px; }
  .mt-26 { margin-top: 26px; }
  .mt-32 { margin-top: 32px; }
  .mb-6  { margin-bottom: 6px; }
  .mb-24 { margin-bottom: 24px; }
  .mb-30 { margin-bottom: 30px; }
  .text-center { text-align: center; }
  .fs-12 { font-size: 12.5px; }
  .fs-14 { font-size: 14.5px; }

  /* img inside .ph — ready for real images with lazy loading */
  .ph img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: inherit;
  }
}

/* ---------- Section overrides (generales) ---------- */
.section-head h2 { margin-top: 16px; }
.section-head .lede { margin-top: 16px; }
