/* ==========================================================================
   MARIDADI — Base & Utilities
   --------------------------------------------------------------------------
   1. Reset
   2. Base element styles
   3. Typography defaults
   4. Layout utilities (.container, .section)
   5. Editorial utilities (hr)
   6. Accessibility (.visually-hidden, .skip-link, focus)
   7. Lenis smooth-scroll support styles

   Components (nav, buttons, cards, forms) live further down as they are
   built in Phase 2. This file never uses raw values — tokens only.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. RESET
   -------------------------------------------------------------------------- */

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

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}


/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */

html {
  scrollbar-color: var(--surface-2) var(--bg-0); /* Firefox */
}

body {
  background: var(--bg-0);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--lh-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--bg-0);
}

/* WebKit scrollbar — quiet, warm */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-0);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}


/* --------------------------------------------------------------------------
   3. TYPOGRAPHY DEFAULTS
   Headlines are ivory Fraunces; italic <em> inside a heading is the house
   accent — champagne gold, used once per headline at most.
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  color: var(--ink-1);
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  color: var(--gold-bright);
}

strong {
  font-weight: var(--fw-body-medium);
  color: var(--ink-1);
}

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


/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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


/* --------------------------------------------------------------------------
   5. EDITORIAL UTILITIES
   -------------------------------------------------------------------------- */

hr {
  border: none;
  height: 1px;
  background: var(--hairline);
}


/* --------------------------------------------------------------------------
   6. ACCESSIBILITY
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: fixed;
  top: var(--sp-sm);
  left: var(--sp-sm);
  z-index: var(--z-toast);
  padding: var(--sp-xs) var(--sp-md);
  background: var(--ink-1);
  color: var(--bg-0);
  font-size: var(--fs-small);
  font-weight: var(--fw-body-medium);
  border-radius: var(--radius-pill);
  transform: translateY(-300%);
  transition: transform var(--dur-fast) var(--ease-out);
}

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


/* --------------------------------------------------------------------------
   7. LENIS SMOOTH SCROLL
   Required companion styles — see https://github.com/darkroomengineering/lenis
   -------------------------------------------------------------------------- */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}
