/* ============================================================
   BASE — reset y esqueleto
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}

p {
  margin: 0;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Esqueleto --- */
.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--background) 72%, transparent);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--text);
}

.topbar__word {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.topbar__sep {
  color: var(--border);
  font-weight: 800;
}

.topbar__name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--primary);
}

.main {
  flex: 1;
  padding-block: var(--sp-3) var(--sp-7);
  display: flex;
  flex-direction: column;
}

.footer {
  padding-block: var(--sp-5) calc(var(--sp-5) + env(safe-area-inset-bottom));
  color: var(--text-muted);
  font-size: var(--step--1);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--primary-hover);
}

/* --- Contenido indexable para SEO (visible solo sin JS o al final) --- */
.seo-copy {
  color: var(--text-muted);
  font-size: var(--step--1);
  line-height: 1.6;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border);
}

.seo-copy h2 {
  font-size: var(--step-1);
  color: var(--text);
  margin-bottom: var(--sp-2);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
