/* ===========================================================
   Textos Legales · DominaInternet — mismo sistema de diseño que la web principal.
   Azul único #004399 · tema claro · navy solo en hero/footer.
   Display (h1/h2): Syncopate (mayúsculas) · Todo lo demás: Manrope.
   =========================================================== */
:root {
  --blue: #004399; --blue-700: #00357a; --blue-600: #0a4ea8;
  --blue-tint: #eef3fb; --blue-tint-2: #dbe6f7;
  --navy-950: #00081a; --navy-900: #02112a; --navy-850: #06203f;
  --paper: #ffffff; --surface-2: #f5f7fb;
  --text: #0d1626; --text-soft: #51607a; --text-faint: #8b97ad; --border: #e6eaf2;
  --on-dark: #ffffff; --on-dark-soft: rgba(255,255,255,.74); --on-dark-line: rgba(255,255,255,.12);
  --accent: var(--blue); --accent-light: #5b9bf6;
  --ok: #16a34a; --warn: #d97706;
  /* compat con nombres usados en el marcado */
  --ink: var(--text); --muted: var(--text-soft); --line: var(--border);
  --card: #ffffff; --bg: var(--surface-2); --cyan: var(--accent-light);
  --font-display: 'Syncopate', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --fs-h1: clamp(2.2rem, 5.2vw, 4rem);
  --fs-h2: clamp(1.7rem, 3.6vw, 2.6rem);
  --maxw: 1200px; --gutter: clamp(1.25rem, 4vw, 3rem); --section-y: clamp(3.5rem, 7vw, 6.5rem);
  --r-sm: 12px; --r: 16px; --r-lg: 24px; --r-pill: 999px; --radius: var(--r);
  --shadow-soft: 0 6px 20px -12px rgba(13,22,38,.18);
  --shadow: 0 22px 50px -28px rgba(13,22,38,.28);
  --ease: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: var(--paper); color: var(--text);
  font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--blue); color: #fff; }

h1, h2 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; text-transform: uppercase; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3, h4 { font-family: var(--font-body); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.12rem, 1.5vw, 1.3rem); }
p { text-wrap: pretty; }
strong, b { font-weight: 700; }

.eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 600; color: var(--accent); display: inline-block; margin-bottom: .9rem; }
.lead { font-size: clamp(1.05rem, 1.25vw, 1.18rem); line-height: 1.55; color: var(--text-soft); max-width: 60ch; }
.muted { color: var(--text-soft); }
.small { font-size: .82rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--surface-2); }
.sec-head { max-width: 760px; margin-bottom: 2.2rem; }
.sec-head .muted { margin-top: .8rem; }

/* ---------------- Botones (pill, Manrope 600, sin uppercase) ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: .95rem; font-weight: 600; line-height: 1;
  background: var(--blue); color: #fff; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: var(--blue-700); }
.btn--sm { padding: .5rem .9rem; font-size: .85rem; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface-2); border-color: #cfd7e6; }
/* brillo al hover (igual que la web principal) */
.btn:not(.btn--ghost)::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.btn:not(.btn--ghost):hover::after { animation: btnShine .85s var(--ease); }
@keyframes btnShine { from { left: -120%; } to { left: 130%; } }

