/*
Theme Name: Elenis Ucentr
Theme URI: https://elenis-study.ru/
Author: Elenis Beauty
Description: Учебный центр Elenis Beauty — кастомная тема с CPT services и shadcn-токенами.
Version: 1.0.1
Text Domain: elenis-ucentr
*/

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --border: 240 5.9% 90%;
  --primary: 340 45% 32%;
  --primary-foreground: 0 0% 98%;
  --accent: 340 30% 96%;
  --accent-foreground: 340 45% 28%;
  --radius: 0.5rem;
  --card: 0 0% 100%;
  --ring: 340 45% 32%;
  --hero-overlay: linear-gradient(135deg, hsl(340 20% 12% / 0.55), hsl(240 10% 8% / 0.35));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: hsl(var(--primary)); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { opacity: 0.85; }

.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px);
  background: hsl(var(--background) / 0.9);
  border-bottom: 1px solid hsl(var(--border));
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; position: relative;
}
.brand {
  font-weight: 700; font-size: 1.05rem; color: hsl(var(--foreground));
  text-decoration: none; letter-spacing: -0.02em; max-width: calc(100% - 3.5rem);
}
.brand span { color: hsl(var(--primary)); }
.nav { display: block; }
.nav__panel { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.nav a { color: hsl(var(--muted-foreground)); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: hsl(var(--foreground)); }
.nav-phone { font-weight: 600; color: hsl(var(--foreground)) !important; white-space: nowrap; }
.nav-cta { display: none; }
.nav-backdrop { display: none; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; padding: 0; flex-shrink: 0;
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  border-radius: var(--radius); cursor: pointer; color: hsl(var(--foreground));
}
.nav-toggle__bars {
  display: grid; gap: 5px; width: 1.1rem;
}
.nav-toggle__bars span {
  display: block; height: 2px; width: 100%; border-radius: 1px;
  background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
body.nav-open { overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; border-radius: var(--radius); border: 1px solid transparent;
  padding: 0.65rem 1.1rem; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; transition: 0.15s ease;
}
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { filter: brightness(1.05); color: hsl(var(--primary-foreground)); opacity: 1; }
.btn-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--muted)); opacity: 1; }

.hero {
  position: relative; min-height: min(78vh, 640px);
  display: grid; align-items: end;
  background: hsl(240 6% 10%) center/cover no-repeat;
  color: #fff;
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero__content { position: relative; z-index: 1; padding: 3.5rem 0 3rem; max-width: 40rem; }
.hero__brand { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; margin: 0 0 0.75rem; }
.hero h1 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 600; margin: 0 0 0.75rem; line-height: 1.25; }
.hero p { margin: 0 0 1.25rem; color: hsl(0 0% 92%); max-width: 36rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.section { padding: 3rem 0; }
.section--muted { background: hsl(var(--muted)); }
.section h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
.lead { color: hsl(var(--muted-foreground)); max-width: 42rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 1.5rem; }
.card {
  display: flex; flex-direction: column; gap: 0.5rem;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 1.1rem; background: hsl(var(--card)); color: inherit; text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: hsl(var(--primary) / 0.45); transform: translateY(-2px); opacity: 1; }
.card__meta { font-size: 0.8rem; color: hsl(var(--muted-foreground)); text-transform: uppercase; letter-spacing: 0.04em; }
.card h3 { margin: 0; font-size: 1.05rem; color: hsl(var(--foreground)); }
.card p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.92rem; }

.badge {
  display: inline-flex; align-items: center; border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--accent)); color: hsl(var(--accent-foreground));
  font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem;
}

.prose { max-width: 48rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose p, .prose li { color: hsl(var(--foreground)); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose .page-cover { margin: 1.25rem 0 1.75rem; border-radius: var(--radius); overflow: hidden; border: 1px solid hsl(var(--border)); }
.prose .page-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.faq details { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0.85rem 1rem; margin: 0.6rem 0; background: hsl(var(--card)); }
.faq summary { cursor: pointer; font-weight: 600; }
.takeaways { background: hsl(var(--accent)); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1.25rem 0; }

.site-footer { border-top: 1px solid hsl(var(--border)); padding: 2rem 0; margin-top: 2rem; color: hsl(var(--muted-foreground)); font-size: 0.92rem; }
.site-footer__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer a { color: inherit; }

.form { display: grid; gap: 0.75rem; max-width: 28rem; }
.form label { font-size: 0.85rem; font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 0.65rem 0.75rem; font: inherit; background: hsl(var(--background));
}
.form-note { font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
.form-success { color: hsl(140 40% 30%); font-weight: 600; }
.form-error { color: hsl(0 70% 40%); font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.25rem; }
.filters button {
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  border-radius: 999px; padding: 0.35rem 0.8rem; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.filters button.is-active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; z-index: 60; }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 50;
    background: hsl(240 10% 4% / 0.45); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .nav {
    position: fixed; top: 0; right: 0; z-index: 55;
    width: min(20rem, 88vw); height: 100dvh;
    background: hsl(var(--background));
    border-left: 1px solid hsl(var(--border));
    box-shadow: -12px 0 40px hsl(240 10% 4% / 0.12);
    transform: translateX(105%);
    transition: transform 0.25s ease;
    padding: 5rem 1.25rem 1.5rem;
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__panel {
    flex-direction: column; align-items: stretch; gap: 0.35rem;
  }
  .nav__panel > a:not(.btn) {
    display: block; padding: 0.85rem 0.75rem;
    border-radius: var(--radius); font-size: 1.05rem; font-weight: 500;
    color: hsl(var(--foreground));
  }
  .nav__panel > a:not(.btn):hover,
  .nav__panel > a[aria-current="page"] {
    background: hsl(var(--muted)); opacity: 1;
  }
  .nav-phone {
    margin-top: 0.5rem;
    border-top: 1px solid hsl(var(--border));
    border-radius: 0 !important;
    padding-top: 1rem !important;
  }
  .nav-cta {
    display: inline-flex; margin-top: 0.75rem; width: 100%;
  }
}
