/*
 * Мебель Дельта — Base & Reset
 * Fonts loaded via <link> in <head> — no @import here (#9)
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
body { font-family: var(--f-body); color: var(--c-text); background: var(--c-ivory); line-height: 1.6; }
h1,h2,h3,h4,h5,h6 { font-family: var(--f-heading); font-weight: 600; line-height: 1.2; letter-spacing: 0.02em; }
a { text-decoration: none; color: inherit; transition: color var(--duration) var(--ease); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--f-body); cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: var(--f-body); }

/* === Focus Visible (#2) — global focus ring === */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}
.form-input:focus-visible {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(201,169,97,0.25);
}
/* Remove outline for mouse users, keep for keyboard */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* === Skip to content link (#28) === */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-3) var(--sp-6);
  background: var(--c-gold);
  color: var(--c-graphite);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: var(--sp-4);
}

/* === Container === */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }

/* === Section === */
.section { padding: var(--sp-20) 0; }
.section--lg { padding: var(--sp-24) 0; }
@media (min-width: 768px) { .section { padding: var(--sp-24) 0; } .section--lg { padding: var(--sp-32) 0; } }
.section--dark { background: var(--c-graphite); color: #fff; }
.section--light { background: var(--c-light); }
.section--ivory { background: var(--c-ivory); }
.section--emerald { background: var(--c-emerald); color: #fff; }
.section--white { background: var(--c-white); }

/* === Grid === */
.grid { display: grid; gap: var(--sp-8); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* === Flex === */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--col { flex-direction: column; }
.flex--wrap { flex-wrap: wrap; }
.flex--gap-sm { gap: var(--sp-4); }
.flex--gap { gap: var(--sp-6); }
.flex--gap-lg { gap: var(--sp-8); }

/* === Typography === */
.text-center { text-align: center; }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-gold { color: var(--c-gold); }
.text-emerald { color: var(--c-emerald); }
.text-muted { color: var(--c-text-muted); }
.text-light { color: var(--c-text-light); }
.text-white { color: #fff; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.2em; }
.uppercase { text-transform: uppercase; }
.font-serif { font-family: var(--f-heading); }

.section__title { font-size: var(--fs-4xl); margin-bottom: var(--sp-4); }
.section__subtitle { color: var(--c-text-muted); max-width: 42rem; margin: 0 auto; }
@media (min-width: 768px) { .section__title { font-size: var(--fs-5xl); } }

/* === Reduced Motion (#32) === */
@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;
  }
  .marquee__track { animation: none; }
  .hgallery__track { animation: none; }
  .fade-in { opacity: 1; transform: none; }
}
