/* Engine Profit — Base: reset, elements, typography, utilities */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Body is locked while the preloader / mobile menu owns the screen */
body.is-locked {
  overflow: hidden;
}

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

svg {
  fill: currentColor;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h2 {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
}

h3 {
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
}

p {
  color: var(--color-text-secondary);
}

::selection {
  background: var(--color-gold-soft);
  color: var(--color-text-primary);
}

html {
  scrollbar-color: var(--color-border-strong) var(--color-bg);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

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

::-webkit-scrollbar-thumb {
  background-color: var(--color-border-strong);
  border-radius: var(--radius-full);
  border: 3px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-gold);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Layout utilities ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.container-narrow {
  max-width: var(--container-max-narrow);
}

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

.section-inner {
  position: relative;
  z-index: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Typography helpers ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-gold);
}

.eyebrow::before {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: currentColor;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}

.section-head p {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  max-width: 60ch;
}

@media (max-width: 640px) {
  .section-head {
    margin-inline: auto;
    text-align: center;
  }

  .section-head p {
    margin-inline: auto;
  }
}

.text-balance {
  text-wrap: balance;
}

.gold-text {
  color: var(--color-gold);
}

.muted {
  color: var(--color-text-muted);
}

/* ---- Icon utility ---- */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}
