/* ==========================================================================
   CAMPANA CAPITAL GROUP · Private Capital Black Edition
   Sistema de diseño. Contraste verificado (WCAG AA) sobre --ink.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.c47ff12887a3.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.aa6bdaf51a40.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.756049f32875.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --ink: #0b0b0b;          /* negro profundo */
  --carbon: #111111;       /* negro carbón */
  --graphite: #1a1a1a;     /* gris grafito */
  --graphite-2: #242424;
  --ivory: #f2ede4;        /* blanco cálido · 16.9:1 */
  --text: #c9c3b8;         /* texto de lectura · 11.2:1 */
  --muted: #9b958b;        /* secundario · 6.6:1 */
  --gold: #c9a961;         /* acento · 8.7:1 */
  --gold-soft: #b39352;
  --gold-line: rgba(201, 169, 97, 0.32);
  --line: rgba(242, 237, 228, 0.1);
  --line-strong: rgba(242, 237, 228, 0.2);
  --danger: #e8a49a;       /* 9.6:1 */
  --success: #a9c7a0;      /* 10.7:1 */

  /* Tipografía */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-display: clamp(2.3rem, 1.4rem + 2.9vw, 4.5rem);
  --fs-h1: clamp(2.3rem, 1.6rem + 3vw, 4.4rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.6rem);
  --fs-h3: clamp(1.45rem, 1.2rem + 0.8vw, 1.9rem);
  --fs-lead: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.72rem;

  /* Espacio y forma */
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --section: clamp(5rem, 3rem + 8vw, 10rem);
  --maxw: 1280px;
  --radius: 2px;
  --header-h: 84px;

  /* Movimiento */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.6s;
}

/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-variant-numeric: lining-nums;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-variant-numeric: lining-nums;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ivory);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { text-wrap: pretty; }
em { font-style: italic; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--ivory); color: var(--ink); padding: 0.75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--sans); font-size: var(--fs-micro); font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 1.6rem;
}
.eyebrow::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.eyebrow--plain::before { display: none; }

.lead { font-size: var(--fs-lead); line-height: 1.75; color: var(--text); max-width: 46ch; }
.muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.gold { color: var(--gold); }
.serif-italic { font-family: var(--serif); font-style: italic; }

