/* White Stone Realty - dark luxury theme. Component styles.
   Palette variables (--ws-*) live in application.css :root. */

html { scroll-behavior: smooth; }

/* Якорные блоки приземляются ниже фиксированной шапки */
section[id^="ws-"] { scroll-margin-top: 90px; }

.ws-body {
  background: var(--ws-bg);
  color: var(--ws-text);
  font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

.ws-body.ws-locked { overflow: hidden; }

.ws-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.ws-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ws-accent);
  margin-bottom: var(--space-5);
}

/* ===================== Переключатель темы ===================== */
.ws-theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ws-line-strong);
  background: transparent;
  color: var(--ws-ink);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.ws-theme-toggle:hover { border-color: var(--ws-accent); color: var(--ws-accent); }
.ws-theme-icon { width: 18px; height: 18px; }
html[data-theme="light"] .ws-theme-icon--sun { display: none; }
html:not([data-theme="light"]) .ws-theme-icon--moon { display: none; }

/* ===================== Светлая тема ===================== */
html[data-theme="light"] {
  --ws-bg: #ffffff;
  --ws-bg-2: #f6f4f0;
  --ws-panel: #ffffff;
  --ws-panel-2: #f1ede7;
  --ws-ink: #15130f;
  --ws-text: #4f4b44;
  --ws-muted: #857d73;
  --ws-accent: #9c7c4e;
  --ws-accent-soft: #b89668;
  --ws-accent-dim: #b9a98c;
  --ws-line: rgba(20, 19, 15, 0.12);
  --ws-line-strong: rgba(20, 19, 15, 0.22);
}

html[data-theme="light"] .ws-hero {
  background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #f6f4f0 65%);
}

html[data-theme="light"] .ws-commercial {
  background: radial-gradient(80% 120% at 50% 0%, #faf8f4, #ffffff 70%);
}

html[data-theme="light"] .ws-header--scrolled {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 0 var(--ws-line);
}

html[data-theme="light"] .ws-form-card { box-shadow: 0 24px 60px rgba(20, 19, 15, 0.1); }

html[data-theme="light"] .ws-form-card .form-input,
html[data-theme="light"] .ws-form-card .form-select,
html[data-theme="light"] .modal .form-input,
html[data-theme="light"] .modal .form-select { background: #ffffff; }

html[data-theme="light"] .ws-logo-img {
  box-shadow: 0 20px 60px rgba(20, 19, 15, 0.22), 0 0 0 1px var(--ws-line);
}

html[data-theme="light"] .modal { background: rgba(20, 19, 15, 0.45); }

/* Текст на акцентных кнопках в светлой теме — белый (контраст на бронзе) */
html[data-theme="light"] .ws-btn--primary,
html[data-theme="light"] .ws-form-card .btn,
html[data-theme="light"] .ws-form-card .btn-cta,
html[data-theme="light"] .modal .btn,
html[data-theme="light"] .modal .btn-cta { color: #ffffff; }

.ws-section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--ws-ink);
}

/* ===================== Кнопки ===================== */
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-4) var(--space-10);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.ws-btn--primary { background: var(--ws-accent); color: #1a1610; border-color: var(--ws-accent); }
.ws-btn--primary:hover { background: var(--ws-accent-soft); border-color: var(--ws-accent-soft); }
.ws-btn--ghost { background: transparent; color: var(--ws-ink); border-color: var(--ws-line-strong); }
.ws-btn--ghost:hover { border-color: var(--ws-accent); color: var(--ws-accent); }
.ws-btn--light { background: var(--ws-ink); color: var(--ws-bg); }
.ws-btn--light:hover { opacity: 0.88; }

/* ===================== Header ===================== */
.ws-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.ws-header--scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--ws-line);
}

.ws-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.ws-header-address { font-size: 0.9375rem; color: var(--ws-text); white-space: nowrap; }

