/* ==========================================================================
   Reset & base
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

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

ul {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 600;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--luz);
  color: var(--noir);
}

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

.section {
  position: relative;
  background: var(--surface);
  color: var(--on-surface);
  padding-block: var(--space-section);
  transition: background var(--dur-med) var(--ease-out);
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

[id] {
  scroll-margin-top: 5.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--on-surface-soft);
  text-transform: none;
}

.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 1px;
  background: var(--luz);
  flex-shrink: 0;
}

.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;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transform: translateY(-120%);
  background: var(--luz);
  color: var(--noir);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  padding: 0.75em 1.25em;
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95em 1.7em;
  border-radius: var(--radius-sm);
  transition: transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.btn-primary {
  background: var(--luz);
  color: var(--noir);
  border: 1px solid var(--luz);
}

.btn-primary:hover {
  background: var(--luz-bright);
  border-color: var(--luz-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--on-surface);
}

.btn-ghost:hover {
  border-color: var(--luz);
  color: var(--luz);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Luz signature glow treatment */
.luz-word {
  position: relative;
  color: var(--luz);
  font-weight: 700;
}

.luz-word::after {
  content: "";
  position: absolute;
  inset: -60% -40%;
  background: radial-gradient(closest-side, rgba(232, 162, 61, 0.35), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Reveal-on-scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 70ms);
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: var(--space-xl);
  }
}