/* -------------------------------------------------------------------------- */
/* Botones                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ivory); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.85rem;
  min-height: 52px; padding: 0.95rem 1.8rem;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd); border-radius: var(--radius);
  font-family: var(--sans); font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { --btn-bg: var(--ivory); --btn-fg: var(--ink); --btn-bd: var(--ivory); }
.btn--primary:hover { --btn-bg: var(--gold); --btn-bd: var(--gold); }
.btn--outline { --btn-fg: var(--gold); --btn-bd: var(--gold-line); }
.btn--outline:hover { --btn-bg: var(--gold); --btn-fg: var(--ink); --btn-bd: var(--gold); }
.btn--ghost { --btn-bd: transparent; padding-inline: 0; min-height: 44px; }
.btn--ghost:hover { --btn-fg: var(--gold); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0.6rem 1.1rem; }

.link-arrow {
  display: inline-flex; gap: 0.6rem; align-items: center; color: var(--gold); text-decoration: none;
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.link-arrow:hover { color: var(--ivory); }

/* -------------------------------------------------------------------------- */
/* Cabecera                                                                   */
/* -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), height 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid, .site-header--solid {
  background: rgba(11, 11, 11, 0.92); border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--gold); }
.brand__mark { width: 44px; height: auto; }
.brand__name {
  display: flex; flex-direction: column; line-height: 1.15;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ivory);
}
.brand__name small { color: var(--gold); font-size: 0.62rem; letter-spacing: 0.3em; font-weight: 500; }

.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav__list { display: flex; gap: 2rem; list-style: none; padding: 0; }
.nav__link {
  position: relative; text-decoration: none; color: var(--text);
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.5rem 0; transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--ivory); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 48px; height: 48px; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 50%; width: 20px; height: 1px; background: var(--ivory);
  transform: translateX(-50%); transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 999;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2rem;
    padding: 2rem var(--gutter) 3rem; background: var(--ink); border-top: 1px solid var(--line);
    overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
  .nav__link::after { display: none; }
  .nav .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 4rem) 0 clamp(4rem, 8vh, 7rem); overflow: hidden; background: var(--ink);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media video { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__media video.is-playing { opacity: 1; }
.hero__media img, .hero__media video { filter: brightness(0.6) contrast(1.05) saturate(0.9); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,11,0.94) 0%, rgba(11,11,11,0.7) 38%, rgba(11,11,11,0.15) 75%),
    linear-gradient(0deg, rgba(11,11,11,1) 0%, rgba(11,11,11,0) 35%);
}
.hero__content { position: relative; z-index: 1; }
.hero h1 { font-size: var(--fs-display); max-width: 23ch; line-height: 1.02; margin-bottom: 2rem; }
.hero h1 em { color: var(--gold); }
.hero__rule { width: 72px; height: 1px; background: var(--gold); margin-bottom: 2rem; }
.hero .lead { margin-bottom: 2.6rem; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.hero__meta {
  position: absolute; right: var(--gutter); bottom: clamp(4rem, 8vh, 7rem); z-index: 1;
  writing-mode: vertical-rl; font-size: var(--fs-micro); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 900px) { .hero__meta { display: none; } }

/* -------------------------------------------------------------------------- */
/* Secciones                                                                  */
/* -------------------------------------------------------------------------- */
.section { padding-block: var(--section); position: relative; }
.section--carbon { background: var(--carbon); }
.section--bordered { border-top: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.section__head h2 { max-width: 20ch; }
@media (min-width: 900px) {
  .section__head--split { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 4rem; }
}

.split { display: grid; gap: clamp(2.5rem, 6vw, 6rem); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.statement {
  font-family: var(--serif); font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.3rem); line-height: 1.2; color: var(--ivory);
  max-width: 26ch;
}
.statement em { color: var(--gold); }

.prose p + p { margin-top: 1.2rem; }
.prose p { max-width: 62ch; }

.signature { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.2rem; }
.signature strong { color: var(--ivory); font-weight: 500; }
.signature span { font-size: var(--fs-small); color: var(--muted); }

/* Principios */
.principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(2, 1fr); } }
.principle { padding: 2.4rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; }
@media (min-width: 760px) {
  .principle { padding: 2.8rem 2.4rem 2.8rem 0; }
  .principle:nth-child(even) { padding-left: 2.4rem; border-left: 1px solid var(--line); }
}
.principle__num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.3rem; }
.principle h3 { margin-bottom: 0.7rem; }
.principle p { color: var(--muted); }

/* Ciclo / proceso */
.cycle { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); counter-reset: step; }
@media (min-width: 700px) { .cycle { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cycle { grid-template-columns: repeat(3, 1fr); } }
.cycle__step { background: var(--carbon); padding: 2.4rem 2rem 2.6rem; position: relative; transition: background-color 0.5s var(--ease); }
.cycle__step:hover { background: var(--graphite); }
.cycle__step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: var(--fs-micro); letter-spacing: 0.24em; color: var(--gold); margin-bottom: 2.4rem; font-weight: 600;
}
.cycle__step h3 { margin-bottom: 0.8rem; }
.cycle__step p { color: var(--muted); font-size: 0.95rem; }
.cycle-note { margin-top: 2rem; color: var(--muted); font-size: var(--fs-small); max-width: 70ch; }

