/* Modern reset + base typography */

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

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

body {
  margin: 0;
  font-family: var(--mal-font-body);
  font-size: var(--mal-fs-400);
  line-height: var(--mal-lh-normal);
  color: var(--mal-text);
  background: var(--mal-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

img,
video {
  border: 0;
}

a {
  color: var(--mal-link);
  text-decoration: none;
  transition: color var(--mal-dur-fast) var(--mal-ease);
}
a:hover,
a:focus-visible {
  color: var(--mal-link-hover);
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mal-font-display);
  line-height: var(--mal-lh-tight);
  font-weight: 700;
  margin: 0 0 var(--mal-sp-4);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--mal-fs-900); }
h2 { font-size: var(--mal-fs-800); }
h3 { font-size: var(--mal-fs-700); }
h4 { font-size: var(--mal-fs-600); }

p {
  margin: 0 0 var(--mal-sp-4);
}

ul, ol {
  margin: 0 0 var(--mal-sp-4);
  padding-left: var(--mal-sp-5);
}

/* Layout helpers */
.mal-container {
  width: 100%;
  max-width: var(--mal-container-max);
  margin-inline: auto;
  padding-inline: var(--mal-container-pad);
}

.mal-section {
  padding-block: clamp(48px, 8vw, 120px);
}

.mal-section--dark {
  background: var(--mal-bg-dark);
  color: var(--mal-text-on-dark);
}

.mal-section--cream {
  background: var(--mal-bg-alt);
}

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

/* Skip link for keyboard nav */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--mal-blue);
  color: var(--mal-white);
  padding: var(--mal-sp-3) var(--mal-sp-4);
  z-index: var(--mal-z-modal);
}
.skip-link:focus {
  left: 0;
}