.ws-header-phone {
  justify-self: center;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ws-ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.ws-header-actions { justify-self: end; display: flex; align-items: center; gap: var(--space-5); }

.ws-callback-btn {
  border: 1px solid var(--ws-line-strong);
  background: transparent;
  color: var(--ws-ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.ws-callback-btn:hover { border-color: var(--ws-accent); color: var(--ws-accent); }

.ws-burger {
  width: 30px;
  height: 20px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.ws-burger span { display: block; height: 1.5px; width: 100%; background: var(--ws-ink); }

/* ===================== Hero ===================== */
.ws-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-24) var(--space-6) var(--space-16);
  background:
    radial-gradient(120% 80% at 50% 0%, #15130f 0%, var(--ws-bg) 60%),
    radial-gradient(80% 60% at 80% 90%, rgba(194, 169, 131, 0.08) 0%, transparent 60%);
}

.ws-hero-inner { display: flex; flex-direction: column; align-items: center; max-width: 880px; }

.ws-logo {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-out);
}

.ws-logo:hover { transform: translateY(-6px) scale(1.02); }

.ws-logo-img {
  width: min(52vw, 260px);
  height: auto;
  display: block;
  border-radius: var(--radius-full);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6),
              0 0 0 1px var(--ws-line);
}

.ws-hero-title {
  margin-top: var(--space-10);
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--ws-ink);
}

.ws-hero-intro {
  margin-top: var(--space-6);
  max-width: 640px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ws-text);
}

.ws-hero-cta { margin-top: var(--space-10); display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; }

.ws-hero-scroll {
  margin-top: var(--space-12);
  font-size: 1.4rem;
  color: var(--ws-accent);
  text-decoration: none;
  animation: ws-bounce 2s infinite;
}

@keyframes ws-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ===================== Услуги ===================== */
.ws-services { padding: clamp(4rem, 9vw, 8rem) 0; border-top: 1px solid var(--ws-line); }

.ws-services-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.ws-services-head { position: sticky; top: 120px; }

.ws-services-list { list-style: none; display: grid; gap: var(--space-8); }

.ws-services-list li { padding-bottom: var(--space-8); border-bottom: 1px solid var(--ws-line); }
.ws-services-list li:last-child { border-bottom: none; padding-bottom: 0; }

.ws-services-list h3 {
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ws-ink);
  margin-bottom: var(--space-3);
}

.ws-services-list p { font-size: 1rem; line-height: 1.7; color: var(--ws-text); }

/* ===================== Преимущества ===================== */
.ws-advantages { padding: clamp(3.5rem, 8vw, 7rem) 0; background: var(--ws-bg-2); border-top: 1px solid var(--ws-line); }

.ws-advantages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

.ws-advantage { text-align: left; }

.ws-advantage-icon { display: block; width: 34px; height: 34px; color: var(--ws-accent); margin-bottom: var(--space-5); }
.ws-advantage-icon svg { width: 100%; height: 100%; }

.ws-advantage-title { font-size: 1.0625rem; font-weight: 500; color: var(--ws-ink); margin-bottom: var(--space-3); }
.ws-advantage-text { font-size: 0.9375rem; line-height: 1.6; color: var(--ws-muted); }

/* ===================== Секции заявок ===================== */
.ws-section { padding: clamp(4rem, 9vw, 8rem) 0; border-top: 1px solid var(--ws-line); }
.ws-section--alt { background: var(--ws-bg-2); }

.ws-section-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.ws-section .ws-section-title { margin-bottom: var(--space-6); }

.ws-section-body, .ws-section-body p {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--ws-text);
}

.ws-section-body p + p { margin-top: var(--space-4); }

/* Карточка формы — тёмная */
.ws-form-card {
  background: var(--ws-panel);
  border: 1px solid var(--ws-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.ws-form-title { font-size: 1.375rem; font-weight: 500; color: var(--ws-ink); margin-bottom: var(--space-2); }
.ws-form-subtitle { font-size: 0.9375rem; color: var(--ws-muted); margin-bottom: var(--space-6); line-height: 1.5; }

/* ===================== Переопределение переиспользуемых форм (leads) под тёмную тему ===================== */
.ws-form-card .form-input,
.ws-form-card .form-select,
.modal .form-input,
.modal .form-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ws-line-strong);
  color: var(--ws-ink);
  border-radius: var(--radius-md);
}

.ws-form-card .form-input::placeholder,
.modal .form-input::placeholder { color: var(--ws-muted); }

.ws-form-card .form-input:focus,
.modal .form-input:focus {
  border-color: var(--ws-accent);
  box-shadow: 0 0 0 3px rgba(194, 169, 131, 0.15);
  outline: none;
}