/* Cards de enfoque (públicas, estáticas) */
.focus-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .focus-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; } }
.focus-card { position: relative; overflow: hidden; background: var(--carbon); border: 1px solid var(--line); isolation: isolate; }
.focus-card__media { aspect-ratio: 4 / 5; overflow: hidden; }
.focus-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.25) brightness(0.72); transform: scale(1.02); transition: transform 1.2s var(--ease), filter 1.2s var(--ease); }
.focus-card:hover .focus-card__media img { transform: scale(1.07); filter: grayscale(0) brightness(0.8); }
.focus-card__body {
  position: absolute; inset: auto 0 0 0; padding: 2rem 1.75rem 1.9rem;
  background: linear-gradient(0deg, rgba(11,11,11,0.96) 0%, rgba(11,11,11,0.75) 60%, rgba(11,11,11,0) 100%);
}
.focus-card__tag { font-size: var(--fs-micro); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.focus-card h3 { margin: 0.8rem 0 0.7rem; font-size: clamp(1.6rem, 1.3rem + 0.8vw, 2.05rem); }
.focus-card p { color: var(--text); font-size: 0.93rem; line-height: 1.6; }
.focus-card__line { position: absolute; left: 1.75rem; right: 1.75rem; top: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.8s var(--ease); }
.focus-card:hover .focus-card__line { transform: scaleX(1); }
.focus-note { margin-top: 1.6rem; font-size: var(--fs-small); color: var(--muted); }

/* Capacidades */
.capabilities { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.capability { display: grid; gap: 0.4rem 3rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .capability { grid-template-columns: 0.9fr 1.1fr; align-items: baseline; } }
.capability h3 { font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem); }
.capability p { color: var(--muted); }

/* Proceso de acceso */
.access-steps { display: grid; gap: 2.4rem; list-style: none; padding: 0; counter-reset: acc; }
@media (min-width: 900px) { .access-steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.access-steps li { border-top: 1px solid var(--gold-line); padding-top: 1.6rem; }
.access-steps li::before { counter-increment: acc; content: "Paso " counter(acc); display: block; font-size: var(--fs-micro); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1rem; }
.access-steps h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.access-steps p { color: var(--muted); font-size: 0.95rem; }

/* Banda CTA */
.cta-band { position: relative; overflow: hidden; padding-block: var(--section); text-align: left; }
.cta-band__media { position: absolute; inset: 0; z-index: 0; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.35) grayscale(0.4); }
.cta-band__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,11,0.95) 20%, rgba(11,11,11,0.6)); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { max-width: 18ch; margin-bottom: 1.6rem; }
.cta-band .lead { margin-bottom: 2.4rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }

/* -------------------------------------------------------------------------- */
/* Formularios                                                                */
/* -------------------------------------------------------------------------- */
.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; gap: 1.4rem; }
@media (min-width: 700px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.5rem; }
.field label, .field .label { font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); }
.field .req { color: var(--gold); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.85rem 1rem;
  background: var(--carbon); color: var(--ivory); border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(242,237,228,0.35); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: var(--graphite); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: var(--fs-small); }
.field__help { color: var(--muted); font-size: var(--fs-small); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 0.9rem; align-items: start; font-size: 0.92rem; color: var(--text); }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold); }
.check a { color: var(--gold); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 1rem 1.2rem; border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); background: var(--carbon); font-size: 0.95rem; }
.alert--error { border-left-color: var(--danger); color: var(--ivory); }
.alert--success { border-left-color: var(--success); color: var(--ivory); }
.alert + .alert { margin-top: 0.75rem; }
.messages { display: grid; gap: 0.75rem; margin-bottom: 2rem; }

/* Página de solicitud */
.page-hero { padding: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; margin-bottom: 1.4rem; }
.request-layout { display: grid; gap: clamp(3rem, 6vw, 6rem); }
@media (min-width: 1000px) { .request-layout { grid-template-columns: 0.8fr 1.2fr; } }
@media (max-width: 999px) { .request-layout > aside { order: 2; } }
.aside-card { border: 1px solid var(--line); padding: 2rem; background: var(--carbon); }
.aside-card h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.aside-card ol { padding-left: 1.2rem; display: grid; gap: 0.8rem; color: var(--muted); }
.aside-card ol li::marker { color: var(--gold); }
.aside-card + .aside-card { margin-top: 1.5rem; }
.fine-print { font-size: var(--fs-small); color: var(--muted); line-height: 1.6; }