.link-more { font-family: var(--font-body); font-size: .92rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.link-more:hover { text-decoration: underline; }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); text-transform: uppercase; font-size: .92rem; letter-spacing: .02em; color: var(--text); }
.brand strong { color: var(--blue); }
.brand .sub { font-family: var(--font-body); font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-faint); font-size: .8rem; }
.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav > a { color: var(--text-soft); font-size: .92rem; font-weight: 600; }
.nav > a:hover { color: var(--text); }
.nav .btn { color: #fff; }
.lang-switch { display: inline-flex; align-items: center; gap: .15rem; border: 1px solid var(--border); border-radius: 8px; padding: .15rem .25rem; }
.lang-switch a, .lang-switch .lang-cur { font-size: .76rem; font-weight: 700; padding: .15rem .42rem; border-radius: 6px; line-height: 1; }
.lang-switch a { color: var(--text-faint); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); }
.lang-switch .lang-cur { background: var(--blue); color: #fff; }

/* ---------------- Hero (navy, como la web principal) ---------------- */
.hero { position: relative; overflow: hidden; background: var(--navy-900); color: var(--on-dark); padding-block: clamp(3rem, 7vw, 6rem); }
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--accent-light); }
.hero h1 { color: #fff; }
.hero .lead { color: var(--on-dark-soft); margin-top: 1.1rem; }
.hero .text-grad { color: var(--accent-light); }
.hero .aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; z-index: 1; }
.hero .a1 { width: 460px; height: 460px; background: radial-gradient(circle, #0a4ea8, transparent 70%); top: -160px; right: -120px; }
.hero .a2 { width: 380px; height: 380px; background: radial-gradient(circle, #06203f, transparent 70%); bottom: -180px; left: -100px; }
.crumbs + .hero, .crumbs ~ .hero { padding-top: clamp(1.6rem, 3vw, 2.6rem); }

.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 500; color: var(--on-dark-soft); background: rgba(255,255,255,.06); border: 1px solid var(--on-dark-line); border-radius: var(--r-pill); padding: .4rem .9rem; }

/* ---------------- Generadores (tarjetas) ---------------- */
.gens { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.gen-card { display: flex; flex-direction: column; gap: .5rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.gen-card:hover { transform: translateY(-4px); border-color: var(--blue-tint-2); box-shadow: var(--shadow); }
.gen-card .ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; background: var(--blue-tint); border-radius: 12px; margin-bottom: .3rem; }
.gen-card h3 { color: var(--text); }
.gen-card p { font-size: .9rem; color: var(--text-soft); line-height: 1.5; flex: 1; }
.gen-card .go { font-size: .88rem; font-weight: 600; color: var(--blue); margin-top: .4rem; }

/* ---------------- Pasos ---------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; }
.step .n { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-family: var(--font-display); margin-bottom: 1rem; }
.step h3 { margin-bottom: .4rem; }
.step p { font-size: .92rem; color: var(--text-soft); }

/* ---------------- App del generador (formulario + salida) ---------------- */
.gapp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.6rem; align-items: start; }
.gform { display: flex; flex-direction: column; gap: 1.1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; }
.grp { display: flex; flex-direction: column; gap: .4rem; }
.grp .q { font-size: .9rem; font-weight: 600; color: var(--text); }
.grp .req { color: var(--blue); }
.grp .hint { font-size: .8rem; color: var(--text-faint); }
.gform input[type=text], .gform input[type=email], .gform input[type=url], .gform select, .gform textarea {
  width: 100%; font: inherit; font-size: .92rem; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; transition: border-color .2s, box-shadow .2s;
}
.gform input:focus, .gform select:focus, .gform textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,67,153,.12); }
.gform textarea { min-height: 90px; resize: vertical; }
.opt { display: flex; align-items: flex-start; gap: .5rem; font-size: .9rem; color: var(--text); cursor: pointer; padding: .15rem 0; }
.opt input { margin-top: .15rem; accent-color: var(--blue); }

.gout-wrap { position: sticky; top: 84px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: var(--shadow-soft); }
.gout-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .7rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.gout-bar .ttl { font-weight: 700; font-size: .9rem; margin-right: auto; }
.gout { white-space: pre-wrap; font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.6; color: var(--text); padding: 1.2rem; max-height: 70vh; overflow: auto; }

/* ---------------- Disclaimer ---------------- */
.disclaimer { background: #fff8ed; border: 1px solid #f6e0b8; border-left: 4px solid var(--warn); border-radius: var(--r); padding: 1.3rem 1.5rem; }
.disclaimer strong { color: #9a3412; }
.disclaimer p { margin: 0 0 .5rem; font-size: .92rem; color: #6b4a1f; }
.disclaimer p:last-child { margin: 0; }

/* ---------------- Enlace ampliar + CTA dentro de guías ---------------- */
.hero .link-more { color: var(--accent-light); }
.cta-box { background: var(--blue-tint); border: 1px solid var(--blue-tint-2); border-left: 4px solid var(--blue); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 2rem 0 .5rem; }
.cta-box p { margin: 0 0 .9rem; color: var(--text); }

/* ---------------- Tabla orientativa ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-soft); background: var(--card); }
table.needs { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.needs thead th { background: var(--navy-900); color: #fff; font-weight: 600; font-size: .82rem; padding: .85rem .7rem; text-align: center; vertical-align: bottom; }
table.needs thead th:first-child { text-align: left; }
table.needs tbody th { text-align: left; font-weight: 500; color: var(--text); padding: .8rem .9rem; border-top: 1px solid var(--border); max-width: 320px; }
table.needs tbody td { text-align: center; padding: .8rem .7rem; border-top: 1px solid var(--border); }
table.needs tbody tr:nth-child(even) { background: var(--surface-2); }
table.needs td.yes { color: var(--ok); font-weight: 700; }
table.needs td.cond { color: var(--warn); font-weight: 700; font-size: .82rem; }
table.needs td.no { color: var(--border); }

/* ---------------- FAQ ---------------- */
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .9rem 1.1rem; margin-bottom: .7rem; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: .6rem 0 0; color: var(--text-soft); }

/* ---------------- Prosa (intros y páginas legales) ---------------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6rem 0 .8rem; }
.prose h3 { margin: 1.4rem 0 .6rem; }
.prose p { margin-bottom: 1rem; color: var(--text-soft); }
.prose ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; color: var(--text-soft); }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--blue); text-decoration: underline; }
.prose strong { color: var(--text); }

/* ---------------- Footer (navy) ---------------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-soft); padding: 2.8rem 0 1.6rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.6rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand strong { color: var(--accent-light); }
.site-footer a { color: var(--on-dark-soft); }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: .9rem; margin: 0 0 .7rem; }
.site-footer .small { font-size: .82rem; line-height: 1.7; }
.site-footer .legal { border-top: 1px solid var(--on-dark-line); margin-top: 1.6rem; padding-top: 1.1rem; font-size: .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; }

.crumbs { font-size: .85rem; color: var(--text-soft); padding: 1rem 0 0; }
.crumbs a { color: var(--text-soft); } .crumbs a:hover { color: var(--text); }

/* ---------------- Toast ---------------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy-900); color: #fff; padding: .7rem 1.2rem; border-radius: var(--r-pill); font-size: .88rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 920px) {
  .gapp { grid-template-columns: 1fr; }
  .gout-wrap { position: static; }
  .gout { max-height: 60vh; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav { gap: .6rem; }
  .nav > a:not(.btn) { display: none; }      /* Generadores / Cómo funciona ocultos */
  .lang-switch { display: inline-flex; }       /* el selector de idioma SÍ se queda */
  .nav .btn--sm { padding: .45rem .7rem; font-size: .8rem; }
  .brand .sub { display: none; }
  .brand { font-size: .82rem; gap: .4rem; }
}
@media (max-width: 560px) {
  .site-footer .cols { grid-template-columns: 1fr; }
  .gout-bar { gap: .35rem; }
  .gout-bar .btn--sm { padding: .4rem .6rem; font-size: .78rem; }
  .badges { gap: .45rem; }
  .badge { font-size: .76rem; padding: .35rem .7rem; }
  /* la cabecera no cabe con todo: dejamos marca + selector de idioma */
  .nav > a.btn { display: none; }
  .brand img { width: 26px; height: 26px; }
}
