/* Reset, type, links, buttons, focus, utilities */

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

* {
  margin: 0;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100vh;
  background: var(--blanco);
  color: var(--gris);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-stretch: var(--wdth-text);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* Type */

h1,
h2,
h3 {
  color: var(--azul);
  font-stretch: var(--wdth-head);
  text-wrap: balance;
  hyphens: manual;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-h1);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: var(--lh-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  font-stretch: var(--wdth-text);
  line-height: var(--lh-h3);
}

p,
li,
dd {
  max-width: var(--measure-body);
  text-wrap: pretty;
  hyphens: auto;
}

.lead {
  max-width: var(--measure-lead);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
}

.small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

em {
  font-style: italic;
}

strong {
  font-weight: 600;
}

/* Links (D-09): always underlined, hover thickens the underline */

a {
  color: var(--azul);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 3px;
}

/* Focus (§9) */

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}

/* Dark surfaces switch the ring to white */
.on-dark {
  --focus-color: var(--blanco);
}

/* Buttons (D-17) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-4);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: var(--lh-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--azul);
  color: var(--blanco);
}

.btn--primary:hover {
  background: var(--hondo);
}

/* Outline button on --gris / --hondo surfaces */
.btn--outline-light {
  border-color: var(--blanco);
  background: transparent;
  color: var(--blanco);
}

.btn--outline-light:hover {
  background: var(--blanco);
  color: var(--gris);
}

@media (min-width: 720px) {
  .btn {
    width: auto;
    white-space: nowrap;
  }
}

/* Utilities */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--blanco);
  font-size: var(--fs-ui);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}
