/* ============================================================
   Steep 4x4 website: base (reset, typography, links, focus, motion)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--site-header-h) + 16px);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "calt" 0; /* stops Inter rendering "4x4" as "4×4" */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }

img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"], .list-reset { padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Typography ---------- */
h1, h2, h3, h4,
.display-hero, .h1, .h2, .h3, .h4,
.display, .display-sm, .display-lg {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-display);
  text-wrap: balance;
}
h1, .h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2, .h2 { font-size: var(--fs-h2); line-height: .95; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.02; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 600; line-height: 1.1; }
.display-hero { font-size: var(--fs-hero); line-height: .88; letter-spacing: .005em; }
/* Configurator-compatible sizes */
.display-lg { font-size: var(--fs-display-lg); }
.display    { font-size: var(--fs-display); }
.display-sm { font-size: var(--fs-display-sm); font-weight: 600; }

p, li { text-wrap: pretty; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: var(--measure); }
.small, small { font-size: var(--fs-small); }
.fine { font-size: var(--fs-xs); line-height: 1.5; color: var(--text-3); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.accent { color: var(--accent-text); }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
strong, b { font-weight: 600; color: var(--text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--text-3);
}
.eyebrow--accent { color: var(--accent-text); }
.eyebrow--rule::before {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7;
}

/* Long-form copy */
.prose { max-width: var(--measure); color: var(--text-2); }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--text); }

/* ---------- Links ---------- */
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast), color var(--t-fast);
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.theme-studio :focus-visible, .section--studio :focus-visible { outline-color: var(--studio-ink); }

/* ---------- Icons (sprite lives in _partials/header.html) ---------- */
.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 28px; height: 28px; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.container--bleed { max-width: none; }

.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, 12px); align-items: center; }
.grid { display: grid; gap: var(--grid-gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

main { display: block; }
main:focus { outline: none; }

/* ---------- Motion: scroll reveal ----------
   Only hides content once JS has confirmed it can reveal it (html.js). */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--reveal-shift), 0);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 1ms);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(.965); }
.js [data-reveal="left"] { transform: translate3d(calc(var(--reveal-shift) * -1), 0, 0); }
.js [data-reveal="right"] { transform: translate3d(var(--reveal-shift), 0, 0); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}
