/* AJMP Capital · hoja de estilos */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); }

:root {
  --ink: #0E1B17;
  --forest: #12392F;
  --muted: #4A5753;
  --panel: #F2F6F4;
  --line: #E3EAE7;
  --field: #C9D6D0;
  --accent: #A8823B;
  --accent-light: #D9B26A;
  --on-dark: #D5E2DD;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
img, svg { display: block; max-width: 100%; }
a { color: var(--forest); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input, select, textarea, button { font: inherit; }
h1, h2, h3 { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.serif { font-family: var(--serif); font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 8px; color: #fff; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 600; font-size: 24px; letter-spacing: .5px; }
.brand-sub { font-size: 11px; letter-spacing: 5px; color: var(--muted); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; }
.btn { display: inline-block; text-decoration: none; border-radius: 999px; font-weight: 500; padding: 15px 28px; border: 1px solid var(--forest); cursor: pointer; transition: background .2s, color .2s; }
.btn-solid { background: var(--forest); color: #fff; }
.btn-solid:hover { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--forest); }
.btn-line:hover { background: var(--forest); color: #fff; }
.nav .btn { padding: 11px 22px; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--field); border-radius: 8px; width: 46px; height: 46px; cursor: pointer; color: var(--forest); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ''; transition: transform .2s; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .js .nav-toggle { display: block; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--pad) 24px; box-shadow: 0 12px 24px rgba(14,27,23,.06); }
  .js .nav.open { display: flex; }
  .js .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .js .nav .btn { margin-top: 16px; text-align: center; border-bottom: 0; padding: 14px; }
  .nav { flex-wrap: wrap; gap: 8px 20px; }
  .header-in { position: relative; }
}

/* Portada */
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero-text { flex: 999 1 520px; min-width: 0; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 84px); line-height: 1.02; margin-bottom: 28px; letter-spacing: -.5px; }
.hero h1 em { color: var(--forest); }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--muted); max-width: 560px; margin: 0 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { flex: 1 1 380px; min-width: 0; max-width: 520px; margin: 0 auto; }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-in { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; font-size: 15px; color: var(--muted); }

.section { padding-top: clamp(72px, 10vw, 112px); padding-bottom: clamp(72px, 10vw, 112px); }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1.05; margin-bottom: 28px; letter-spacing: -.3px; }

