/*
Theme Name: Legal Bureau
Theme URI: https://zakon8.ru
Author: earlcoda STUDIO
Author URI: https://earlcoda.ru/
Description: Премиальная кастомная тема для юридической компании и адвокатского бюро. Создана на основе эксклюзивной дизайн-системы.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: legal-bureau
Tags: legal, lawyer, law-firm, custom, responsive-layout, accessibility-ready
*/

/* ==========================================================================
   CSS DESIGN SYSTEM & ROOT VARIABLES (CALIBRATED TO DESIGN REFERENCE)
   ========================================================================== */
:root {
  /* Color Palette */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F9FA;
  --color-bg-warm: #F8F6F2;
  --color-bg-cream: #F9F7F4;
  --color-bg-cream-border: #ECE7E1;
  --color-surface: #FFFFFF;
  --color-surface-hover: #FAFBFC;
  
  /* Deep Navy / Slate Tones */
  --color-navy: #0E1A2B;
  --color-navy-dark: #0A131F;
  --color-navy-light: #16253B;
  --color-navy-card: #122034;
  
  /* Text Colors */
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --color-text-light: #9CA3AF;
  --color-text-white: #FFFFFF;
  --color-text-navy: #0E1A2B;
  
  /* Accent Colors */
  --color-burgundy: #6B1724;
  --color-burgundy-hover: #54111C;
  --color-burgundy-active: #400D15;
  --color-burgundy-light: #FBF2F3;
  
  /* Gold / Bronze Details */
  --color-gold: #A17A4D;
  --color-gold-hover: #8D673B;
  --color-gold-light: #F8F5F0;
  --color-gold-border: rgba(161, 122, 77, 0.25);

  /* Borders & Dividers */
  --color-border: #E5E7EB;
  --color-border-light: #F0F1F3;
  --color-border-dark: #1E2D42;

  /* Typography Scale */
  --font-serif: "Playfair Display", "PT Serif", "Merriweather", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --font-size-xs: 0.8125rem;  /* 13px */
  --font-size-sm: 0.9375rem;  /* 15px */
  --font-size-base: 1.0625rem;/* 17px */
  --font-size-md: 1.1875rem;  /* 19px */
  --font-size-lg: 1.375rem;   /* 22px */
  --font-size-xl: 1.625rem;   /* 26px */
  --font-size-2xl: 2rem;      /* 32px */
  --font-size-3xl: 2.5rem;    /* 40px */
  --font-size-4xl: 3.25rem;   /* 52px */
  --font-size-5xl: 3.75rem;   /* 60px */

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.08;
  --line-height-snug: 1.25;
  --line-height-base: 1.6;
  --line-height-relaxed: 1.75;

  /* Layout & Spacing */
  --container-width: 1260px;
  --container-padding: 24px;
  
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 104px;

  --section-space: 96px;
  --section-space-sm: 64px;

  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(14, 26, 43, 0.08), 0 4px 8px -2px rgba(14, 26, 43, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 28px -4px rgba(14, 26, 43, 0.09);

  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --anchor-offset: 96px;
}

@media (max-width: 1180px) {
  :root {
    --anchor-offset: 76px;
  }
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-base);
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

#about,
#services,
#trust,
#reviews,
#useful,
#contacts,
#colophon,
#consultation {
  scroll-margin-top: var(--anchor-offset);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.mobile-menu-active,
body.modal-active {
  overflow: hidden;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   UTILITY & LAYOUT CLASSES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.site-main {
  flex: 1 0 auto;
}

/* Section Header Utility */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-gold);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.2;
}

@media (max-width: 768px) {
  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  .section-title {
    font-size: var(--font-size-2xl);
  }
}

.section-lead {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  max-width: 680px;
  line-height: var(--line-height-base);
}

/* Buttons Design System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  min-height: 48px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-burgundy);
  color: var(--color-text-white);
  border: 1px solid var(--color-burgundy);
}

.btn-primary:hover {
  background-color: var(--color-burgundy-hover);
  border-color: var(--color-burgundy-hover);
  color: var(--color-text-white);
}

.btn-primary:active {
  background-color: var(--color-burgundy-active);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-bg-alt);
  border-color: #D1D5DB;
  color: var(--color-text-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 10px 20px;
  min-height: 40px;
  font-size: var(--font-size-xs);
}

/* Arrow Icon styling */
.icon-arrow-right {
  display: inline-block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition-fast);
}

.btn:hover .icon-arrow-right,
.link-arrow:hover .icon-arrow-right {
  transform: translateX(4px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
}

.link-arrow:hover {
  color: var(--color-burgundy);
}

/* Screen reader only utility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
