/* ============================================================
   ExamiNáutica — Sistema de diseño
   Náutico fresco y técnico: azul marino + cian + verde agua
   ============================================================ */


:root {
  /* ---- Azul marino (base) ---- */
  --navy-950: #061626;
  --navy-900: #0a2236;
  --navy-850: #0d2c47;
  --navy-800: #103a5c;
  --navy-700: #16496f;
  --navy-600: #1d5a85;

  /* ---- Cian (acento principal) ---- */
  --cyan-700: #117390;
  --cyan-600: #0c7396;
  --cyan-500: #20a7d4;
  --cyan-400: #4cbde0;
  --cyan-300: #8fd7ec;
  --cyan-100: #d7f0f8;
  --cyan-50:  #eaf7fb;

  /* ---- Verde agua (progreso / acierto) ---- */
  --sea-700: #0c7d68;
  --sea-600: #0f9a80;
  --sea-500: #16b397;
  --sea-100: #d3f3ec;
  --sea-50:  #e8faf5;

  /* ---- Estados ---- */
  --amber-600: #d98429;
  --amber-500: #ef9d3f;
  --amber-100: #fbeccf;
  --coral-600: #d94e43;
  --coral-500: #e85f54;
  --coral-100: #fbe0dd;

  /* ---- Neutros (fríos) ---- */
  --ink:       #0e2438;
  --ink-soft:  #3a4f64;
  --muted:     #5e7287;
  --muted-2:   #647890;
  --line:      #e1e9f0;
  --line-soft: #eef3f7;
  --bg:        #f3f7fa;
  --bg-2:      #eaf1f6;
  --surface:   #ffffff;
  --surface-2: #f8fbfd;

  /* ---- Tipografía ---- */
  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- Radio / sombra ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(10,34,54,.06), 0 1px 3px rgba(10,34,54,.05);
  --sh-md: 0 4px 16px rgba(10,34,54,.08), 0 1px 3px rgba(10,34,54,.05);
  --sh-lg: 0 18px 48px rgba(10,34,54,.14), 0 4px 12px rgba(10,34,54,.06);
  --sh-cyan: 0 10px 30px rgba(21,146,187,.30);

  /* ---- Layout ---- */
  --maxw: 1200px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
::selection { background: var(--cyan-300); color: var(--navy-900); }

/* ---- Utilidades ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-tight { max-width: 940px; }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan-600);
}
.eyebrow.on-dark { color: var(--cyan-300); }
.muted { color: var(--muted); }
.center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.wrap-flex { flex-wrap: wrap; }
.hide { display: none !important; }

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cyan-600); color: #fff; box-shadow: var(--sh-cyan); }
.btn-primary:hover { background: var(--cyan-700); box-shadow: 0 12px 34px rgba(21,146,187,.38); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-sea { background: var(--sea-600); color: #fff; box-shadow: 0 10px 30px rgba(15,154,128,.28); }
.btn-sea:hover { background: var(--sea-700); }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cyan-400); color: var(--cyan-700); background: var(--cyan-50); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.55); }
.btn-soft { background: var(--cyan-50); color: var(--cyan-700); }
.btn-soft:hover { background: var(--cyan-100); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .18s;
}
.btn-icon:hover { border-color: var(--cyan-400); color: var(--cyan-600); }

/* ============================================================
   Badges / chips / pills
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; padding: 4px 11px;
  border-radius: var(--r-pill); line-height: 1.3;
}
.badge svg { width: 13px; height: 13px; }
.badge-cyan { background: var(--cyan-50); color: var(--cyan-700); }
.badge-sea  { background: var(--sea-50); color: var(--sea-700); }
.badge-amber{ background: var(--amber-100); color: var(--amber-600); }
.badge-coral{ background: var(--coral-100); color: var(--coral-600); }
.badge-navy { background: var(--bg-2); color: var(--navy-700); }
.badge-dot::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; padding: 8px 14px;
  border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-soft);
  cursor: pointer; transition: all .16s; user-select: none;
}
.chip:hover { border-color: var(--cyan-400); color: var(--cyan-700); }
.chip.active { background: var(--navy-800); color:#fff; border-color: var(--navy-800); }
.chip svg { width: 15px; height: 15px; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card-pad { padding: 22px; }
.card-hover { transition: transform .18s ease, box-shadow .2s ease, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--cyan-300); }

/* ============================================================
   Progreso
   ============================================================ */
.progress { height: 8px; background: var(--bg-2); border-radius: var(--r-pill); overflow: hidden; }
.progress > span { display:block; height:100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--cyan-500), var(--sea-500)); }
.progress.thin { height: 6px; }
.progress.sea > span { background: var(--sea-500); }
.progress.amber > span { background: var(--amber-500); }

