/* KeraMetric — estilos planos, sin dependencias. Tema claro/oscuro con variables. */
:root {
  --navy: #0b2b5b;
  --teal-2: #169ba2;
  --cyan: #00b3a4;
  --bg: #f8fafc;
  --bg-mesh:
    radial-gradient(at 0% 0%, rgba(27,128,140,.12) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(11,43,91,.15) 0, transparent 50%),
    radial-gradient(at 50% 100%, rgba(0,179,164,.08) 0, transparent 50%);
  --text: #0f172a;
  --muted: #475569;
  --heading: #0b2b5b;
  --card: rgba(255,255,255,.9);
  --card-border: #e2e8f0;
  --field: #fff;
  --field-border: #cbd5e1;
  --chip-bg: #e6f4f4;
  --chip-border: #b2dfe0;
  --chip-text: #0b5a5f;
  --accent: #0f7a80;
  --dark-card: #0b2b5b;
  --btn: #0b2b5b;
  --btn-hover: #071c3c;
  --btn-text: #fff;
  --logo-bg: transparent;
  --shadow: 0 10px 30px -12px rgba(11,43,91,.25);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #071326;
  --bg-mesh:
    radial-gradient(at 0% 0%, rgba(22,155,162,.16) 0, transparent 50%),
    radial-gradient(at 100% 0%, rgba(30,70,140,.25) 0, transparent 50%),
    radial-gradient(at 50% 100%, rgba(0,179,164,.10) 0, transparent 50%);
  --text: #e2e8f0;
  --muted: #a9b6c8;
  --heading: #eaf1fb;
  --card: rgba(15,32,60,.85);
  --card-border: #1e3558;
  --field: #0c1c36;
  --field-border: #2b4670;
  --chip-bg: rgba(22,155,162,.15);
  --chip-border: rgba(22,155,162,.4);
  --chip-text: #7fdde0;
  --accent: #4fd1d6;
  --dark-card: #0d2347;
  --btn: #169ba2;
  --btn-hover: #1cb3ba;
  --btn-text: #04202a;
  --logo-bg: #fff;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg) var(--bg-mesh) fixed;
}
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--btn); color: var(--btn-text); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 48rem; }

/* Cabecera */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.logo { display: inline-flex; background: var(--logo-bg); border-radius: 10px; padding: 4px 8px; }
.logo img { display: block; height: 2.5rem; width: auto; }
.tools { display: flex; align-items: center; gap: .6rem; }
.status { display: none; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--chip-border); color: var(--chip-text); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal-2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 40rem) { .status { display: inline-flex; } .logo img { height: 3rem; } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.5rem; min-width: 2.5rem; padding: 0 .6rem; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card); color: var(--heading); font: inherit; font-size: .8rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.icon-btn:hover { border-color: var(--teal-2); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.icon-btn img { width: 1.5rem; height: 1rem; border-radius: 2px; display: block; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* Contenido */
main { flex: 1; padding-top: 1.5rem; padding-bottom: 2rem; }
.hero { text-align: center; max-width: 56rem; margin: 0 auto 2.5rem; }
.tagline { display: inline-block; margin: 0 0 1.25rem; padding: .4rem 1rem; border-radius: 999px; background: var(--navy); color: #7fdde0; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; color: var(--heading); }
h1 span { background: linear-gradient(90deg, var(--navy), var(--teal-2) 55%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] h1 span { background-image: linear-gradient(90deg, #7fb2ff, #4fd1d6 60%, #3ee0cf); }
.lead { margin: 0 auto; max-width: 44rem; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); }

.features { list-style: none; display: grid; gap: 1rem; margin: 2.5rem 0 0; padding: 0; text-align: left; }
@media (min-width: 48rem) { .features { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 1.25rem; padding: 1.5rem; box-shadow: var(--shadow); }
.features .ico { display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: .75rem; background: var(--chip-bg); color: var(--accent); margin-bottom: 1rem; }
.features .ico svg { width: 1.3rem; height: 1.3rem; }
h2, h3 { color: var(--heading); line-height: 1.25; }
.features h2 { margin: 0 0 .25rem; font-size: 1rem; }
.features p { margin: 0; font-size: .88rem; color: var(--muted); }

.split { display: grid; gap: 1.5rem; }
@media (min-width: 64rem) { .split { grid-template-columns: 5fr 7fr; align-items: stretch; } }
.about { background: var(--dark-card); color: #e2e8f0; border: 1px solid rgba(27,128,140,.35); border-radius: 1.5rem; padding: 2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.eyebrow { margin: 0 0 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7fdde0; }
.about h2 { margin: 0 0 1rem; color: #fff; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.about p { margin: 0 0 1rem; color: #cbd5e1; font-size: .95rem; }
.about .org { margin: 0; padding-top: 1.25rem; border-top: 1px solid rgba(148,163,184,.3); font-size: .8rem; color: #94a3b8; }
.about .org strong { display: block; color: #e2e8f0; font-size: .9rem; }

.contact { padding: 2rem; border-radius: 1.5rem; }
.contact h2 { margin: 0 0 .25rem; font-size: 1.5rem; }
.contact .sub { margin: 0 0 1.5rem; font-size: .9rem; color: var(--muted); }
.row { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .row { grid-template-columns: 1fr 1fr; } }
form label { display: block; margin: 0 0 .25rem; font-size: .8rem; font-weight: 600; color: var(--heading); }
form .field { margin-bottom: 1rem; }
input, select, textarea { width: 100%; padding: .75rem 1rem; font: inherit; font-size: .95rem; color: var(--text); background: var(--field); border: 1px solid var(--field-border); border-radius: .75rem; }
textarea { resize: vertical; min-height: 6rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn { display: inline-flex; width: 100%; align-items: center; justify-content: center; padding: .9rem 1.5rem; border: 0; border-radius: .75rem; background: var(--btn); color: var(--btn-text); font: inherit; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.btn:hover { background: var(--btn-hover); }
.notice { margin: 1rem 0 0; padding: 1rem; border-radius: .75rem; background: var(--chip-bg); border: 1px solid var(--chip-border); color: var(--chip-text); font-size: .9rem; }
.notice[hidden] { display: none; }
.consent { font-size: .78rem; color: var(--muted); margin: 0 0 1rem; }
.direct { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--card-border); font-size: .8rem; color: var(--muted); }

/* Pie */
.site-footer { margin-top: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; border-top: 1px solid var(--card-border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; font-size: .8rem; color: var(--muted); }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Páginas de texto (privacidad, 404) */
.prose { background: var(--card); border: 1px solid var(--card-border); border-radius: 1.5rem; padding: 2rem; }
.prose h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); text-align: left; }
.prose h2 { margin-top: 2rem; font-size: 1.15rem; }
.prose p, .prose li { color: var(--muted); }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) { .status::before { animation: none; } html { scroll-behavior: auto; } }

/* Aviso de cookies */
.cookie { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50; max-width: 44rem; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--dark-card); color: #e2e8f0; border: 1px solid rgba(27,128,140,.5); box-shadow: 0 12px 40px -8px rgba(0,0,0,.5); font-size: .85rem; }
.cookie p { margin: 0; flex: 1 1 18rem; }
.cookie a { color: #7fdde0; }
.cookie div { display: flex; gap: .5rem; }
.cookie button { padding: .5rem 1.1rem; border-radius: .6rem; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid #7fdde0; }
.cookie-ok { background: #7fdde0; color: #04202a; }
.cookie-no { background: transparent; color: #e2e8f0; }