/* Textos legales */
.legal { max-width: 78ch; }
.legal h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin: 3rem 0 1rem; }
.legal h3 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.legal p, .legal li { color: var(--text); }
.legal p + p { margin-top: 1rem; }
.legal ul { padding-left: 1.2rem; display: grid; gap: 0.5rem; margin: 1rem 0; }
.legal a { color: var(--gold); }
.legal table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.92rem; }
.legal th, .legal td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ivory); font-weight: 600; }
.legal-review { border: 1px dashed var(--gold-line); padding: 1rem 1.2rem; color: var(--muted); font-size: var(--fs-small); margin-bottom: 2rem; }
.table-scroll { overflow-x: auto; }

/* -------------------------------------------------------------------------- */
/* Pie de página                                                              */
/* -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(4rem, 8vw, 6rem) 0 2.5rem; background: var(--ink); }
.footer-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-tagline { margin-top: 1.5rem; max-width: 40ch; }
.footer-title { font-size: var(--fs-micro); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1.2rem; }
.footer-links { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer-links a, .footer-links button { color: var(--text); text-decoration: none; font-size: 0.93rem; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.footer-links a:hover, .footer-links button:hover { color: var(--gold); }
.footer-disclaimer { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; font-size: 0.8rem; color: var(--muted); line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* -------------------------------------------------------------------------- */
/* Banner de cookies                                                          */
/* -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1500; max-width: 560px;
  background: var(--graphite); border: 1px solid var(--line-strong); padding: 1.5rem; display: grid; gap: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 0.88rem; color: var(--text); }
.cookie-banner a { color: var(--gold); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cookie-banner .btn { min-height: 44px; padding: 0.7rem 1.1rem; }

/* -------------------------------------------------------------------------- */
/* Páginas de estado (login, errores, confirmaciones)                         */
/* -------------------------------------------------------------------------- */
.auth-page { min-height: 100svh; display: grid; }
@media (min-width: 1000px) { .auth-page { grid-template-columns: 1fr 1fr; } }
.auth-page__visual { position: relative; display: none; overflow: hidden; }
@media (min-width: 1000px) { .auth-page__visual { display: block; } }
.auth-page__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45) grayscale(0.35); }
.auth-page__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,11,11,0.9), rgba(11,11,11,0.2)); }
.auth-page__quote { position: absolute; left: clamp(2rem, 5vw, 4rem); right: clamp(2rem, 5vw, 4rem); bottom: clamp(2rem, 5vw, 4rem); z-index: 1; }
.auth-page__quote p { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem); line-height: 1.25; color: var(--ivory); max-width: 22ch; }
.auth-page__panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 5rem) var(--gutter); }
.auth-card { width: 100%; max-width: 420px; margin-inline: auto; }
.auth-card .brand { margin-bottom: 3rem; }
.auth-card h1 { font-size: clamp(2.2rem, 1.8rem + 1.5vw, 3rem); margin-bottom: 0.8rem; }
.auth-card > p { color: var(--muted); margin-bottom: 2.2rem; }
.auth-links { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--fs-small); }
.auth-links a { color: var(--gold); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.status-page { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 2rem) 0 4rem; }
.status-page__code { font-family: var(--serif); font-style: italic; font-size: clamp(5rem, 4rem + 8vw, 11rem); line-height: 1; color: var(--gold); opacity: 0.85; margin-bottom: 1.5rem; }
.status-page h1 { margin-bottom: 1.2rem; max-width: 18ch; }
.status-page p { max-width: 52ch; margin-bottom: 2.4rem; }
.status-page__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }

