/* ============================================================
   Cotswold Capital — Base / Reset (Concept III)
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
  min-height: 100vh;
}

/* Lenis runtime hooks (do not constrain html/body height) */
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

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

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

p { text-wrap: pretty; max-width: 65ch; }
h1, h2, h3, h4 { text-wrap: balance; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--d-quick) var(--ease-out);
}

a.inline-link {
  color: var(--blue);
  border-bottom: 1px solid color-mix(in oklab, var(--blue) 30%, transparent);
  transition: border-color var(--d-base) var(--ease-out),
              color var(--d-base) var(--ease-out);
}
a.inline-link:hover { border-bottom-color: var(--blue); }

::selection {
  background: color-mix(in oklab, var(--rose) 28%, var(--surface));
  color: var(--ink);
}

/* Display family */
.font-display {
  font-family: var(--font-display);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  font-weight: 320;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

/* Custom cursor — only when JS confirms support */
@media (hover: hover) and (pointer: fine) {
  body[data-cursor="custom"],
  body[data-cursor="custom"] * {
    cursor: none !important;
  }
}

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