/* Base estructural. Los tokens y la capa visual viven en global.css. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
  background: var(--warm-white);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--warm-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img { height: auto; }
a { color: inherit; text-decoration: none; }

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

button,
[role="button"] { touch-action: manipulation; }

.container,
.wrap {
  width: min(100% - (2 * var(--page-gutter)), var(--container));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

.section { padding-block: var(--section-space); }

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65em;
  color: var(--deep-navy);
  font-family: var(--font-body);
  font-weight: 400;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 1.16; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.28; }
h4 { font-size: var(--fs-h4); line-height: 1.3; }
h5 { font-size: var(--fs-h5); line-height: 1.3; }
h6 { font-size: var(--fs-h6); line-height: 1.3; }

p,
li { text-wrap: pretty; }
.small { font-size: var(--fs-small); }
.mini { font-size: var(--fs-mini); }

:focus-visible {
  outline: 3px solid rgba(18, 130, 162, 0.52);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20000;
  padding: 10px 14px;
  color: var(--warm-white);
  background: var(--prussian-blue);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip:focus { transform: translateY(0); }

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