/* -------------------------------------------------------------------------- */
/* Animación de aparición (solo si JS está activo y sin movimiento reducido)  */
/* -------------------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 0.12s; }
.js [data-reveal-delay="2"] { transition-delay: 0.24s; }
.js [data-reveal-delay="3"] { transition-delay: 0.36s; }

.hero__content > * { animation: rise 1.1s var(--ease) both; }
.hero__content > *:nth-child(2) { animation-delay: 0.12s; }
.hero__content > *:nth-child(3) { animation-delay: 0.22s; }
.hero__content > *:nth-child(4) { animation-delay: 0.32s; }
.hero__content > *:nth-child(5) { animation-delay: 0.42s; }
/* Solo desplazamiento: el texto del hero es visible desde el primer pintado (mejor LCP). */
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   PLATAFORMA PRIVADA
   ========================================================================== */
.portal { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100svh; background: var(--ink); }
@media (min-width: 1000px) { .portal { grid-template-columns: 280px minmax(0, 1fr); } }

.portal-side {
  position: sticky; top: 0; z-index: 50; background: var(--carbon); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column;
}
@media (min-width: 1000px) {
  .portal-side { height: 100svh; border-bottom: 0; border-right: 1px solid var(--line); padding: 2rem 1.5rem; }
}
.portal-side__top { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem var(--gutter); }
@media (min-width: 1000px) { .portal-side__top { padding: 0 0.5rem 2.5rem; } }
.portal-side .brand__mark { width: 38px; }
.portal-badge { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-line); padding: 0.3rem 0.55rem; }

.portal-nav { list-style: none; padding: 0 var(--gutter) 0.75rem; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.portal-nav::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) { .portal-nav { flex-direction: column; padding: 0; gap: 0.15rem; overflow: visible; } }
.portal-nav a {
  display: flex; align-items: center; gap: 0.75rem; white-space: nowrap;
  padding: 0.7rem 0.9rem; text-decoration: none; color: var(--text); font-size: 0.88rem; border-radius: var(--radius);
  border: 1px solid transparent; transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.portal-nav a:hover { background: var(--graphite); color: var(--ivory); }
.portal-nav a[aria-current="page"] { background: var(--graphite); color: var(--ivory); border-color: var(--line); }
.portal-nav a[aria-current="page"]::before { content: ""; width: 2px; height: 16px; background: var(--gold); margin-left: -0.45rem; }
.portal-nav .count { margin-left: auto; font-size: 0.7rem; min-width: 20px; height: 20px; display: inline-grid; place-items: center; background: var(--gold); color: var(--ink); border-radius: 10px; padding: 0 6px; font-weight: 600; }

.portal-side__foot { display: none; }
@media (min-width: 1000px) {
  .portal-side__foot { display: grid; gap: 0.75rem; margin-top: auto; padding: 1.5rem 0.5rem 0; border-top: 1px solid var(--line); }
}
.portal-user { font-size: 0.85rem; color: var(--muted); }
.portal-user strong { display: block; color: var(--ivory); font-weight: 500; }
.logout-form button {
  background: none; border: 1px solid var(--line-strong); color: var(--text); padding: 0.6rem 0.9rem; cursor: pointer;
  font-size: var(--fs-micro); letter-spacing: 0.16em; text-transform: uppercase; border-radius: var(--radius); width: 100%;
}
.logout-form button:hover { border-color: var(--gold); color: var(--gold); }
.portal-mobile-logout { padding: 0 var(--gutter) 0.9rem; }
@media (min-width: 1000px) { .portal-mobile-logout { display: none; } }

.portal-main { padding: clamp(2rem, 5vw, 4rem) var(--gutter) 5rem; min-width: 0; }
.portal-main__inner { max-width: 1120px; }
.portal-head { margin-bottom: clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
.portal-head h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.2rem); }
.portal-head p { color: var(--muted); margin-top: 0.6rem; max-width: 60ch; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 3rem; }
.stat { background: var(--carbon); padding: 1.6rem 1.5rem; text-decoration: none; transition: background-color 0.3s var(--ease); }
a.stat:hover { background: var(--graphite); }
.stat__label { font-size: var(--fs-micro); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat__value { font-variant-numeric: lining-nums; font-family: var(--serif); font-size: 2.6rem; color: var(--ivory); line-height: 1.1; margin-top: 0.6rem; }

.panel { border: 1px solid var(--line); background: var(--carbon); }
.panel + .panel, .panel-grid + .panel { margin-top: 1.5rem; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-size: 1.45rem; }
.panel__body { padding: 1.5rem; }
.panel-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1000px) { .panel-grid { grid-template-columns: 1fr 1fr; } }

