/* ============================================================
   KENNEL LANDING — GLOBAL CSS
   Общие токены, цвета, контейнеры, кнопки, фон, типографика
   Главная идея: тёплый премиальный БЕЖЕВЫЙ фон по всему сайту
   ============================================================ */

:root,
[data-theme="light"] {
  /* ---------- COLORS ---------- */
  --color-bg: #f4eee3;
  --color-bg-soft: #f7f2e8;
  --color-surface: #fbf8f2;
  --color-surface-2: #f3ecdf;
  --color-surface-3: #ece3d3;
  --color-border: rgba(146, 120, 71, 0.20);
  --color-border-strong: rgba(146, 120, 71, 0.34);
  --color-divider: rgba(146, 120, 71, 0.18);

  --color-text: #1f1a14;
  --color-text-muted: rgba(31, 26, 20, 0.72);
  --color-text-soft: rgba(31, 26, 20, 0.54);
  --color-text-inverse: #f8f2e8;

  --color-primary: #2f4a34;
  --color-primary-hover: #243a28;
  --color-primary-active: #1b2c1e;
  --color-primary-soft: rgba(47, 74, 52, 0.10);

  --color-accent: #a17a32;
  --color-accent-hover: #8b6928;
  --color-accent-soft: rgba(161, 122, 50, 0.12);

  --color-brand-dark: #2d3e50;
  --color-brand-dark-soft: rgba(45, 62, 80, 0.10);

  --color-success: #4d6b43;
  --color-error: #8b3a32;

  /* ---------- TYPOGRAPHY ---------- */
  --font-display: 'Philosopher', serif;
  --font-body: 'Comfortaa', sans-serif;
  --font-copy: 'Source Serif 4', serif;
  --font-accent: 'Tenor Sans', sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.22vw, 1rem);
  --text-base: clamp(1rem, 0.98rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.04rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.15rem + 1.1vw, 2.3rem);
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 3.6rem);
  --text-3xl: clamp(2.6rem, 1.8rem + 3.4vw, 5rem);
  --text-hero: clamp(3rem, 2rem + 5vw, 6.5rem);

  /* ---------- SPACING ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- RADIUS ---------- */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 999px;

  /* ---------- SHADOWS ---------- */
  --shadow-xs: 0 2px 6px rgba(32, 24, 15, 0.04);
  --shadow-sm: 0 8px 18px rgba(32, 24, 15, 0.06);
  --shadow-md: 0 14px 30px rgba(32, 24, 15, 0.08);
  --shadow-lg: 0 22px 50px rgba(32, 24, 15, 0.12);
  --shadow-xl: 0 28px 80px rgba(32, 24, 15, 0.16);

  /* ---------- LAYOUT ---------- */
  --container-xs: 780px;
  --container-sm: 960px;
  --container-md: 1180px;
  --container-lg: 1280px;
  --container-xl: 1440px;

  /* ---------- EFFECTS ---------- */
  --transition-fast: 0.22s ease;
  --transition-base: 0.32s ease;
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- NAV OFFSET ---------- */
  --header-offset: 120px;
}

/* ---------- BASE ---------- */
html {
  scroll-padding-top: var(--header-offset);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(161, 122, 50, 0.05), transparent 20%),
    radial-gradient(circle at 100% 20%, rgba(47, 74, 52, 0.06), transparent 24%),
    linear-gradient(180deg, #f6f1e8 0%, #f4eee3 38%, #f1e9dc 100%);
  overflow-x: hidden;
}

body.app-is-ready {
  overflow-x: hidden;
}

body.navigation-lock {
  overflow: hidden;
}

::selection {
  background: rgba(161, 122, 50, 0.24);
  color: var(--color-text);
}

a,
button,
input,
textarea,
select,
svg,
path {
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

a {
  color: inherit;
}

p {
  max-width: 72ch;
}

strong {
  font-weight: 700;
}

/* ---------- ACCESSIBILITY ---------- */
:focus-visible {
  outline: 2px solid rgba(161, 122, 50, 0.9);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- APP ROOT ---------- */
#app-root {
  position: relative;
  min-height: 100vh;
}

#navigation-root,
#footer-root {
  position: relative;
  z-index: 20;
}

