/* base.css — reset, tipografía, layout de pantalla y movimiento común. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.2; color: var(--text); }
a { color: var(--primary); text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

.app-shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--safe-top) + 16px) var(--gutter) calc(var(--nav-height) + var(--safe-bottom) + 32px);
  min-height: 100dvh;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
}
.screen-title { font-size: var(--fs-28); font-weight: 800; letter-spacing: -0.02em; }
.screen-subtitle { font-size: var(--fs-13); color: var(--text-muted); margin-top: 2px; }

.section { margin-top: var(--space-6); }
.group-label {
  font-size: var(--fs-12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin: 0 var(--space-1) var(--space-2);
}

.brand { display: flex; align-items: center; gap: var(--space-2); font-weight: 800; font-size: var(--fs-20); letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary-solid); color: var(--on-primary);
  font-size: 1rem;
}

.muted { color: var(--text-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 180ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }
.bottom-nav { view-transition-name: bottom-nav; }
::view-transition-group(bottom-nav), ::view-transition-old(bottom-nav), ::view-transition-new(bottom-nav) { animation: none; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

.app-shell > * { animation: enter var(--dur-enter) var(--ease-out) backwards; }
.app-shell > *:nth-child(2) { animation-delay: 60ms; }
.app-shell > *:nth-child(3) { animation-delay: 120ms; }
.app-shell > *:nth-child(4) { animation-delay: 180ms; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
@keyframes grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