/* anillo de progreso */
.ring { --p: 0; --sz: 92px; --bw: 9px; --inner: var(--surface);
  width: var(--sz); height: var(--sz); border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--cyan-500) calc(var(--p)*1%), var(--bg-2) 0);
}
.ring::before { content:""; position:absolute; inset: var(--bw);
  border-radius:50%; background: var(--inner); }
.ring > * { position: relative; z-index:1; }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.input {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 13px 15px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .16s, box-shadow .16s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { outline: none; border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(32,167,212,.14); }

/* ============================================================
   Segmented control (Completo / Resumen / Súper / PDF)
   ============================================================ */
.segmented {
  display: inline-flex; background: var(--bg-2); padding: 4px;
  border-radius: var(--r-pill); gap: 2px;
}
.segmented button {
  border: none; background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-weight: 700; font-size: 13.5px;
  padding: 8px 16px; border-radius: var(--r-pill); transition: all .16s;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.segmented button svg { width: 15px; height: 15px; }
.segmented button.active { background: var(--surface); color: var(--navy-800); box-shadow: var(--sh-sm); }
.segmented button:not(.active):hover { color: var(--cyan-700); }

/* ============================================================
   Imagen placeholder (cartas / esquemas)
   ============================================================ */
.ph {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background:
    repeating-linear-gradient(45deg, var(--bg-2) 0 11px, var(--surface-2) 11px 22px);
  border: 1px dashed var(--line);
  display: grid; place-items: center; color: var(--muted);
}
.ph span { font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  background: var(--surface); padding: 5px 11px; border-radius: var(--r-pill);
  border: 1px solid var(--line); }

/* ============================================================
   Secciones públicas
   ============================================================ */
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 14px 0 0; }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 18px; }
.dark-bg { background: var(--navy-900); color: #fff; }
.dark-bg .section-head h2 { color: #fff; }
.dark-bg .section-head p { color: rgba(255,255,255,.72); }

/* grid helper */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2,1fr); }
.g-3 { grid-template-columns: repeat(3,1fr); }
.g-4 { grid-template-columns: repeat(4,1fr); }

@media (max-width: 980px){
  .g-4 { grid-template-columns: repeat(2,1fr); }
  .g-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px){
  .g-2,.g-3,.g-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .wrap { padding: 0 18px; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; background: none; border: none; text-align: left;
  padding: 22px 4px; font-size: 17px; font-weight: 700; color: var(--ink); }
.faq-q .ico { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--cyan-50); color: var(--cyan-600);
  transition: transform .2s; }
.faq-item.open .faq-q .ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 4px 22px; color: var(--ink-soft); font-size: 15.5px; }

/* ============================================================
   Breadcrumbs
   ============================================================ */
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--cyan-700); }
.crumbs .sep { color: var(--muted-2); }

/* ============================================================
   Tablas
   ============================================================ */
.stat-num { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* animaciones de entrada */
@keyframes floatUp { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform:none; } }
.reveal { animation: floatUp .6s both; }

/* ============================================================
   Accesibilidad (WCAG AA)
   ============================================================ */
/* Foco visible consistente para teclado */
:where(a, button, input, select, textarea, [tabindex], .chip, .tile, .opt, .mcard, .pdf-card,
  .type-card, .mod-check, .faq-q, .segmented button):focus-visible {
  outline: 3px solid var(--cyan-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
/* No quitamos el foco a quien navega con teclado; sólo evitamos el ring en click de ratón */
:focus:not(:focus-visible) { outline: none; }

/* Texto sólo para lectores de pantalla */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sr-only-focusable:focus, .sr-only-focusable:focus-visible {
  position: fixed; top: 12px; left: 12px; z-index: 9999;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 18px; background: var(--navy-900); color: #fff;
  border-radius: var(--r-pill); font-weight: 700; box-shadow: var(--sh-lg);
}

/* Indicador de estado no basado solo en color (icono + texto) */
.state-ico { display: inline-flex; vertical-align: -2px; margin-right: 4px; }

/* Respeta la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}
