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

html {
  scroll-behavior: smooth;
}

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

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

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

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Base ---------- */
body {
  background: var(--bg-light);
  color: var(--text-on-light);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 600;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}

p {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

main {
  display: block;
  overflow-x: clip;
  position: relative;
  z-index: 6;
}

section {
  position: relative;
}

.section-pad {
  padding-block: var(--space-xl);
}

@media (max-width: 768px) {
  .section-pad {
    padding-block: var(--space-lg);
  }
}

.section--light {
  background: var(--bg-light);
  color: var(--text-on-light);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--panel {
  background: var(--bg-panel);
  color: var(--text-on-dark);
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.text-muted {
  color: var(--text-on-dark-muted);
}
.section--light .text-muted {
  color: var(--text-on-light-muted);
}

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

.text-center {
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2.1rem;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
}

.btn span {
  position: relative;
  z-index: 2;
  transition: color var(--dur-fast) var(--ease-out);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateY(101%);
  transition: transform var(--dur-med) var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: var(--black);
}
.btn--primary::before {
  background: var(--black);
}
.btn--primary:hover span,
.btn--primary:focus-visible span {
  color: var(--cream);
}

.btn--outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 1px solid var(--border-on-dark);
}
.btn--outline::before {
  background: var(--accent);
}
.btn--outline:hover span,
.btn--outline:focus-visible span {
  color: var(--black);
}

.section--light .btn--outline {
  color: var(--text-on-light);
  border-color: var(--border-on-light);
}

.btn--dark {
  background: var(--black);
  color: var(--cream);
}
.btn--dark::before {
  background: var(--accent);
}
.btn--dark:hover span {
  color: var(--black);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Link underline hover ---------- */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-underline:hover::after,
.link-underline:focus-visible::after,
.link-underline.is-active::after {
  transform: scaleX(1);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-sm);
  z-index: 10000;
  background: var(--accent);
  color: var(--black);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-sm);
}

/* ---------- Visually hidden ---------- */
.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;
}

/* ---------- Focus states ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Icon ---------- */
.icon {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
}

/* ---------- Logo mark ---------- */
.logo-mark {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Grid helpers ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* ---------- Reveal base state (JS adds .is-visible) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
