/* Infinite Cold — hoja de estilos única. Paleta obsidiana + cian sobrio. Sin dependencias externas. */
:root {
  --bg: #05070a;
  --bg-2: #0b0f15;
  --card: #10151d;
  --line: #222b37;
  --text: #e8ecf1;
  --muted: #a7b1bd;
  --accent: #00e1ee;
  --accent-ink: #031014;
  --error: #ff8f8f;
  --ok: #7fe3b0;
  --radius: 10px;
  --wrap: 1120px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5, 7, 10, .94); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 22px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: 8px 12px; color: var(--text); text-decoration: none; border-radius: 6px; font-size: .95rem; }
.nav-list a:hover { background: var(--bg-2); color: var(--accent); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-left: 8px; }
.lang a { padding: 6px 10px; font-size: .85rem; color: var(--muted); text-decoration: none; min-width: 40px; text-align: center; }
.lang a[aria-current="true"] { background: var(--card); color: var(--text); font-weight: 600; }
.menu { display: none; }

@media (max-width: 860px) {
  .nav-list { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: .95rem; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .menu-panel { display: block; }
  .menu-panel { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; min-width: 210px; }
  .menu-panel a { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 6px; }
  .menu-panel a:hover { background: var(--card); }
}
@media (max-width: 380px) {
  .site-header .wrap { padding: 0 14px; gap: 8px; }
  .logo img { height: 18px; }
  .lang { margin-left: 4px; }
  .lang a { padding: 6px 8px; min-width: 34px; }
}

/* Secciones */
section { padding: 72px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
section:nth-of-type(even) { background: var(--bg-2); }
.section-intro { color: var(--muted); max-width: 680px; margin-bottom: 32px; }
.grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

/* Portada */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; } }
.badge { display: inline-block; font-size: .85rem; color: var(--accent); border: 1px solid #0e4c53; background: #071a1d; border-radius: 999px; padding: 3px 12px; margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--accent); font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7ff3fa; border-color: #7ff3fa; }
.btn-ghost { color: var(--text); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Placeholders de imagen */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; background: repeating-linear-gradient(135deg, #0d1219 0 14px, #0f151d 14px 28px); border: 1px dashed #344150; border-radius: var(--radius); color: var(--muted); font-size: .9rem; padding: 20px; }
.ph-hero { aspect-ratio: 16 / 10; }
.ph-portrait { aspect-ratio: 1 / 1; max-width: 260px; }
.ph-shot { aspect-ratio: 16 / 10; margin-bottom: 16px; font-size: .82rem; }

/* Bloques */
.block-link { display: inline-block; margin-top: 8px; font-weight: 600; }
.example-num { color: var(--accent); font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
.note { font-size: .95rem; color: var(--muted); margin-top: 20px; }

/* Herramientas */
.tool { display: flex; flex-direction: column; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }
.tag-estado { color: var(--accent); border-color: #0e4c53; }
.tool .meta { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: 12px; }

/* Cómo trabajamos */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.steps h3 { font-family: var(--sans); font-size: 1.1rem; margin-top: 8px; }

/* Quién */
.about { display: grid; gap: 32px; align-items: start; }
@media (min-width: 800px) { .about { grid-template-columns: 260px 1fr; } }
.links-inline { display: flex; flex-wrap: wrap; gap: 16px; }

/* Formulario */
.form { max-width: 680px; }
.field { margin-bottom: 18px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; padding: 12px 14px; background: #070a0e; color: var(--text); border: 1px solid #3a4655; border-radius: 8px; font: inherit;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0, 225, 238, .18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.help { font-size: .88rem; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.check label { font-weight: 400; }
.ts { min-height: 70px; margin: 8px 0 16px; }
.alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.alert-error { border: 1px solid var(--error); color: var(--error); background: #1d0d0f; }
.alert-ok { border: 1px solid var(--ok); color: var(--ok); background: #0b1a13; font-size: 1.1rem; }
[hidden] { display: none !important; }

/* Preguntas */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* Pie */
.site-footer { padding: 40px 0; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--text); }

/* Páginas legales */
.legal { padding: 56px 0 72px; }
.legal .wrap { max-width: 780px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal .updated { color: var(--muted); font-size: .95rem; }
.legal li { margin-bottom: .4em; }
.back { display: inline-block; margin-bottom: 24px; }
