/* ============================================
   FENIX MULTIGLOBAL — base.css
   Reset, переменные, типографика, утилиты
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* <picture> is purely a wrapper for source selection — make it transparent
   to layout so CSS rules targeting child <img> (width: 100%, object-fit, etc.)
   still apply correctly. Without this, picture is inline and breaks image sizing. */
picture {
  display: contents;
}

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

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

ul, ol { list-style: none; }

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

/* ─── CSS VARIABLES (V2 design tokens) ─── */
:root {
  /* Colors */
  --white:    #FFFFFF;
  --off:      #F8F5F2;
  --light:    #F0EBE5;
  --line:     #E5DFD8;
  --dark:     #1A1A1A;
  --mid:      #4D4540;
  --soft:     #6E665C;          /* поднят с #8A8078 для лучшего контраста (a11y) */
  --soft-on-dark: #B4ACA4;
  --terra:    #8B3A3A;
  --terra-d:  #6E2D2D;
  --terra-lt: #B06060;
  --terra-bg: rgba(139, 58, 58, 0.06);
  --terra-bg-strong: rgba(139, 58, 58, 0.10);
  --shadow-card: 0 8px 32px rgba(139, 58, 58, 0.10);
  --shadow-soft: 0 4px 20px rgba(26, 26, 26, 0.06);

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
  --radius: 0;                  /* у нас остроугольный дизайн */

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--dark);
}

p {
  line-height: 1.7;
}

::selection {
  background: var(--terra);
  color: var(--white);
}

/* ─── UTILITIES ─── */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.section-alt {
  background: var(--off);
}

.section-dark {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

/* eyebrow / label */
.section-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 12px;
}

/* big section heading */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}

.section-title em {
  font-style: italic;
  color: var(--terra);
}

/* small accent bar under title */
.terra-bar {
  width: 48px;
  height: 3px;
  background: var(--terra);
  margin-bottom: 20px;
  border: none;
}

.terra-bar-center {
  margin-left: auto;
  margin-right: auto;
}

/* body text */
.body-text {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--mid);
}

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

.muted { color: var(--soft); }

.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ─── FOCUS / KEYBOARD A11Y ─── */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 1px;
}

/* skip-to-content link — visible only on focus */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: top var(--t-fast);
}

.skip-to-content:focus {
  top: 16px;
  outline: 2px solid var(--terra-lt);
  outline-offset: 2px;
}

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

/* ─── PAGE HEADER (internal pages) ─── */
.page-header {
  padding: calc(var(--nav-height) + 80px) var(--space-xl) 60px;
  background: var(--off);
  border-bottom: 1px solid var(--line);
}

.page-header .container {
  padding: 0;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--soft);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--soft);
  transition: color var(--t-fast);
}

.breadcrumbs a:hover {
  color: var(--terra);
}

.breadcrumbs .sep {
  color: var(--line);
}

.breadcrumbs .current {
  color: var(--dark);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.page-title em {
  font-style: italic;
  color: var(--terra);
}

.page-desc {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--mid);
  max-width: 640px;
  font-weight: 300;
}
