@font-face {
  font-family: "Inter Variable";
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/Inter-Variable.woff2") format("woff2");
}

@font-face {
  font-family: "PP Editorial New";
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/PPEditorialNew-Ultrabold.otf") format("opentype");
}

* { box-sizing: border-box; }

html {
  --font-editorial-local: "PP Editorial New";
  /* La densidad large trae un section-space de hasta 8rem, calibrado para
     páginas largas. Esta entra en una pantalla, así que lleva un ritmo propio. */
  --page-section-space: clamp(1.5rem, 2.6vw, 2.25rem);
  font-size: 100%;
}

/* El papel (grano + luz de dosel) sale de .meccano-surface-base, que Meccano
   0.12.0 distribuye en el theme junto con su variante dark. Antes vivía acá
   como copia literal de la receta. */
body {
  min-height: 100vh;
  margin: 0;
  padding: var(--page-section-space) var(--soto-layout-screen-margin);
  color: var(--soto-color-text-primary);
  font-family: var(--font-body);
  font-size: var(--density-body-size);
  line-height: var(--density-body-line-height);
}

::selection {
  background: var(--soto-color-brand-selection);
  color: var(--soto-color-text-primary);
}

main {
  width: 100%;
  min-width: 0;
  max-width: 800px;
  margin: 0 auto;
}

/* Aviso de densidad. El atajo ⌥⇧D no tiene control visible, así que este es el
   único indicio de en qué densidad quedaste. Equivale al toast que el DS
   resuelve con sonner. */
[data-density-notice] {
  position: fixed;
  z-index: 20;
  right: var(--soto-space-4);
  bottom: var(--soto-space-4);
  padding: var(--soto-space-2) var(--soto-space-4);
  border: 1px solid var(--soto-color-border-subtle);
  border-radius: var(--soto-radius-control);
  background: var(--soto-color-surface-raised);
  box-shadow: var(--soto-shadow-card);
  color: var(--soto-color-text-primary);
  font-size: var(--density-meta-size);
  opacity: 0;
  pointer-events: none;
  transform: translateY(var(--soto-space-2));
  transition: opacity var(--soto-motion-fast) var(--soto-motion-ease), transform var(--soto-motion-fast) var(--soto-motion-ease);
}
[data-density-notice][data-visible="true"] { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-density-notice] { transition: none; }
}

.site-header {
  display: flex;
  min-height: var(--density-header-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--soto-space-4);
  margin-bottom: var(--page-section-space);
  border-bottom: 1px solid var(--soto-color-border-subtle);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand-lockup { display: block; width: clamp(8.5rem, 18vw, 11rem); height: auto; }
.brand-lockup-inverse { display: none; }
[data-theme="dark"] .brand-lockup-light { display: none; }
[data-theme="dark"] .brand-lockup-inverse { display: block; }
.login-button { min-width: 7rem; }

.hero { margin-bottom: var(--page-section-space); }
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(
    var(--density-panel-heading-size),
    calc(var(--density-panel-heading-size) * 1.32),
    2.9rem
  );
  font-weight: var(--soto-typography-weight-display);
  line-height: 1;
  letter-spacing: var(--soto-typography-style-heading1-letter-spacing);
}
.hero p { max-width: var(--soto-layout-reading-max-width); margin: var(--soto-space-3) 0 0; color: var(--soto-color-text-secondary); }

h2 {
  margin: var(--page-section-space) 0 var(--soto-space-4);
  color: var(--soto-color-text-muted);
  font-size: var(--density-meta-size);
  font-weight: var(--soto-typography-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--inset); }
.card {
  min-width: 0;
  padding: var(--inset);
  border: 1px solid var(--soto-color-border-default);
  border-radius: var(--soto-radius-surface);
  background: var(--soto-color-surface-raised);
  box-shadow: var(--soto-shadow-card);
}
.card-head { display: flex; min-width: 0; align-items: center; gap: var(--stack); margin-bottom: var(--inset); }
.platform { font-size: var(--density-body-size); font-weight: var(--soto-typography-weight-semibold); }
.version { margin-left: auto; color: var(--soto-color-text-muted); font-family: ui-monospace, monospace; font-size: var(--density-meta-size); }

.button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: var(--tap-target);
  align-items: center;
  justify-content: center;
  padding: 0 var(--control-padding-inline);
  border: 1px solid transparent;
  border-radius: var(--soto-radius-control);
  background-clip: padding-box;
  cursor: pointer;
  text-decoration: none;
  font-size: var(--control-text);
  font-weight: var(--soto-typography-weight-medium);
  line-height: var(--soto-typography-style-button-line-height);
  white-space: nowrap;
  transition: color var(--soto-motion-fast) var(--soto-motion-ease), background-color var(--soto-motion-fast) var(--soto-motion-ease), border-color var(--soto-motion-fast) var(--soto-motion-ease), box-shadow var(--soto-motion-fast) var(--soto-motion-ease), transform var(--soto-motion-fast) var(--soto-motion-ease);
}
.button-primary {
  --button-large-face: var(--primary);
  --button-large-base: var(--button-large-primary-base);
  --button-large-foreground: var(--primary-foreground);
  background: var(--primary);
  color: var(--primary-foreground);
}
.button-primary:hover { background: color-mix(in srgb, var(--primary) 80%, transparent); }
.button-secondary {
  --button-large-face: var(--secondary);
  --button-large-base: var(--button-large-secondary-base);
  --button-large-foreground: var(--secondary-foreground);
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.button-secondary:hover { background: color-mix(in srgb, var(--secondary) 95%, var(--foreground)); }
.button-outline {
  --button-large-face: transparent;
  --button-large-base: var(--button-large-outline-base);
  --button-large-foreground: var(--foreground);
  --button-large-outline-border: var(--input);
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}
.button-outline:hover { background: var(--muted); color: var(--foreground); }
.button-destructive {
  --button-large-face: color-mix(in srgb, var(--destructive) 10%, transparent);
  --button-large-base: var(--button-large-destructive-base);
  --button-large-foreground: var(--destructive);
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  color: var(--destructive);
}
[data-theme="dark"] .button-destructive {
  --button-large-face: color-mix(in srgb, var(--destructive) 20%, transparent);
  background: color-mix(in srgb, var(--destructive) 20%, transparent);
}
.button-destructive:hover { background: color-mix(in srgb, var(--destructive) 20%, transparent); }
[data-theme="dark"] .button-destructive:hover { background: color-mix(in srgb, var(--destructive) 30%, transparent); }
.button-icon {
  width: var(--tap-target);
  padding: 0;
}
[data-density="large"] .button {
  margin-bottom: 5px;
  background: var(--button-large-face);
  color: var(--button-large-foreground);
  box-shadow: 0 5px 0 var(--button-large-base);
}
[data-density="large"] .button:not(.button-outline) { border-width: 0; }
[data-density="large"] .button-outline { border-color: var(--button-large-outline-border); }
[data-density="large"] .button:hover { background: color-mix(in srgb, var(--button-large-face) 92%, white); }
[data-density="large"] .button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--button-large-base); }
.button.disabled, .button[aria-disabled="true"] { pointer-events: none; opacity: 0.5; }
.button:focus-visible, a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.note { margin: var(--soto-space-4) 0 0; overflow-wrap: anywhere; color: var(--soto-color-text-muted); font-size: var(--density-meta-size); }
.technical-footer { margin-top: var(--page-section-space); }
.technical-links { display: grid; gap: var(--stack); padding: 0; list-style: none; color: var(--soto-color-text-muted); }
@media (max-width: 48rem) {
  .site-header { min-height: 5rem; }
  .login-button { min-width: 6rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
