/* Pagina de enfokt: se parece a la app, no al sitio (docs/enfokt-y-blog.md).
   Colores, letras y formas tomados de enfokt/app/ui/index.html. */

/* Letras de la app, empacadas aqui (SIL OFL 1.1, ver fuentes/OFL-*.txt). */
@font-face { font-family: 'Instrument Sans'; font-weight: 400 600; font-style: normal; font-display: swap; src: url(fonts/InstrumentSans-latin.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/Newsreader-latin.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  --bg: #f9f6f0;
  --text: #2a2420;
  --muted: #6b6259;
  --line: #ddd6ca;
  --soft: #f0ebe2;
  --accent: #b4532a;
  --curva: cubic-bezier(.2, .7, .2, 1);
}
/* oscuro: por el sistema, salvo que se haya elegido claro, o elegido en la barra */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --bg: #1f1f1e;
    --text: #ededeb;
    --muted: #a9a9a6;
    --line: #3a3a39;
    --soft: #2b2b2a;
    --accent: #e59a6b;
  }
}
:root[data-tema="oscuro"] {
  color-scheme: dark;
  --bg: #1f1f1e;
  --text: #ededeb;
  --muted: #a9a9a6;
  --line: #3a3a39;
  --soft: #2b2b2a;
  --accent: #e59a6b;
}
:root[data-tema="claro"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.hoja { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* arriba, como la cabecera de la ventana */
.barra {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 13px; color: var(--muted);
}
.barra a { text-decoration: none; padding: 6px 10px; margin: -6px -10px; border-radius: 8px; transition: background .15s ease, color .15s ease; }
.barra a:hover { background: var(--soft); color: var(--text); }

/* el cambio de tema funde toda la pagina (index.html, View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: ease; }

/* tema: como el selector de Tema de la app */
.tema { position: relative; display: flex; width: max-content; margin: 0 auto 14px; padding: 2px; border-radius: 8px; background: var(--soft); font-size: 13px; }
.tema-marca { position: absolute; top: 2px; bottom: 2px; left: 2px; width: 0; border-radius: 6px; background: var(--bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tema-marca.lista { transition: left .28s var(--curva), width .28s var(--curva); }
.tema button { position: relative; z-index: 1; font: inherit; color: var(--muted); background: none; border: 0; padding: 4px 11px; border-radius: 6px; cursor: pointer;
  transition: color .15s ease; }
.tema button:hover, .tema button[aria-pressed="true"] { color: var(--text); }
.tema button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* barra anclada: la portada muy reducida, al pasarla (docs/enfokt-y-blog.md) */
.anclada { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line);
  transform: translateY(-100%); opacity: 0; transition: transform .3s var(--curva), opacity .2s ease; }
.anclada.visible { transform: none; opacity: 1; }
.anclada-dentro { max-width: 980px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.anclada-nombre { font: 300 28px/1 Newsreader, Georgia, serif; letter-spacing: -.02em; text-decoration: none; }
.anclada-bajar { display: inline-block; line-height: 36px; padding: 0 18px; border-radius: 18px;
  background: var(--accent); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: opacity .15s ease, transform .15s var(--curva); }
.anclada-bajar:hover { opacity: .88; }
.anclada-bajar:active { transform: scale(.97); }
@media (max-width: 480px) { .anclada-bajar .largo { display: none; } }

/* rotulo chico, como "ENFOQUE" y "CICLO ACTUAL" */
.rotulo { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.rotulo.acento { color: var(--accent); }

/* portada: el nombre grande con la letra del reloj, y la ventana al lado */
.portada {
  display: grid; gap: 40px; align-items: center;
  padding: clamp(32px, 8vh, 80px) 0 clamp(40px, 8vh, 72px);
}
@media (min-width: 860px) { .portada { grid-template-columns: 1fr 380px; gap: 64px; } }
.portada h1 {
  margin: 10px 0 0;
  font: 300 clamp(84px, 16vw, 132px)/1 Newsreader, Georgia, serif;
  letter-spacing: -.03em;
}
.lema { margin: 18px 0 0; max-width: 30rem; font-size: 19px; line-height: 1.5; color: var(--text); }
.lema em { font-style: normal; color: var(--accent); }

/* el boton grande de la app: pastilla oscura */
.pastilla {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 28px; height: 52px; padding: 0 28px; border-radius: 26px;
  background: var(--accent); color: var(--bg); text-decoration: none;
  font-weight: 500; font-size: 16px;
  transition: opacity .15s ease, transform .15s var(--curva);
}
.pastilla:hover { opacity: .88; }
.pastilla:active { transform: scale(.97); }
.pastilla small { font-weight: 400; font-size: 13px; opacity: .75; white-space: nowrap; }
@media (max-width: 480px) {
  .pastilla { height: auto; padding: 12px 26px; flex-direction: column; align-items: flex-start; gap: 0; border-radius: 22px; }
}
/* aviso de beta: chico, bajo la version (itiel, 20-nov) */
.aviso-beta { margin: 10px 0 0; max-width: 30rem; font-size: 13px; color: var(--muted); }
.debajo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
/* boton secundario de la app: texto que se ilumina al pasar el mouse */
.secundario { padding: 5px 13px; border: 1px solid var(--accent); border-radius: 16px; color: var(--accent); text-decoration: none;
  transition: background .15s ease; }
.secundario:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#instalar { scroll-margin-top: 72px; }
/* una subseccion por sistema dentro de instalar y anclar */
.sistema { margin: 0 0 10px; font: 300 24px/1.2 Newsreader, Georgia, serif; }

/* la ventana: una sola captura segun el tema */
.ventana { margin: 0; justify-self: center; }
.ventana img { display: block; width: 100%; max-width: 380px; height: auto; border-radius: 8px;
  box-shadow: 0 1px 0 var(--line), 0 24px 60px -30px rgba(0, 0, 0, .45); }
.ventana figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.ventana img.solo-oscuro { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .ventana img.solo-claro { display: none; }
  :root:not([data-tema="claro"]) .ventana img.solo-oscuro { display: block; }
}
:root[data-tema="oscuro"] .ventana img.solo-claro { display: none; }
:root[data-tema="oscuro"] .ventana img.solo-oscuro { display: block; }

/* secciones: rotulo con linea arriba, como el pliegue del ciclo */
.seccion { max-width: 620px; padding: 36px 0 44px; }
.seccion > .rotulo { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; color: var(--accent); }
.seccion > .rotulo::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.seccion p { margin: 0 0 14px; }
.seccion p:last-child { margin-bottom: 0; }
.tenue { color: var(--muted); }
.seccion a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
.seccion a:hover { text-decoration: underline; }
.seccion a.sale::after { content: ' ↗'; }

/* filas con linea fina, como las de Ajustes */
.filas { margin: 0; padding: 0; list-style: none; }
.filas li { display: flex; gap: 16px; align-items: baseline; min-height: 48px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.filas li:first-child { border-top: 1px solid var(--line); }
.filas .n { flex: 0 0 26px; font: 300 22px/1 Newsreader, Georgia, serif; color: var(--accent); }

/* nota aparte, como la tarjeta de primer uso */
.nota { margin: 20px 0 0; padding: 14px 16px; border-radius: 8px; background: var(--soft); font-size: 14px; color: var(--muted); }
.nota b { color: var(--text); font-weight: 600; }

.cierre { margin: 20px 0 0; }

/* enlaces de contacto, como filas que se pueden pulsar */
.enlace {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  min-height: 48px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text) !important;
}
.enlace span:last-child { color: var(--accent); font-size: 14px; white-space: nowrap; }
.enlace span:last-child::after { content: ' ↗'; }
.seccion a.enlace:hover { text-decoration: none; }
.enlace:hover span:first-child { color: var(--accent); }
.enlace span:first-child { transition: color .15s ease; }

.pie {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding: 28px 0 48px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.pie a { text-decoration: none; }
.pie a:hover { color: var(--text); }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.pastilla:focus-visible { outline-offset: 4px; border-radius: 26px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
