/**
 * Base — reset, typography, shared utilities.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  overflow-x: hidden; /* Safari-safe; clip alone is unsupported on older Safari */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

/* —— Utilities —— */

.container {
  width: min(100% - (var(--page-pad) * 2), var(--max-width));
  margin-inline: auto;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-label);
  font-size: var(--text-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink);
}

.label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--color-ink);
}

.rule {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: var(--space-sm) 0;
  background: var(--color-ink);
  border: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Fade-up on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (max-width: 480px) {
  :root {
    --header-h: 3.75rem;
    --space-lg: 2.25rem;
    --space-xl: 3.25rem;
    --text-body: 1rem;
  }

  .rule {
    margin: 0.75rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cinematic-hero__media img,
  .cinematic-hero__brand,
  .cinematic-hero__panel,
  .quality-map__art,
  .quality-pin__dot {
    animation: none !important;
  }
}