/* Sobre mí */
.about { display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 64px); align-items: flex-start; }
.photo { flex: 1 1 320px; min-width: 0; max-width: 440px; aspect-ratio: 4 / 5; background: #E8EFEC; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 15px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text { flex: 999 1 460px; min-width: 0; }
.about-text p { font-size: 18px; line-height: 1.7; color: var(--muted); margin: 0 0 20px; }
.about-text strong { color: var(--ink); font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.timeline li { display: flex; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline .year { font-family: var(--serif); font-size: 26px; min-width: 80px; color: var(--forest); line-height: 1.1; }
.timeline .what { font-size: 16px; line-height: 1.5; padding-top: 3px; }

/* Bloque verde */
.dark { background: var(--forest); color: #fff; }
.dark a { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; margin-top: 56px; }
.card { border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: clamp(28px, 4vw, 40px); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin-bottom: 16px; }
.card p { font-size: 17px; line-height: 1.65; color: var(--on-dark); margin: 0 0 28px; }
.card a { font-weight: 500; }

/* Cómo trabajo */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px; margin-top: 20px; }
.pillars h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.pillars p { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0; }

/* Contacto */
.contact-bg { background: var(--panel); }
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-intro { flex: 1 1 320px; min-width: 0; }
.contact-intro p { font-size: 18px; line-height: 1.6; color: var(--muted); margin: 0 0 16px; }
.form { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.field.full, .form .full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { padding: 14px; border: 1px solid var(--field); border-radius: 4px; font-size: 16px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest); outline: 2px solid rgba(18,57,47,.15); outline-offset: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--forest); flex: none; }
.form .btn { justify-self: start; font-size: 16px; padding: 16px 32px; }
.form .btn[disabled] { opacity: .6; cursor: wait; }
.form-note { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; padding: 14px 16px; border-radius: 6px; font-size: 15px; }
.status:empty { display: none; }
.status.ok { background: #E3F1EA; color: #0F4A33; }
.status.err { background: #FBECEA; color: #8A2A1E; }

/* Pie */
.site-footer { background: var(--forest); color: var(--on-dark); }
.footer-in { display: flex; flex-direction: column; gap: 32px; padding-top: 64px; padding-bottom: 40px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer .brand { color: #fff; }
.site-footer .brand-sub { color: var(--on-dark); }
.social, .legal-links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 15px; }
.social span { color: #fff; opacity: .55; cursor: default; }
.legal-links { font-size: 14px; }
.legal-links a { color: var(--on-dark); }
.legal-links a:hover { color: #fff; }
.disclaimer { font-size: 13px; line-height: 1.6; margin: 0; max-width: 900px; }
.copy { font-size: 13px; margin: 0; }

/* Páginas legales */
.legal { max-width: 820px; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(64px, 8vw, 96px); }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 60px); line-height: 1.05; margin-bottom: 12px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 40px; }
.legal h2 { font-size: 21px; font-weight: 600; margin: 40px 0 12px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.75; color: #2B3733; }
.legal ul { padding-left: 22px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.fill { background: #FFF1C9; color: #6B4E00; padding: 1px 6px; border-radius: 3px; font-weight: 600; }
.note-box { background: var(--panel); border-left: 3px solid var(--forest); padding: 18px 22px; border-radius: 4px; margin: 24px 0; }
.note-box p { margin: 0; }

/* Página simple (acceso, 404) */
.simple { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 64px; padding-bottom: 96px; max-width: 720px; }
.simple p { font-size: 18px; line-height: 1.65; color: var(--muted); margin: 0 0 32px; }

@media (max-width: 560px) {
  .timeline li { gap: 16px; }
  .timeline .year { min-width: 58px; font-size: 22px; }
  .btn { padding: 14px 24px; }
  .strip-in { justify-content: flex-start; gap: 8px 22px; font-size: 14px; }
}

/* ---------- Acceso y área privada ---------- */
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; letter-spacing: 1px; background: var(--panel); padding: 10px 14px; border-radius: 4px; display: inline-block; }
.auth { max-width: 480px; padding-top: clamp(40px, 8vw, 88px); padding-bottom: clamp(64px, 10vw, 112px); }
.auth p { color: var(--muted); line-height: 1.6; }
.auth-form, .stack { display: grid; gap: 18px; margin: 24px 0; }
.auth-form .btn, .stack .btn { justify-self: start; }
.auth-links { margin-top: 8px; font-size: 15px; }
.auth-links summary { cursor: pointer; color: var(--forest); }
.narrow { max-width: 320px; }

.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 96px; align-items: start; }
.app-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 24px; }
.app-user { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.app-user span { font-size: 13px; color: var(--muted); }
.app-nav a { text-decoration: none; padding: 10px 12px; border-radius: 6px; color: var(--ink); font-size: 15px; }
.app-nav a:hover { background: var(--panel); }
.app-nav a[aria-current="page"] { background: var(--forest); color: #fff; }
.app-nav form { margin-top: 12px; }
.linklike { background: none; border: 0; padding: 10px 12px; color: var(--muted); cursor: pointer; font-size: 15px; text-decoration: underline; }
.app-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 46px); line-height: 1.1; margin-bottom: 24px; }
.app-main .status { margin-bottom: 20px; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .app-nav { position: static; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; gap: 6px; }
  .app-user { width: 100%; flex-direction: row; gap: 10px; align-items: baseline; padding-bottom: 8px; }
  .app-nav a { padding: 8px 12px; background: var(--panel); font-size: 14px; }
  .app-nav form { margin: 0; }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.tile { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 28px; transition: border-color .2s, box-shadow .2s; }
.tile:hover { border-color: var(--forest); box-shadow: 0 8px 24px rgba(14,27,23,.06); color: var(--ink); }
.tile h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin-bottom: 8px; }
.tile p { color: var(--muted); margin: 0 0 16px; }
.tile-off { opacity: .6; pointer-events: none; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: #E3F1EA; color: #0F4A33; white-space: nowrap; margin: 2px 0; }
.badge-off { background: #F1E4E2; color: #8A2A1E; }
.badge-warn { background: #FFF1C9; color: #6B4E00; }

.panel { border: 1px solid var(--line); border-radius: 8px; padding: clamp(20px, 3vw, 28px); margin-bottom: 24px; }
.panel h2 { font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.panel > p { color: var(--muted); line-height: 1.6; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.role-row { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; align-items: end; }
@media (max-width: 600px) { .role-row { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data th { text-align: left; font-weight: 600; background: var(--panel); padding: 12px 14px; white-space: nowrap; }
.data td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.inline { display: inline; margin: 0; }
.actions .btn, .panel .btn { padding: 11px 20px; font-size: 14.5px; }
.btn-danger { background: #fff; color: #8A2A1E; border-color: #D9A39B; }
.btn-danger:hover { background: #8A2A1E; color: #fff; border-color: #8A2A1E; }

.steps { padding-left: 22px; line-height: 1.7; }
.steps li { margin-bottom: 14px; }
.qr { margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; }
.codes li { background: var(--panel); padding: 10px 12px; border-radius: 4px; text-align: center; }
.log { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.log li { padding: 8px 0; border-top: 1px solid var(--line); }
.log li span { color: var(--muted); margin-right: 8px; }
.nowrap { white-space: nowrap; }
.mail-text { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: 15px; line-height: 1.6; margin: 0; max-height: 60vh; overflow: auto; }
.tabs-inline a[aria-current="page"] { font-weight: 600; text-decoration: none; color: var(--ink); }
.role-row .full { grid-column: 1 / -1; }
.h3 { font-size: 20px; font-weight: 600; margin: 8px 0 14px; }
.grid3 { display: grid; grid-template-columns: 180px minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.docs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.doc { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.doc-off { opacity: .6; }
.doc-actions { display: flex; gap: 10px; }
.doc-actions .btn { padding: 10px 20px; font-size: 14.5px; }
.small { font-size: 13px; font-weight: 400; }
.doc-group { margin-bottom: 36px; }
.checks { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.club-block { border-top: 2px solid var(--forest); padding-top: 20px; margin-top: 12px; }
.club-title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-bottom: 16px; }
.copybox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.copybox input { flex: 1 1 320px; padding: 12px; border: 1px solid var(--field); border-radius: 4px; font-size: 14px; background: var(--panel); }
.sigpad { width: 100%; max-width: 600px; aspect-ratio: 600 / 220; border: 1px dashed var(--forest); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.privacy-box { background: var(--panel); border-radius: 6px; padding: 14px 16px; font-size: 13px; line-height: 1.55; max-height: 320px; overflow: auto; }
.privacy-box summary { cursor: pointer; font-weight: 600; }
.privacy-box p { color: var(--muted); margin: 8px 0; }
.privacy-box .strong { font-weight: 600; color: var(--ink); }
.pick { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: grid; gap: 8px; margin-top: 8px; }
.filter { width: 100%; padding: 10px 12px; border: 1px solid var(--field); border-radius: 4px; margin-top: 10px; font-size: 14px; }
.qrow { display: grid; grid-template-columns: minmax(0, 2fr) 180px minmax(0, 2fr); gap: 12px; align-items: end; }
@media (max-width: 760px) { .qrow { grid-template-columns: 1fr; } }
details > summary { cursor: pointer; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 6px; }
.store-links .btn { padding: 10px 18px; font-size: 14.5px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; margin: 0 0 24px; }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-v { font-family: var(--serif); font-size: 32px; line-height: 1.1; color: var(--forest); }
.kpi-l { font-weight: 600; font-size: 14px; }
.kpi-s { font-size: 12.5px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-bottom: 28px; }
.filters .field { min-width: 160px; }
.stat-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-head h2 { margin: 0; }
.data tr.total td { background: var(--panel); }