#sections-container {
  position: relative;
  z-index: 1;
}

/* ---------- COMMON MODULE SECTION ---------- */
.module-section {
  position: relative;
  width: 100%;
}

.module-section + .module-section {
  margin-top: 0;
}

/* ---------- COMMON CONTAINERS ---------- */
.container,
.section-container,
.block-container {
  width: min(var(--container-lg), calc(100% - 32px));
  margin-inline: auto;
}

.container--sm {
  width: min(var(--container-sm), calc(100% - 32px));
  margin-inline: auto;
}

.container--xl {
  width: min(var(--container-xl), calc(100% - 32px));
  margin-inline: auto;
}

/* ---------- TYPOGRAPHY HELPERS ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #8a6a2e;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-eyebrow::after {
  content: "";
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, rgba(161, 122, 50, 0.24), rgba(161, 122, 50, 0.88));
}

.section-title {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-text {
  color: var(--color-text-muted);
  font-family: var(--font-copy);
  font-size: var(--text-base);
  line-height: 1.75;
}

/* ---------- BUTTONS ---------- */
.button,
.btn {
  min-height: 52px;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.button--primary,
.btn--primary {
  color: var(--color-text-inverse);
  background: linear-gradient(135deg, var(--color-primary) 0%, #44644a 100%);
  border-color: rgba(47, 74, 52, 0.92);
  box-shadow: 0 14px 28px rgba(47, 74, 52, 0.18);
}

.button--primary:hover,
.btn--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #38553e 100%);
  box-shadow: 0 18px 34px rgba(47, 74, 52, 0.24);
}

.button--secondary,
.btn--secondary {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.48);
  border-color: var(--color-border);
  box-shadow: var(--shadow-xs);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.button--secondary:hover,
.btn--secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.button--ghost,
.btn--ghost {
  color: var(--color-text);
  background: transparent;
  border-color: var(--color-border);
}

.button--ghost:hover,
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.38);
}

/* ---------- CARDS ---------- */
.surface-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.40) 0%, rgba(247, 241, 232, 0.72) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.surface-card--soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(245, 237, 226, 0.56) 100%);
}

/* ---------- DIVIDERS ---------- */
.section-divider,
.divider {
  width: 100%;
  height: 1px;
  border: 0;
  background: linear-gradient(
    90deg,
    rgba(161, 122, 50, 0),
    rgba(161, 122, 50, 0.35),
    rgba(161, 122, 50, 0)
  );
}

/* ---------- MEDIA ---------- */
.media-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: #e3d7c4;
}

/* ---------- FALLBACK ---------- */
.module-fallback {
  padding: 48px 16px;
}

.module-fallback__inner {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(247, 241, 232, 0.74) 100%);
  border: 1px solid rgba(139, 58, 50, 0.18);
  box-shadow: var(--shadow-sm);
}

.module-fallback__inner h2 {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.1;
}

.module-fallback__inner p {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-copy);
  line-height: 1.7;
}

/* ---------- IMAGE RENDERING ---------- */
img {
  image-rendering: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  :root {
    --header-offset: 108px;
  }

  .container,
  .section-container,
  .block-container,
  .container--sm,
  .container--xl {
    width: min(100% - 24px, var(--container-lg));
  }
}

@media (max-width: 768px) {
  :root {
    --header-offset: 96px;
  }

  body {
    background:
      radial-gradient(circle at top left, rgba(161, 122, 50, 0.04), transparent 18%),
      linear-gradient(180deg, #f6f1e8 0%, #f3ecdf 55%, #efe6d8 100%);
  }
}

@media (max-width: 560px) {
  .container,
  .section-container,
  .block-container,
  .container--sm,
  .container--xl {
    width: min(100% - 20px, var(--container-lg));
  }

  .button,
  .btn {
    width: 100%;
  }
}

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

  a,
  button,
  input,
  textarea,
  select,
  svg,
  path {
    transition: none !important;
    animation: none !important;
  }
}