/* CubTrámites · hoja de estilos compartida por todas las páginas */

:root {
  --bg: #F3F6F4;
  --ink: #10272E;
  --muted: #4B6168;
  --teal: #0E6A66;
  --teal-dark: #0A4A48;
  --amber: #F2B632;
  --amber-dark: #E4A31B;
  --amber-soft: #FDF4DC;
  --line: #D3DEDA;
  --card: #FFFFFF;
  --gutter: clamp(16px, 5vw, 64px);
  --display: 'Bricolage Grotesque', 'Source Sans 3', system-ui, sans-serif;
  --body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

img, svg { max-width: 100%; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, p { margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.03; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.25; }

.muted { color: var(--muted); }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Cabecera y menú ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 20px var(--gutter) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 16px;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 0 4px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Menú plegable: solo si hay JavaScript y la pantalla es estrecha */
@media (max-width: 640px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 16px;
  }
  .js .nav.open { display: flex; }
  .js .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .js .nav a:last-child { border-bottom: 0; }
  .js .nav a[aria-current="page"] { color: var(--teal); }
}

/* ---------- Estructura general ---------- */

main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px var(--gutter) 88px;
}

.stack-xl { display: flex; flex-direction: column; gap: 88px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.stack-md { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }

.lead { font-size: 20px; color: var(--muted); max-width: 36em; }

.site-footer {
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 26px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); color: var(--ink); }

.btn-outline {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 46px;
  padding: 10px 18px;
  font-size: 16px;
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }

.btn-small {
  min-height: 36px;
  padding: 4px 12px;
  font-size: 14px;
  border-radius: 8px;
  gap: 6px;
}

/* ---------- Aviso (cita consular) ---------- */

.notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
  border-left-width: 6px;
  border-radius: 12px;
  max-width: 44em;
}
.notice-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notice-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notice-title { font-weight: 700; }
.notice-body p { font-size: 17px; }
.notice-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 16px; font-weight: 600; }

/* ---------- Inicio ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

.hero-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo .brand-mark { width: 64px; height: 64px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.01em;
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.send-explain { font-size: 17px; color: var(--muted); max-width: 34em; }

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.contact-card .value {
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.contact-actions a, .contact-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.contact-actions a:hover, .contact-actions button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.hero-art {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 520px;
  position: relative;
  height: 430px;
}

.art-back {
  position: absolute;
  left: 24%;
  top: 0;
  width: 66%;
  height: 340px;
  background: #DDE8E4;
  border-radius: 6px;
  transform: rotate(5deg);
}

.art-doc {
  position: absolute;
  left: 4%;
  top: 28px;
  width: 70%;
  height: 350px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 22px 44px -24px rgba(16, 39, 46, 0.4);
  transform: rotate(-3deg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.art-line { height: 8px; background: #E3EAE7; border-radius: 4px; }

.art-stamp {
  position: absolute;
  right: 2%;
  bottom: 36px;
  width: 172px;
  height: 172px;
  border: 4px solid var(--teal);
  border-radius: 50%;
  background: rgba(243, 246, 244, 0.82);
  color: var(--teal);
  transform: rotate(-14deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.art-stamp strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.art-stamp span { font-size: 13px; font-weight: 700; letter-spacing: 0.2em; }

/* ---------- Proceso ---------- */

.process-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
}
.process-intro > .intro-text {
  flex: 1 1 280px;
  min-width: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps {
  flex: 2 1 480px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.steps li {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.step-num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.steps p { color: var(--muted); }

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.card p { color: var(--muted); }

.card-featured { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
.card-featured .eyebrow { color: #CFE6E3; }
.card-featured p { color: #E3F1EF; }

/* ---------- Calculadora ---------- */

.calc {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  padding: 32px clamp(20px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.calc-controls {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

.calc legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }

.choice { position: relative; }

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 48px;
  padding: 8px 18px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.choice input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

.choice input:focus-visible + span {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.mod-help { font-size: 16px; color: var(--muted); min-height: 3em; }

.calc-result {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  background: var(--bg);
  border-radius: 12px;
}

.calc-total {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.calc-total small { font-size: 0.32em; letter-spacing: 0; color: var(--muted); font-weight: 700; }

.calc-note { font-size: 15px; color: var(--muted); }

.calc-result .btn { align-self: flex-start; }

/* ---------- Tabla ---------- */

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th {
  padding: 18px 24px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

td { padding: 16px 24px; border-top: 1px solid var(--line); font-size: 20px; font-weight: 700; }
td:first-child { color: var(--muted); font-weight: 400; }

/* ---------- Listas de etiquetas ---------- */

.pills {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pills li {
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
}

.pills-solid li { background: var(--teal); border-color: var(--teal); color: #FFFFFF; font-weight: 600; }
.pills-dashed li { background: transparent; border: 1px dashed var(--muted); color: var(--muted); font-weight: 600; padding: 6px 14px; }

/* ---------- Confianza ---------- */

.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
}

.reason {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 20px;
  border-top: 3px solid var(--teal);
}
.reason p { color: var(--muted); }

.panel {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding: 40px clamp(20px, 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel > div { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding: 40px clamp(20px, 4vw, 48px);
  background: var(--teal);
  color: #FFFFFF;
  border-radius: 14px;
}
.banner > div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.banner p { color: #E3F1EF; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .choice span, .contact-actions a, .contact-actions button {
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  }
}
