/* ============================================================
   miempresa.ro — Sistema de diseño
   Paleta: azul institucional europeo + acento dorado
   Tipografía: Sora (display) · Inter (texto) · JetBrains Mono (cifras)
   ============================================================ */

:root {
  /* Color */
  --ink:        #0C2236;   /* azul casi negro, texto principal y fondos oscuros */
  --navy:       #123A5C;   /* azul institucional */
  --navy-700:   #0F3050;
  --gold:       #D9A441;   /* acento principal */
  --gold-600:   #C28F2E;
  --gold-soft:  #F3E1B8;
  --paper:      #F4F6F9;   /* fondo claro frío */
  --paper-2:    #EAEEF3;
  --white:      #FFFFFF;
  --muted:      #58677A;   /* texto secundario */
  --line:       #DEE5EC;   /* bordes sutiles */
  --ok:         #2E7D5B;
  --err:        #C0392B;

  /* Tipografía */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Métricas */
  --container: 1140px;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(12,34,54,.04), 0 12px 32px rgba(12,34,54,.07);
  --shadow-lg: 0 20px 60px rgba(12,34,54,.16);
  --ring:      0 0 0 3px rgba(217,164,65,.45);

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* ---------- Tipografía base ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p  { color: var(--ink); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 500;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section--dark { background: var(--ink); color: #DCE5EF; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--alt { background: var(--white); }
.center { text-align: center; }
.measure { max-width: 62ch; }
.measure-narrow { max-width: 46ch; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.6rem}.mt-4{margin-top:2.4rem}

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 22px rgba(217,164,65,.35); }
.btn--primary:hover { background: var(--gold-600); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--navy); }
.btn--lg { padding: 1.05em 1.9em; font-size: 1.05rem; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,246,249,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; color: var(--ink); }
.brand .dot { color: var(--gold); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: .55em .85em; border-radius: 8px; font-size: .96rem; color: var(--ink);
  font-weight: 500; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--paper-2); }
.nav-links a.active { color: var(--gold-600); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s var(--ease); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background:
    radial-gradient(900px 500px at 85% -10%, rgba(217,164,65,.10), transparent 60%),
    linear-gradient(180deg, #0C2236 0%, #102E49 100%);
  color: #E6EDF5; }
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: clamp(48px,8vw,96px) 0; }
.hero h1 { color: #fff; }
.hero h1 .hl { color: var(--gold); }
.hero .lead { color: #AFC0D2; max-width: 50ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; font-size: .9rem; color: #93A6BA; }
.hero-trust span { display: inline-flex; align-items: center; gap: .5em; }
.hero-trust .tick { color: var(--gold); font-weight: 700; }

/* Decoración: líneas de "frontera/mapa" sutiles */
.hero-glow { position: absolute; inset: 0; z-index: 1; opacity: .5;
  background-image: radial-gradient(circle at 12% 80%, rgba(217,164,65,.10), transparent 35%); }

/* ---------- Panel fiscal (elemento distintivo) ---------- */
.fiscal-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
}
.fiscal-panel .fp-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: #8FA6BC; padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px dashed rgba(255,255,255,.14);
}
.fp-live { display: inline-flex; align-items: center; gap: .5em; }
.fp-live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(217,164,65,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(217,164,65,.55)} 70%{box-shadow:0 0 0 9px rgba(217,164,65,0)} 100%{box-shadow:0 0 0 0 rgba(217,164,65,0)} }
.fp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.fp-row:last-child { border-bottom: 0; }
.fp-label { color: #C2D2E2; font-size: .96rem; }
.fp-label small { display: block; color: #7E93A8; font-size: .78rem; margin-top: 2px; }
.fp-value { font-family: var(--font-mono); font-weight: 700; font-size: 1.7rem; color: var(--gold); white-space: nowrap; letter-spacing: -.02em; }
.fp-value .u { font-size: .9rem; color: #9DB1C6; font-weight: 400; }
.fp-foot { margin-top: 16px; font-size: .75rem; color: #7E93A8; font-family: var(--font-mono); }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #CBD6E1; }
.card .ic { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy), var(--ink)); color: var(--gold); margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- Proceso (pasos numerados) ---------- */
.steps { display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start;
  padding: 30px 0; border-top: 1px solid var(--line); position: relative;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: -.04em; }
.step-num small { display:block; font-size:.6rem; letter-spacing:.2em; color: var(--muted); margin-top:6px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); }
.step .meta { font-family: var(--font-mono); font-size: .78rem; color: var(--gold-600); margin-top: 10px; letter-spacing: .04em; }

/* ---------- Stat band ---------- */
.statband { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat { text-align: center; }
.stat .n { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.9rem,4vw,2.6rem); color: var(--gold); }
.stat .l { font-size: .9rem; color: #AFC0D2; margin-top: 4px; }

/* ---------- Tabla comparativa ---------- */
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .96rem; }
.compare thead th { background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; }
.compare .hl { color: var(--gold-600); font-family: var(--font-mono); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { color: var(--gold); font-size: 1.5rem; transition: transform .2s var(--ease); flex: none; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .ans { padding: 0 4px 24px; color: var(--muted); max-width: 70ch; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .22s var(--ease), box-shadow .25s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--navy), var(--ink)); display: grid; place-items: center; color: var(--gold); font-family: var(--font-mono); }
.post-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); }
.post-card h3 { font-size: 1.18rem; }
.post-card .excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.post-card .date { font-size: .82rem; color: var(--muted); font-family: var(--font-mono); }
.post-card .more { color: var(--navy); font-weight: 600; font-family: var(--font-display); font-size: .92rem; }

