/* ============================================================
   BASE.CSS — Vonulo Global Reset & Base Styles
   Universal reset, body defaults, scrollbar, typography base,
   base link/image styles, and selection styling.
   ============================================================ */

/* ── Skip to content (a11y) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* ── Universal reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Smooth scroll ── */
html {
  /* scroll-behavior handled by JS for anchor links — CSS smooth breaks GSAP ScrollTrigger */
}

/* ── Body defaults ── */
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--sand);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--warm-grey-light);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--sand) var(--cream);
}

/* ── Selection styling ── */
::selection {
  background: rgba(196, 98, 45, 0.15);
  color: var(--ink);
}

/* ── Input appearance reset ── */
input,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ── Tap highlight ── */
* {
  -webkit-tap-highlight-color: transparent;
}

/* ── Touch action for interactive elements ── */
button,
a {
  touch-action: manipulation;
}

/* ── Base heading styles ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: var(--text-4xl);
  line-height: 1.06;
}

h2 {
  font-size: var(--text-3xl);
  line-height: 1.12;
}

h3 {
  font-size: var(--text-xl);
  line-height: 1.2;
}

h4 {
  font-size: var(--text-lg);
  line-height: 1.3;
}

h5 {
  font-size: var(--text-base);
  line-height: 1.4;
}

h6 {
  font-size: var(--text-sm);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Italic emphasis in headings ── */
h1 em, h2 em, h3 em, h4 em {
  font-style: italic;
  color: var(--clay);
}

/* ── Base link styles ── */
a {
  color: var(--clay);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--clay-light);
}

/* ── Base image styles ── */
img {
  max-width: 100%;
  display: block;
}

/* ── Base paragraph ── */
p {
  line-height: 1.65;
}

/* ── Remove default button styling ── */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── Focus visible for keyboard users ── */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Remove focus outline for mouse users ── */
:focus:not(:focus-visible) {
  outline: none;
}
