/*
 * CATgrafia web. Los valores son los tokens de apps/mobile/src/global.css,
 * copiados con el mismo nombre. Si cambia un token allí, cambia aquí.
 * Sin JavaScript, sin recursos externos.
 */
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Figtree-400.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/Figtree-600.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/Figtree-700.ttf") format("truetype"); }

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f6f7fb;
  --border: #e6e8f2;
  --border-strong: #d3d7e8;
  --text: #14162b;
  --text-muted: #5e6484;
  --accent: #6c84ef;
  --accent-deep: #4f63d2;
  --accent-tint: #edf0fe;
  --header: #dce3fd;
  --header-halo: #c3cefa;
  --accent-halo: #cfd9fb;
  --hero: #4f63d2;
  --on-hero: #ffffff;
  --radius-card: 22px;
  --radius-control: 16px;
  --radius-logo: 34px;
  --shadow-logo: 0 24px 48px -22px rgba(79, 99, 210, 0.6);
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e17;
    --surface: #161a26;
    --border: #252a3a;
    --border-strong: #39405a;
    --text: #f3f5fb;
    --text-muted: #a2a9c0;
    --accent: #8b9cf5;
    --accent-deep: #a8b5f8;
    --accent-tint: #1e2440;
    --accent-halo: #333d68;
    --header: #252e56;
    --header-halo: #37437a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Cabecera: la banda de la app, con el halo del logo */
.top { background: var(--header); position: relative; overflow: hidden; }
.top::after {
  content: ""; position: absolute; right: -6rem; top: -7rem; width: 20rem; height: 20rem;
  border-radius: 50%; background: var(--header-halo); opacity: .55; pointer-events: none;
}
.top .wrap { position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin: 16px 0 4px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 12px; display: block; }
.brand span b { color: var(--accent-deep); font-weight: 700; }
nav ul { list-style: none; margin: 0; padding: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .9375rem;
}
nav a:hover { background: var(--accent-tint); }
nav a[aria-current="page"] { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* Contenido */
main { flex: 1; padding: 40px 0 56px; }
h1 { font-size: clamp(1.875rem, 6vw, 2.75rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 16px; text-wrap: balance; }
h2 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 12px; }
.intro { font-size: 1.1875rem; color: var(--text-muted); margin: 0 0 32px; }
p { margin: 0 0 14px; }
section { padding: 28px 0 0; margin-top: 28px; border-top: 1px solid var(--border); }
section > :last-child { margin-bottom: 0; }
ul.list { margin: 0 0 14px; padding-left: 1.25rem; }
ul.list li { margin-bottom: 8px; padding-left: 4px; }
ul.list li::marker { color: var(--accent); }

.banner { background: var(--accent-tint); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-control); padding: 14px 16px; margin: 0 0 28px; }
.banner strong { display: block; font-weight: 700; color: var(--text); }
.banner span { color: var(--text-muted); font-size: .9375rem; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  background: var(--hero); color: var(--on-hero); border-radius: var(--radius-control);
  font-weight: 700; font-size: 1.0625rem; text-decoration: none; margin-top: 8px;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { transform: translateY(1px); }

/* Portada */
.home-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.logo-stack { width: 132px; height: 132px; border-radius: 50%; background: var(--accent-tint); display: grid; place-items: center; box-shadow: 0 0 0 14px var(--accent-tint), 0 0 0 30px var(--accent-halo); margin: 30px 30px 6px; flex: none; }
.logo-stack img { width: 92px; height: 92px; border-radius: var(--radius-logo); box-shadow: var(--shadow-logo); display: block; }

/* Pie */
footer { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0 36px; font-size: .9375rem; color: var(--text-muted); }
footer p { margin: 0 0 6px; }
footer strong { color: var(--text); font-weight: 600; }
footer nav ul { padding: 12px 0 0; }
footer nav a { font-size: .875rem; color: var(--accent-deep); padding: 0 12px 0 0; text-decoration: underline; text-underline-offset: .18em; }

@media (min-width: 720px) {
  :root { --gutter: 24px; }
  main { padding: 64px 0 80px; }
  .home-hero { flex-direction: row; align-items: center; gap: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