.ws-form-card .form-checkbox,
.modal .form-checkbox { color: var(--ws-muted); accent-color: var(--ws-accent); }
.ws-form-card .form-checkbox a,
.modal .form-checkbox a { color: var(--ws-accent); }

.ws-form-card .btn,
.ws-form-card .btn-cta,
.modal .btn,
.modal .btn-cta {
  background: var(--ws-accent);
  color: #1a1610;
  border: 1px solid var(--ws-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
}

.ws-form-card .btn:hover,
.ws-form-card .btn-cta:hover,
.modal .btn:hover,
.modal .btn-cta:hover { background: var(--ws-accent-soft); border-color: var(--ws-accent-soft); }

/* Экран «спасибо» */
.ws-form-card .lead-success-title,
.modal .lead-success-title { color: var(--ws-ink); }
.ws-form-card .lead-success-text,
.modal .lead-success-text { color: var(--ws-muted); }
.ws-form-card .lead-success-icon,
.modal .lead-success-icon { background: var(--ws-accent); color: #1a1610; }

/* ===================== Модалка обратного звонка (тёмная) ===================== */
.modal { background: rgba(0, 0, 0, 0.7); }
.modal-dialog { background: var(--ws-panel); border: 1px solid var(--ws-line); color: var(--ws-text); }
.modal-title { color: var(--ws-ink); }
.modal-subtitle { color: var(--ws-muted); }
.modal-close { color: var(--ws-muted); }
.modal-close:hover { color: var(--ws-ink); }

/* ===================== УТП ===================== */
.ws-usp { padding: clamp(4rem, 9vw, 8rem) 0; border-top: 1px solid var(--ws-line); }

.ws-usp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.ws-usp-item { padding: var(--space-2) 0; }
.ws-usp-icon { display: block; width: 30px; height: 30px; color: var(--ws-accent); margin-bottom: var(--space-4); }
.ws-usp-icon svg { width: 100%; height: 100%; }
.ws-usp-item h3 { font-size: 1.125rem; font-weight: 500; color: var(--ws-ink); margin-bottom: var(--space-2); }
.ws-usp-item p { font-size: 0.9375rem; line-height: 1.6; color: var(--ws-muted); }

.ws-usp-cta {
  grid-column: 1 / -1;
  margin-top: var(--space-6);
  border: 1px solid var(--ws-line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(194, 169, 131, 0.08), transparent 70%);
}

.ws-usp-cta .ws-usp-icon { margin: 0 auto var(--space-4); }
.ws-usp-cta h3 { font-size: 1.5rem; color: var(--ws-ink); margin-bottom: var(--space-2); }
.ws-usp-cta p { color: var(--ws-text); margin-bottom: var(--space-6); }

/* ===================== Коммерческая ===================== */
.ws-commercial {
  padding: clamp(4rem, 9vw, 8rem) 0;
  text-align: center;
  border-top: 1px solid var(--ws-line);
  background:
    radial-gradient(80% 120% at 50% 0%, #15130f, var(--ws-bg) 70%);
}

.ws-commercial-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 300; color: var(--ws-ink); margin-bottom: var(--space-5); }
.ws-commercial-text { max-width: 600px; margin: 0 auto var(--space-8); color: var(--ws-muted); font-size: 1.0625rem; line-height: 1.7; }

/* ===================== Footer ===================== */
.ws-footer { background: var(--ws-bg-2); border-top: 1px solid var(--ws-line); padding: var(--space-12) 0; }

.ws-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); }

.ws-footer-brand {
  display: flex; align-items: center; gap: var(--space-4);
  font-size: 1.0625rem; font-weight: 500; letter-spacing: 0.06em; color: var(--ws-ink);
}

.ws-footer-logo { width: 52px; height: 52px; border-radius: var(--radius-full); }

.ws-footer-contacts { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); color: var(--ws-muted); font-size: 0.9375rem; }
.ws-footer-contacts a { color: var(--ws-ink); text-decoration: none; font-weight: 500; }
.ws-footer-social { display: flex; gap: var(--space-4); margin-top: var(--space-2); }
.ws-footer-social a { color: var(--ws-muted); font-weight: 400; }
.ws-footer-social a:hover { color: var(--ws-accent); }

