/* ==========================================================================
   Base — reset, typography, accessibility primitives, global utilities
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px); /* anchor offset for fixed nav */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ── Accessibility ─────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--geo-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--accent-deep);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }

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

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

.section { padding-block: var(--section-pad); }
.section--alt { background-color: var(--bg-secondary); }

.section__header { margin-bottom: 64px; }

.section__label {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-wrap: balance;
}

.section__subtitle {
  max-width: 640px;
  margin-top: 16px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* ── Scroll reveal (enabled only when JS adds .js to <html>) ───────── */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── Reduced motion: honour the OS setting everywhere ──────────────── */
@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;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── Print: a clean, CV-like hard copy ─────────────────────────────── */
@media print {
  .nav, .skip-link, .hero__bg, .hero__scene, .hero__cta,
  .contact-card__form, .gallery, .footer__grid, .footer__signature, .lightbox, .tour { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .hero { min-height: 0; background: #fff; color: #000; }
  .hero__content { padding: 0 0 24px; }
  .hero__name, .hero__title, .hero__sub, .hero__pitch { color: #000 !important; }
  .section { padding-block: 24px; }
  .section--alt { background: #fff; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="mailto:"]::after { content: ""; }
}