.list { list-style: none; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list__title { color: var(--ivory); text-decoration: none; display: block; }
a.list__title:hover { color: var(--gold); }
.list__meta { font-size: var(--fs-small); color: var(--muted); }
.empty { padding: 2rem 1.5rem; color: var(--muted); font-size: 0.95rem; }

.pill { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; padding: 0.35rem 0.65rem; border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--gold { color: var(--gold); border-color: var(--gold-line); }
.pill--green { color: var(--success); border-color: rgba(169,199,160,0.35); }
.pill--muted { color: var(--muted); }

.opps { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .opps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .opps--3 { grid-template-columns: repeat(3, 1fr); } }
.opp { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--carbon); text-decoration: none; transition: border-color 0.4s var(--ease), transform 0.4s var(--ease); }
.opp:hover { border-color: var(--gold-line); transform: translateY(-4px); }
.opp__media { aspect-ratio: 16 / 10; background: var(--graphite); overflow: hidden; position: relative; }
.opp__media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8); }
.opp__media .pill { position: absolute; left: 1rem; top: 1rem; background: rgba(11,11,11,0.8); }
.opp__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--gold); opacity: 0.4; }
.opp__placeholder svg { width: 72px; }
.opp__body { padding: 1.5rem; display: grid; gap: 0.6rem; flex: 1; }
.opp__body h3 { font-size: 1.6rem; }
.opp__meta { font-size: var(--fs-small); color: var(--muted); }
.opp__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; padding-top: 1rem; margin-top: auto; border-top: 1px solid var(--line); font-size: var(--fs-small); }
.opp__facts dt { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.opp__facts dd { margin: 0; color: var(--ivory); }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filters a { text-decoration: none; font-size: 0.8rem; padding: 0.5rem 0.9rem; border: 1px solid var(--line-strong); color: var(--text); }
.filters a[aria-current="true"], .filters a:hover { border-color: var(--gold); color: var(--gold); }

.detail-hero { position: relative; aspect-ratio: 21 / 9; min-height: 260px; background: var(--graphite); overflow: hidden; margin-bottom: 2.5rem; border: 1px solid var(--line); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7); }
.detail-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1100px) { .detail-layout { grid-template-columns: 1.4fr 0.8fr; align-items: start; } }
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact { background: var(--carbon); padding: 1.2rem 1.4rem; }
.fact dt { font-size: var(--fs-micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact dd { margin: 0.35rem 0 0; font-family: var(--serif); font-size: 1.6rem; color: var(--ivory); }
.fact--projection dd::after { content: " *"; color: var(--gold); }
.risk-note { border: 1px solid var(--gold-line); background: rgba(201,169,97,0.05); padding: 1.2rem 1.4rem; font-size: 0.88rem; color: var(--text); line-height: 1.6; }
.risk-note strong { color: var(--gold); font-weight: 600; }
.detail-section + .detail-section { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.detail-section p { white-space: pre-line; }
.sticky-col { display: grid; gap: 1.5rem; }
@media (min-width: 1100px) { .sticky-col { position: sticky; top: 2rem; } }

.thread { display: grid; gap: 1rem; }
.msg { border: 1px solid var(--line); background: var(--carbon); padding: 1.3rem 1.5rem; }
.msg--mine { border-left: 2px solid var(--line-strong); background: var(--ink); }
.msg--firm { border-left: 2px solid var(--gold); }
.msg--unread { box-shadow: inset 0 0 0 1px var(--gold-line); }
.msg__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.msg__head strong { color: var(--ivory); font-weight: 500; }
.msg p { white-space: pre-line; font-size: 0.95rem; }

.breadcrumb { font-size: var(--fs-small); color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gold); text-decoration: none; }