/* ===================== Слайд-аут меню ===================== */
.ws-menu {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out), visibility var(--duration-normal) var(--ease-out);
}

.ws-menu--open { opacity: 1; visibility: visible; }

.ws-menu-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(88vw, 420px);
  background: var(--ws-panel);
  border-left: 1px solid var(--ws-line);
  padding: var(--space-16) var(--space-10) var(--space-10);
  display: flex; flex-direction: column; gap: var(--space-8);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-in-out);
  overflow-y: auto;
}

.ws-menu--open .ws-menu-panel { transform: translateX(0); }

.ws-menu-close {
  position: absolute; top: var(--space-5); right: var(--space-6);
  width: 44px; height: 44px; border: none; background: transparent;
  font-size: 2rem; line-height: 1; color: var(--ws-ink); cursor: pointer;
}

.ws-menu-group { display: flex; flex-direction: column; gap: var(--space-3); }

.ws-menu-heading {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ws-accent); margin-bottom: var(--space-2);
}

.ws-menu-link { font-size: 1.5rem; font-weight: 300; color: var(--ws-ink); text-decoration: none; transition: color var(--duration-fast) var(--ease-out); }
a.ws-menu-link:hover { color: var(--ws-accent); }

.ws-menu-link--disabled { color: var(--ws-muted); cursor: default; display: flex; align-items: baseline; gap: var(--space-3); opacity: 0.6; }
.ws-menu-link--disabled em { font-size: 0.6875rem; font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ws-accent-dim); }

.ws-menu-phone { margin-top: auto; font-size: 1.25rem; font-weight: 500; color: var(--ws-ink); text-decoration: none; }

/* ===================== Окно «О компании» ===================== */
.ws-about {
  position: fixed; inset: 0; z-index: 2100;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
  background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out), visibility var(--duration-normal) var(--ease-out);
}

.ws-about--open { opacity: 1; visibility: visible; }

.ws-about-dialog {
  position: relative;
  background: var(--ws-panel);
  border: 1px solid var(--ws-line);
  border-radius: var(--radius-xl);
  max-width: 560px; width: 100%;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  transform: translateY(16px);
  transition: transform var(--duration-normal) var(--ease-out);
}

.ws-about--open .ws-about-dialog { transform: translateY(0); }

.ws-about-close {
  position: absolute; top: var(--space-4); right: var(--space-5);
  width: 44px; height: 44px; border: none; background: transparent;
  font-size: 2rem; line-height: 1; color: var(--ws-muted); cursor: pointer;
}

.ws-about-logo { width: 110px; height: 110px; border-radius: var(--radius-full); margin: 0 auto var(--space-5); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); }
.ws-about-title { font-size: 1.625rem; font-weight: 500; letter-spacing: 0.04em; color: var(--ws-ink); margin-bottom: var(--space-5); }
.ws-about-text, .ws-about-text p { font-size: 1rem; line-height: 1.7; color: var(--ws-text); }
.ws-about-contacts { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--ws-line); display: flex; flex-direction: column; gap: var(--space-1); }
.ws-about-contacts a { font-size: 1.25rem; font-weight: 500; color: var(--ws-ink); text-decoration: none; }
.ws-about-contacts span { color: var(--ws-muted); font-size: 0.9375rem; }

/* ===================== Адаптив ===================== */
@media (max-width: 1024px) {
  .ws-advantages-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
}

@media (max-width: 900px) {
  .ws-section-grid, .ws-services-grid { grid-template-columns: 1fr; gap: var(--space-10); }
  .ws-services-head { position: static; }
  .ws-usp-grid { grid-template-columns: 1fr; }
  .ws-header-inner { grid-template-columns: 1fr auto; }
  .ws-header-phone { display: none; }
}

@media (max-width: 560px) {
  .ws-advantages-grid { grid-template-columns: 1fr; }
  .ws-callback-btn { display: none; }
  .ws-header-address { font-size: 0.8125rem; white-space: normal; }
  .ws-footer-inner { flex-direction: column; align-items: flex-start; }
  .ws-footer-contacts { align-items: flex-start; }
  .ws-hero-cta { flex-direction: column; width: 100%; }
  .ws-hero-cta .ws-btn { width: 100%; }
}
