/* ==========================================================================
   Totality Estates — Base
   Reset-lite, document defaults, typographic base, shared primitives.
   Depends on tokens.css.
   ========================================================================== */

/* ---- Box model & resets ---- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--te-white);
  color: var(--te-ink);
  font-family: var(--te-font-body);
  font-size: var(--te-fs-17);
  line-height: var(--te-lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button { cursor: pointer; }

a { color: var(--te-accent); text-decoration: none; }
a:hover { color: var(--te-accent-hover); }

/* ---- Headings: Archivo display, negative tracking ---- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--te-font-display);
  font-weight: 700;
  color: var(--te-ink);
  letter-spacing: var(--te-track-22);
  line-height: var(--te-lh-display);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* ---- Layout primitives ---- */
.te-container {
  width: 100%;
  max-width: var(--te-content-max);
  margin-inline: auto;
  padding-inline: var(--te-gutter);
}

/* Intrinsic auto-fit grid: the design's core responsive pattern.
   Set --te-grid-floor per use (defaults to 300px general cards). */
.te-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--te-grid-floor, 300px)), 1fr));
  gap: var(--te-grid-gap, 26px);
}

/* ---- Uppercase eyebrow / label pattern ---- */
.te-eyebrow {
  font-size: var(--te-fs-14);
  font-weight: 600;
  letter-spacing: var(--te-track-label);
  text-transform: uppercase;
  color: var(--te-accent);
}

/* Rule + eyebrow lockup (44x2px accent bar + label) */
.te-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.te-kicker::before {
  content: "";
  width: 44px;
  height: 2px;
  background: var(--te-accent);
}

/* ---- Buttons ---- */
.te-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--te-font-body);
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--te-r-11);
  cursor: pointer;
  transition: background var(--te-hover-transition), color var(--te-hover-transition), border-color var(--te-hover-transition);
}
.te-btn--primary {
  background: var(--te-accent);
  color: var(--te-white);
  font-size: var(--te-fs-18);
  padding: 19px 34px;
}
.te-btn--primary:hover { background: var(--te-accent-hover); color: var(--te-white); }

.te-btn--ghost-dark {
  background: transparent;
  color: var(--te-white);
  border-color: var(--te-on-dark-border-24);
  font-size: var(--te-fs-18);
  padding: 20px 34px;
}
.te-btn--ghost-dark:hover { border-color: var(--te-on-dark-62); color: var(--te-white); }

/* ---- Accessibility helpers ---- */
.te-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--te-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

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