/* ---------- Artículo (post individual) ---------- */
.article { max-width: 760px; margin-inline: auto; }
.article .kicker { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); }
.article h1 { margin: 12px 0 14px; }
.article .byline { color: var(--muted); font-family: var(--font-mono); font-size: .85rem; margin-bottom: 30px; }
.prose { font-size: 1.08rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose blockquote { border-left: 3px solid var(--gold); padding: .4em 1.1em; color: var(--muted); font-style: italic; background: var(--white); border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--paper-2); padding: .15em .4em; border-radius: 5px; }
.prose pre { background: var(--ink); color: #E6EDF5; padding: 18px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose img { border-radius: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------- Formulario ---------- */
.form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px,4vw,40px); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; font-family: var(--font-display); }
.field label .req { color: var(--gold-600); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8em .9em; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); background: #fff; }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; flex: none; }
.consent a { color: var(--navy); text-decoration: underline; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { display: none; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .95rem; margin-bottom: 18px; }
.form-status.show { display: block; }
.form-status.ok { background: #E6F4EC; color: var(--ok); border: 1px solid #BFE3CE; }
.form-status.err { background: #FBE9E7; color: var(--err); border: 1px solid #F2C6C0; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--ink) 100%); border-radius: var(--radius); padding: clamp(36px,6vw,64px); text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #AFC0D2; max-width: 54ch; margin: 12px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9DB1C6; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-mono); font-weight: 500; margin-bottom: 16px; }
.site-footer a { display: block; padding: 5px 0; color: #9DB1C6; font-size: .95rem; transition: color .15s; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff; margin-bottom: 12px; }
.footer-brand .dot { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: #6F8398; }
.footer-disclaimer { font-size: .78rem; color: #5E708A; line-height: 1.6; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: linear-gradient(180deg, #0C2236, #0F2E49); color: #E6EDF5; padding: clamp(56px,8vw,88px) 0 clamp(40px,6vw,60px); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #AFC0D2; }
.breadcrumb { font-family: var(--font-mono); font-size: .78rem; color: #7E93A8; margin-bottom: 16px; letter-spacing: .04em; }
.breadcrumb a:hover { color: var(--gold); }

/* ---------- Pills ---------- */
.pill-row { display:flex; flex-wrap:wrap; gap:10px; }
.pill { font-family: var(--font-mono); font-size: .78rem; padding: .45em .9em; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--navy); }
.section--dark .pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #C2D2E2; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .statband { grid-template-columns: repeat(2,1fr); }
  .post-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 22px 22px;
    gap: 4px; transform: translateY(-130%); transition: transform .3s var(--ease); box-shadow: var(--shadow); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: .8em .6em; }
  .nav-cta { margin: 8px 0 0; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .statband { grid-template-columns: repeat(2,1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 64px 1fr; gap: 18px; }
  .step-num { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .compare { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
