/* Reset, fonts and typography.
   Onest (text) and Sora (headings, large figures): variable WOFF2, Latin subset with every
   Spanish character (ñ á é í ó ú ü ¿ ¡ € º ª). SIL Open Font License 1.1, /assets/fonts/OFL.txt */

@font-face {
  font-family: "Onest";
  src: url("/assets/fonts/onest.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-family: var(--font-family-sans);
  font-size: 16px;
  line-height: var(--line-height-normal);
  color: var(--color-text-main);
  background-color: var(--color-sand);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--color-sand);
  color: var(--color-text-main);
}

main {
  flex: 1;
}

::selection {
  background: var(--color-selection);
  color: var(--color-ink);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-teal-bright);
  color: var(--color-ink);
  padding: var(--space-3) var(--space-5);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  z-index: var(--z-skip-link);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid var(--color-ink);
  outline-offset: 2px;
}

/* Focus: always visible, 3px, contrast ≥ 3:1 against the surface it sits on */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.mobile-drawer :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  color: var(--color-ink);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-display);
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.1875rem, 2.2vw, 1.4375rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.005em;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

strong, b {
  font-weight: var(--font-weight-semibold);
  color: inherit;
}

a {
  color: var(--color-teal-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), text-decoration-thickness var(--transition-fast);
}

a:hover {
  color: var(--color-ink);
  text-decoration-thickness: 2px;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

li {
  margin-bottom: var(--space-2);
}

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

/* Financial numbers: stable width so values do not jump while a slider moves */
.num, .amount, .percentage, .rate, [data-amount],
table, .data-table,
[class^="calc-"], [class*=" calc-"],
[class^="loyalty-"], [class*=" loyalty-"],
output {
  font-variant-numeric: tabular-nums;
}

.num, .amount, .percentage, .rate, [data-amount] {
  letter-spacing: -0.01em;
}

/* Large figures in Sora; documented in docs/brand-guide.html for page parts */
.num-display {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.container-narrow {
  max-width: 800px;
}

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