/*
Theme Name: Вектор
Description: Автошкола: программы, площадка, стоимость, запись и журнал. Макет для примерки.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: vektor
Husky Catalog: wordpress
*/

:root {
  --ink: #161b22;
  --muted: #5d6672;
  --paper: #f4f0e7;
  --card: rgba(255, 252, 246, 0.86);
  --line: rgba(22, 27, 34, 0.12);
  --amber: #e2a23a;
  --pine: #1d6a58;
  --rail: #10141b;
  --signal: #e85d3a;
  --shadow: 0 30px 70px rgba(16, 20, 27, 0.12);
  --sans: Manrope, "Segoe UI", sans-serif;
  --serif: Fraunces, Palatino, "Palatino Linotype", serif;
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(226, 162, 58, 0.18), transparent 55%),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}
body.admin-bar .top { top: 32px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.story-card a { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .serif { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 12px; }

.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--amber), var(--signal));
  z-index: 40;
  pointer-events: none;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 88px;
  background: var(--rail);
  color: #f4f0e7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  z-index: 30;
}
.mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: #1a1408;
  font-weight: 800;
  text-decoration: none;
  font-size: 22px;
}
.rail-word {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
}
.rail-cta {
  color: var(--amber);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shell { margin-left: 88px; min-height: 100vh; }

.top {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  background: rgba(244, 240, 231, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.burger, .phone-mini { display: none; }
.menu { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; }
.menu > li { position: relative; }
.menu > li > a, .menu-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 999px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu > li > a:hover, .menu-label:hover, .menu > li:focus-within > .menu-label { background: rgba(22, 27, 34, 0.06); }
.sub {
  position: absolute;
  left: 0;
  top: calc(100% - 4px);
  min-width: 240px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.18s ease;
}
.menu > li:hover > .sub, .menu > li:focus-within > .sub, .menu > li.open > .sub {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.sub a { display: block; text-decoration: none; padding: 8px 10px; border-radius: 12px; font-size: 14px; }
.sub a:hover, .sub a[aria-current="page"] { background: #f6efe2; }
.top-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.phone { text-decoration: none; font-weight: 800; font-size: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  background: var(--ink);
  color: #f7f3ea;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
}
.btn:hover { background: #2a2116; }
.btn.amber { background: var(--amber); color: #1b1408; }
.btn.amber:hover { background: #efb14d; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: white; }

.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 800; color: var(--pine); }
.lede { font-size: 18px; color: var(--muted); max-width: 46ch; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: end;
  padding: 28px 0 10px;
}
.hero h1 { font-size: clamp(48px, 6vw, 86px); line-height: 0.92; margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: #8a5a12; }
.dial { display: flex; gap: 8px; margin: 22px 0; }
.dial button, .pills button, .campus-nav button {
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
.dial button[aria-selected="true"], .pills button[aria-selected="true"], .campus-nav button[aria-selected="true"] {
  background: var(--ink);
  color: #f7f3ea;
  box-shadow: none;
}
.hero-meta { display: flex; gap: 18px; font-weight: 800; }
.hero-meta span { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img, .frame img, .story-card img, .article-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.hero-photo { height: min(68vh, 640px); }
.hero-photo img { height: 100%; animation: drift 18s ease-in-out infinite alternate; }
.hero-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(16, 20, 27, 0.72);
  color: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
@keyframes drift { to { transform: scale(1.06); } }

.stats, .promise-row, .switcher, .board, .reasons, .studio, .trail, .duo, .people, .campuses, .quotes, .journal, .enroll, .page-hero, .blocks { margin-top: 54px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.stat b { display: block; font-family: var(--serif); font-size: 42px; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }

.band-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.band-head h2, .block h2, .page-hero h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1; margin-bottom: 0; }
.promise-row, .card-row, .people-row, .story-row, .gallery-grid { display: grid; gap: 12px; }
.promise-row { grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.promise, .card, .person, .story-card, .quote, .campus-card, .block, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.promise { scroll-snap-align: start; padding: 18px; min-height: 180px; }
.promise em { font-family: var(--serif); font-style: italic; font-size: 28px; display: block; line-height: 1; }

.switcher { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.switch-list { display: flex; flex-direction: column; gap: 8px; }
.switch-list button {
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
}
.switch-list button[aria-selected="true"] { background: var(--ink); color: white; }
.switch-list small { display: block; color: var(--muted); }
.switch-list button[aria-selected="true"] small { color: rgba(255,255,255,.72); }
.panel { padding: 22px; min-height: 280px; }
.panel h3 { font-size: 36px; margin-bottom: 8px; }

.board { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 22px; align-items: center; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week i { display: grid; gap: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.week b {
  display: block;
  height: 72px;
  border-radius: 14px;
  background: rgba(22, 27, 34, 0.05);
}
.week b.on { background: linear-gradient(180deg, var(--amber), #f0c27a); }

.reasons { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 22px; }
.reason-list { display: grid; gap: 10px; }
.reason {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.reason strong { font-size: 18px; }
.num { font-family: var(--serif); font-size: 28px; color: var(--amber-2, #b97612); }

.studio { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; }
.calc, .form {
  background: var(--rail);
  color: #f6f1e7;
  border-radius: 28px;
  padding: 22px;
}
.calc .btn.ghost, .form .btn.ghost { color: #f6f1e7; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.block > .board { margin-top: 12px; }
.calc p, .form p { color: rgba(246, 241, 231, 0.75); }
.calc output { font-family: var(--serif); font-size: 64px; display: block; line-height: 1; }
input[type="range"] { width: 100%; accent-color: var(--amber); }
.gear { display: flex; gap: 8px; margin: 12px 0; }
.gear button { flex: 1; }
.form label, .quiz label { display: block; margin: 10px 0; font-size: 14px; }
.form input, .form select, .form textarea, .search-form input {
  width: 100%;
  margin-top: 6px;
  border-radius: 14px;
  border: 0;
  padding: 12px 14px;
  background: rgba(255,255,255,.08);
  color: white;
}
.search-form input { background: white; color: var(--ink); border: 1px solid var(--line); }
.form .btn { margin-top: 8px; }
.note { color: var(--pine); font-weight: 700; }

.trail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trail article { padding: 18px; border-radius: 24px; background: white; border: 1px solid var(--line); min-height: 210px; }
.trail article:nth-child(even) { transform: translateY(18px); }
.duo, .split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.frame { margin: 0; }
.frame img { height: 360px; }
.frame figcaption { color: var(--muted); margin-top: 8px; }

.people-row, .story-row { grid-template-columns: repeat(3, 1fr); }
.person, .story-card, .quote { padding: 16px; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #1d6a58;
  color: white;
  font-weight: 800;
  margin-bottom: 12px;
}
.person:nth-child(3n) .avatar { background: #8a5a12; }
.person:nth-child(3n+2) .avatar { background: #243044; }
.story-card img { height: 180px; margin: -16px -16px 12px; border-radius: 24px 24px 0 0; width: calc(100% + 32px); max-width: none; }
.story-card h3, .person h3, .quote h3 { font-size: 22px; margin-bottom: 6px; }
.meta { color: var(--muted); font-size: 13px; }

.campuses { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.campus-nav { display: flex; flex-direction: column; gap: 8px; }
.campus-card { padding: 22px; min-height: 240px; display: grid; align-content: end; background:
  linear-gradient(180deg, rgba(16,20,27,.05), rgba(16,20,27,.55)),
  var(--campus, #d9d3c7);
  color: white;
}
.quotes-marquee { overflow: hidden; }
.quotes-track { display: flex; gap: 12px; width: max-content; animation: marquee 42s linear infinite; }
.quote { width: 340px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.page-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: end; padding-top: 18px; }
.page-hero img { height: 320px; width: 100%; object-fit: cover; border-radius: var(--radius); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; }
.blocks { display: grid; gap: 28px; padding-bottom: 20px; }
.block { padding: 22px; }
.facts, .cards, .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fact, .card, .step { padding: 16px; border-radius: 20px; background: #fffdf8; border: 1px solid var(--line); }
.step b { display: block; font-family: var(--serif); font-size: 28px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 800; }
.gallery-grid { grid-template-columns: 1.4fr 1fr 1fr; }
.gallery-grid img { height: 240px; width: 100%; object-fit: cover; border-radius: 22px; }
.gallery-grid a:first-child { grid-row: span 2; }
.gallery-grid a:first-child img { height: 100%; }
.prose p { max-width: 68ch; }

.quiz fieldset { border: 1px solid var(--line); border-radius: 18px; margin: 0 0 12px; padding: 12px 16px; }
.quiz-result { font-weight: 800; }

.foot { margin-top: 40px; background: var(--rail); color: #f4f0e7; padding: 36px 0 22px; }
.foot a { color: inherit; }
.foot-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 18px; }
.foot h2 { font-size: 40px; margin-bottom: 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 6px 0; }
.legal { color: rgba(244,240,231,.62); font-size: 13px; margin-top: 22px; }
.search-form { display: flex; gap: 8px; }
.entry { width: min(820px, calc(100% - 48px)); margin: 28px auto 50px; }
.entry h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1; }
.article-photo img { height: 420px; margin: 12px 0 18px; }
.empty, .miss { padding: 40px 0 70px; }

@media (max-width: 980px) {
  .hero, .switcher, .board, .reasons, .studio, .duo, .split, .campuses, .page-hero, .foot-grid { grid-template-columns: 1fr; }
  .stats, .facts, .cards, .steps, .people-row, .story-row, .trail { grid-template-columns: 1fr 1fr; }
  .trail article:nth-child(even) { transform: none; }
  .menu { display: none; }
  .burger, .phone-mini { display: inline-flex; }
  .phone { display: none; }
  .drawer {
    position: fixed;
    inset: 0 0 0 88px;
    background: rgba(244, 240, 231, 0.98);
    z-index: 24;
    padding: 80px 22px 30px;
    overflow: auto;
  }
  .drawer[hidden] { display: none; }
  .drawer a { display: block; text-decoration: none; padding: 8px 0; font-weight: 700; }
  .drawer .group { margin-top: 16px; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
}
@media (max-width: 720px) {
  .rail { width: 100%; height: 64px; flex-direction: row; inset: 0 0 auto 0; padding: 0 14px; }
  .rail-word { writing-mode: horizontal-tb; transform: none; letter-spacing: 0.18em; }
  .shell { margin-left: 0; padding-top: 64px; }
  .drawer { inset: 64px 0 0 0; }
  .stats, .facts, .cards, .steps, .people-row, .story-row, .trail, .week { grid-template-columns: 1fr 1fr; }
  .hero-photo { height: 320px; }
  .wrap { width: min(1180px, calc(100% - 28px)); }
  body.admin-bar .rail { top: 46px; }
  body.admin-bar .top { top: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo img, .quotes-track { animation: none; }
  html { scroll-behavior: auto; }
}
