/* ══════════════════════════════════════════════════════════════════════
   arveil.kaicorplabs.com — la landing de Arveil

   Identidad PROPIA de Arveil (la de su cliente: docs/CLIENT_DESIGN.md del
   repo Ulzuhan/arveil): papel cálido, tinta, verde pino y la A de marfil;
   Newsreader en los títulos, Instrument Sans en el texto, IBM Plex Mono en
   lo que se copia. Lo único de KaiCorp es el pie (`.kc-footer`, al final),
   que calca theme/kaicorp-footer.tsx: es el estándar desde el 26-09, cada
   herramienta con su identidad y el pie compartido.

   Sin JavaScript: el modo oscuro sigue al sistema y no hay selector.
   ══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-vf.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrumentsans-vf.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibmplexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* Los valores son los del cliente, medidos allí a ≥ 5:1 texto/fondo. */
:root {
  color-scheme: light dark;
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --card: #fbf9f4;
  --ink: #16211f;
  --ink-2: #44524e;
  --line: #d9d2c3;
  --pine: #245b51;
  --pine-ink: #f6efdf;
  --bubble: #ddeae4;
  --amber-bg: #f6e7cc;
  --amber-ink: #6b4108;
  --ivory: #f6efdf;
  --frame: #16211f;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  --wrap: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1413;
    --paper-2: #131b19;
    --card: #151e1c;
    --ink: #e6ecea;
    --ink-2: #aab8b4;
    --line: #26332f;
    --pine: #8fd0c0;
    --pine-ink: #0e1413;
    --bubble: #1a423b;
    --amber-bg: #3a2a12;
    --amber-ink: #f2c98a;
    --frame: #2c3a36;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 4px; }
code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--paper-2); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--card); padding: .5rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: .5rem; }

/* ── Cabecera ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font: 600 1.35rem/1 var(--serif); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 1.1rem; font-size: .95rem; }
.top nav a { color: var(--ink-2); text-decoration: none; padding: .5rem 0; }
.top nav a:hover { color: var(--ink); }
.top nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; color: var(--ink); }
@media (max-width: 47.99rem) { .hide-sm { display: none; } }
@media (max-width: 29.99rem) { .hide-xs { display: none; } }

/* ── Tipografía de sección ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .75rem; }
h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.eyebrow { font: 600 .8rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pine); margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-2); max-width: 40rem; margin: 1.25rem 0 0; }
section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--line); }
.intro { color: var(--ink-2); max-width: 42rem; margin: 0 0 2rem; }

/* ── Portada ─────────────────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3.5rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.25fr .75fr; } }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.3rem; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--pine); color: var(--pine-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.phone {
  justify-self: center; width: min(19rem, 80vw);
  border-radius: 2.2rem; padding: .55rem; background: var(--frame);
  box-shadow: 0 30px 60px -35px rgb(0 0 0 / .55);
}
.phone img { border-radius: 1.7rem; width: 100%; }

.notice {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--amber-bg); color: var(--amber-ink);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 2.25rem; max-width: 42rem;
  font-size: .98rem;
}
.notice strong { font-weight: 700; }
.notice a { color: inherit; }
.notice svg { flex: none; margin-top: .2rem; }

/* ── Tarjetas y rejillas ─────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
@media (min-width: 44rem) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 60rem) { .grid-3b { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 44rem) and (max-width: 59.99rem) { .grid-3b { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.card p { margin: 0; color: var(--ink-2); }
.card p + p { margin-top: .6rem; }
.step-n {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--bubble); color: var(--ink); font: 600 .95rem/1 var(--sans); margin-bottom: .9rem;
}

.sees { list-style: none; margin: 0; padding: 0; }
.sees li { padding: .55rem 0 .55rem 1.9rem; position: relative; border-top: 1px solid var(--line); color: var(--ink); }
.sees li:first-child { border-top: 0; }
.sees li::before { position: absolute; left: 0; top: .5rem; font: 600 1rem/1.6 var(--sans); }
.sees.no li::before { content: "✕"; color: var(--pine); }
.sees.yes li::before { content: "◐"; color: var(--amber-ink); }
.foot-note { color: var(--ink-2); font-size: .95rem; margin: 1.25rem 0 0; }

/* ── Capturas ────────────────────────────────────────────────────────── */
.shots { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 52rem) { .shots { grid-template-columns: 2.4fr 1fr; } }
.shot { margin: 0; }
.shot img { border-radius: 12px; border: 1px solid var(--line); }
.shot figcaption { color: var(--ink-2); font-size: .9rem; margin-top: .6rem; }
.shot-phone img { border-radius: 22px; max-width: 18rem; }

/* ── Descargas ───────────────────────────────────────────────────────── */
.dl { display: flex; flex-direction: column; gap: .9rem; }
.dl h3 { margin: 0; }
.dl .req { color: var(--ink-2); font-size: .95rem; }
.dl .soon {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 2.6rem;
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px dashed var(--line);
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.later { color: var(--ink-2); margin: 1.25rem 0 0; }

/* ── Guía de instalación ─────────────────────────────────────────────── */
.page-head { padding: 3.5rem 0 1rem; }
.crumb { font-size: .9rem; color: var(--ink-2); margin: 0 0 1rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: s; position: relative; padding: 0 0 1.4rem 3rem; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--bubble); font: 600 .95rem/1 var(--sans);
}
.steps strong { font-weight: 600; }
.ui { font-weight: 600; }
.warn { background: var(--amber-bg); color: var(--amber-ink); border-radius: var(--radius); padding: 1rem 1.2rem; }
.warn a { color: inherit; }
.toc { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: .45rem .95rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--card); }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--card); }
details + details { margin-top: .75rem; }
summary { cursor: pointer; font-weight: 600; }
.prose { max-width: 44rem; }
.prose p, .prose ul { margin: 0 0 1rem; }

/* ── Pie de Arveil ───────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .95rem; color: var(--ink-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-foot ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-foot p { margin: 0; }

/* ── Pie común de KaiCorp Labs ───────────────────────────────────────────
   Calca theme/kaicorp-footer.tsx, sin los enlaces a los servicios (Arveil
   no es uno). Colores y letra de KaiCorp a propósito, iguales en claro y en
   oscuro: es lo que se reconoce de una herramienta a otra. */
.kc-footer { background: #05070d; border-top: 1px solid #1b2333; padding: 1.25rem 1rem; font-family: "Inter", system-ui, sans-serif; }
.kc-footer .kc-in { max-width: var(--wrap); margin: 0 auto; display: flex; justify-content: center; }
@media (min-width: 40rem) { .kc-footer .kc-in { justify-content: flex-start; padding: 0 .5rem; } }
.kc-footer a { display: inline-flex; align-items: center; gap: .5rem; color: #9fb0c8; font-size: .8rem; text-decoration: none; }
.kc-footer a:hover { opacity: .85; }
.kc-footer img { width: 18px; height: 18px; }
.kc-footer b { color: #e6ecf5; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ── Páginas de enlace (/join, /link, /contact) ─────────────────────────
   abrir.js pone en <html>, antes de pintar, el idioma y si el enlace trae
   código; así no se ve un idioma o un aviso que luego desaparece. Sin
   script no hay clase y se ven los dos idiomas. */
.lang-es [data-lang]:not([lang="es"]),
.lang-en [data-lang]:not([lang="en"]),
.con-codigo [data-when="nocode"],
.sin-codigo [data-when="code"] { display: none; }
button.btn { cursor: pointer; }
