/* ============================================================
   LUMÉRA — Base: reset, типографика, секции, темы, кнопки
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--noir);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, picture { display: block; max-width: 100%; }
svg { fill: currentColor; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--gold); color: var(--noir); }

/* — Атмосферное зерно — */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* — Типографика — */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
}
em { font-style: italic; }

/* — Раскладка — */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section__head { max-width: 760px; margin-bottom: clamp(2.2rem, 1.4rem + 3vw, 3.8rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }

.section__title {
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-title);
  color: var(--cream);
  margin-top: .5rem;
}
.section__intro {
  margin-top: 1.1rem;
  color: var(--muted);
  max-width: 54ch;
}
.section__head--center .section__intro { margin-inline: auto; }

/* — Eyebrow — */
.eyebrow {
  display: inline-flex; align-items: center; gap: .8em;
  font-size: var(--text-eyebrow); font-weight: 600;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: ""; width: clamp(20px, 4vw, 40px); height: 1px;
  background: var(--grad-gold);
}

/* ===== Светлая тема секции ===== */
.section--light { background: var(--paper); color: var(--ink); }
.section--light .section__title { color: var(--ink); }
.section--light .section__intro { color: var(--muted-light); }
.section--light .eyebrow { color: var(--gold-deep); }

/* — Кнопки — */
.btn {
  --btn-py: .95rem; --btn-px: 1.7rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  letter-spacing: .04em; line-height: 1;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.btn svg { flex: none; }
.btn--primary { background: var(--grad-gold); color: #1B1610; box-shadow: var(--glow-gold); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 26px 60px -30px rgba(205, 186, 138, .85); }
.btn--outline { border: 1px solid rgba(241, 235, 225, .5); color: var(--cream); }
.btn--outline:hover { border-color: var(--gold-bright); color: var(--gold-bright); transform: translateY(-2px); }
.section--light .btn--outline { border-color: var(--line-light); color: var(--ink); }
.section--light .btn--outline:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.btn--sm { --btn-py: .6rem; --btn-px: 1.1rem; font-size: .78rem; }
.btn--lg { --btn-py: 1.05rem; --btn-px: 2rem; font-size: .98rem; }

/* — Доступность — */
:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px;
}
.skip-link {
  position: fixed; top: .6rem; left: 50%; translate: -50% -160%; z-index: 10000;
  background: var(--gold); color: var(--noir); padding: .6rem 1.2rem;
  border-radius: var(--radius-pill); font-weight: 600;
  transition: translate var(--dur-fast) var(--ease);
}
.skip-link:focus { translate: -50% 0; }

/* — Reveal — */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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