/* ==========================================================================
   Dukkalis v2 — тёмная редакционная тема с лаймовым акцентом.
   Слой поверх styles.css: структура и поведение блоков не меняются.
   Откат к v1: bash backup/v1/restore.sh
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #141412;
  --bg-2: #1b1b18;
  --bg-3: #23231f;
  --fg: #f3f1e8;
  --muted: #a9a79c;
  --line: rgb(243 241 232 / 12%);
  --on-lime: #161613;
  --header-height: 76px;
}

/* На тёмном фоне приглушённый акцент и линии должны быть светлыми,
   а на светлых панелях (пакеты, логотипы, форма брифа) — прежними. */
body {
  --accent: var(--muted);
  --rule: var(--line);
  color: var(--fg);
  background: var(--bg);
}

.package-name {
  font-size: clamp(24px, 1.95vw, 34px);
}

.package-index {
  font-size: clamp(48px, 4.5vw, 76px);
}

.package,
.client-grid,
.strip,
.brief-modal-form,
.offer-note {
  --accent: #575041;
  --rule: #c8c5ba;
  color: var(--ink);
}

::selection {
  color: var(--on-lime);
  background: var(--lime);
}

/* ---------- Появление блоков при прокрутке ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Общие элементы ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .16em;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

h2 {
  margin-top: 18px;
  font-size: clamp(40px, 6.6vw, 120px);
  letter-spacing: -.065em;
}

h2 em {
  color: var(--lime);
}

.dark {
  background: radial-gradient(ellipse at 100% 0%, #262a18, transparent 50%), var(--bg-2);
}

.dark em {
  color: var(--lime);
}

.tinted {
  background: var(--bg-2);
}

.intro,
.niches p {
  color: var(--muted);
}

.text-link {
  color: var(--fg);
  text-decoration-color: var(--lime);
}

.button.hero-cta,
.button.about-cta,
.button.faq-contact,
.header-nav .button {
  color: var(--on-lime);
  background: var(--lime);
}

.button.hero-cta:hover,
.button.about-cta:hover,
.button.faq-contact:hover,
.header-nav .button:hover {
  color: var(--on-lime);
  background: var(--fg);
}

.button.hero-cta:focus-visible,
.button.about-cta:focus-visible,
.button.faq-contact:focus-visible,
.header-nav .button:focus-visible {
  outline-color: var(--lime);
}

.button.about-cta,
.button.faq-contact {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Шапка: плавающая пилюля ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  padding: 12px 16px 0;
  background: transparent;
  transition: none;
}

.site-header.is-scrolled {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.header {
  max-width: 1180px;
  height: 64px;
  margin-inline: auto;
  padding: 0 8px 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(28 28 25 / 72%);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px #00000040;
  transition: background-color .3s ease;
}

.is-scrolled .header {
  background: rgb(28 28 25 / 90%);
}

.header-name {
  font-size: clamp(17px, 1.6vw, 22px);
}

.header-nav {
  gap: 3px;
  font-size: clamp(13px, 1vw, 16px);
}

.header-nav a:not(.button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding-inline: clamp(10px, 1.2vw, 18px);
  border-radius: 999px;
}

.header-nav a:not(.button):is(:hover, :focus-visible) {
  color: var(--fg);
  background: rgb(223 235 170 / 16%);
  text-decoration: none;
}

.header-nav .button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
}

@media (min-width: 800px) {
  .header {
    position: relative;
  }

  .header-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
  }

  .header .menu-trigger {
    display: none;
  }

  .header-nav {
    display: flex;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 800px) and (max-width: 959px) {
  .header-nav a:not(.button) {
    padding-inline: 6px;
  }

  .header-nav .button {
    padding-inline: 12px;
    font-size: 13px;
  }
}

@media (max-width: 799px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    padding-inline: 12px;
  }

  .header {
    height: 60px;
    padding-left: 18px;
  }
}

/* ---------- Первый экран ---------- */

.first-screen {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding-top: var(--header-height);
  background-color: var(--bg);
  background-image:
    url("assets/film-grain.svg"),
    radial-gradient(ellipse at 88% 8%, #2b2f1c 0%, transparent 48%),
    radial-gradient(ellipse at 6% 92%, #2a2418 0%, transparent 52%);
  background-blend-mode: soft-light, normal, normal;
}

@media (prefers-reduced-motion: no-preference) {
  .first-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 82% 18%, rgb(187 201 111 / 16%), transparent 62%);
    animation: hero-breathe 7s ease-in-out infinite alternate;
  }
}

@keyframes hero-breathe {
  from {
    opacity: .12;
  }
  to {
    opacity: .9;
  }
}

.badge {
  padding: 7px 16px 7px 9px;
  border: 1px solid var(--line);
  background: rgb(243 241 232 / 7%);
  color: var(--fg);
  font-size: clamp(12px, .9vw, 14px);
  font-weight: 600;
}

.badge strong {
  color: var(--lime);
}

.badge-avatar {
  border-color: var(--bg-2);
  background: var(--bg-3);
}

#hero-title {
  font-size: clamp(40px, 7vw, 140px);
  letter-spacing: -.07em;
}

.hero-title-line {
  color: var(--fg);
}

#hero-title em {
  margin-top: .08em;
  padding: .04em .24em .1em;
  border-radius: 16px;
  color: var(--on-lime);
  background: var(--lime);
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  transform: rotate(-2.5deg);
}

.hero {
  gap: clamp(16px, 1.6vw, 30px);
}

.hero-benefits {
  gap: 8px;
  color: var(--fg);
  font-size: clamp(12px, .95vw, 15px);
  font-weight: 600;
}

.hero-benefits li {
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(243 241 232 / 5%);
}

.hero-benefits span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--on-lime);
  background: var(--lime);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
}

.hero-cta {
  justify-content: space-between;
  min-width: min(440px, 100%);
  padding: 10px 10px 10px 26px;
  font-size: clamp(15px, 1.1vw, 18px);
}

.hero-cta span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--lime);
  background: var(--on-lime);
  font-size: 17px;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 700;
}

.hero-secondary:hover {
  color: var(--fg);
}

.hero-secondary span {
  color: var(--lime);
  font-size: 1.2em;
}

/* Полоса логотипов — светлая лента внизу тёмного экрана */

.strip {
  border-block: 0;
  background: var(--paper);
}

/* ---------- Кейсы ---------- */

#cases {
  color: var(--ink);
  background: #fefefe;
}

#cases .eyebrow,
#cases h2 em {
  color: #555e35;
}

.cases-track li {
  background: transparent;
}

/* ---------- Что я делаю (02) ---------- */

.offer-note {
  padding: clamp(22px, 2.6vw, 36px);
  border: 0;
  border-radius: 28px;
  color: var(--on-lime);
  background: var(--lime);
}

.offer-note .eyebrow {
  color: #5d5848;
}

.offer-note .eyebrow::before {
  background: var(--on-lime);
}

.offer-note h3 {
  margin-top: 14px;
}

.offer-note .text-link {
  color: var(--on-lime);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .2em;
}

.offer-hours {
  display: inline-block;
  width: 1ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.offer-note p:not(.eyebrow) {
  margin-top: 12px;
  color: #3a382f;
}

/* ---------- Клиенты (03): светлая панель ---------- */

@media (prefers-reduced-motion: reduce) {
  .strip {
    overflow-x: auto;
  }

  .strip-track {
    width: max-content;
  }

  .strip-logos {
    flex-wrap: nowrap;
    padding-block: 0;
  }
}

.client-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper);
}

.client-grid li {
  min-height: clamp(96px, 9vw, 150px);
}

.client-grid li:last-child:nth-child(odd) {
  grid-column: auto;
}

/* ---------- Обо мне (04): фото-полароид ---------- */

.about {
  align-items: center;
}

.about-photo {
  width: fit-content;
  max-width: 100%;
  padding: 12px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 30px 70px #00000073;
  transform: rotate(-2.5deg);
}

.about-photo img {
  border-radius: 14px;
}

.about-photo figcaption {
  padding: 14px 6px 2px;
  color: #575041;
  font: italic 400 clamp(15px, 1.2vw, 19px) / 1.3 var(--font-display);
}

.about-body h2 {
  font-size: clamp(40px, 5.8vw, 104px);
}

.about-facts {
  border-top-color: var(--line);
}

.about-facts dd {
  color: var(--fg);
  font-size: clamp(24px, 2.6vw, 44px);
  letter-spacing: -.05em;
}

.about-facts div:nth-child(1) dd,
.about-facts div:nth-child(3) dd {
  color: var(--lime);
}

/* ---------- Услуги (05): bento-карточки ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(28px, 3vw, 54px);
  border-top: 0;
  counter-reset: service;
}

.services > div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  min-height: 240px;
  padding: clamp(22px, 2.4vw, 34px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg-2);
  counter-increment: service;
}

.services > div::before {
  content: "0" counter(service);
  position: absolute;
  top: clamp(22px, 2.4vw, 34px);
  right: clamp(22px, 2.4vw, 34px);
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
}

.services dt {
  padding-right: 48px;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.services dd {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 18px);
}

.services > div:first-child {
  --service-photo: url("assets/backstage/backstage-7610.webp");
}

.services > div:nth-child(2) {
  --service-photo: url("assets/backstage/backstage-7612.webp");
}

.services > div:nth-child(3) {
  --service-photo: url("assets/backstage/backstage-7584.webp");
}

.services > div:nth-child(4) {
  --service-photo: url("assets/backstage/backstage-7605.webp");
}

@media (hover: hover) {
  .services > div {
    isolation: isolate;
  }

  .services > div::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgb(20 20 18 / 68%), rgb(20 20 18 / 92%)),
      var(--service-photo) center / cover no-repeat;
    opacity: 0;
  }

  .services > div:hover::after {
    opacity: 1;
  }

  .services > div:hover dd {
    color: var(--fg);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .services > div::after {
    transition: opacity .35s ease;
  }
}

.niches h3 {
  font-size: clamp(22px, 2vw, 32px);
}

.niches p {
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.6;
}

/* ---------- Пакеты (06) ---------- */

.package-grid {
  border-color: var(--line);
  background: var(--line);
  box-shadow: 0 40px 90px #00000066;
}

.packages-head p {
  color: var(--muted);
}

.youtube-section {
  background: radial-gradient(ellipse at 10% 20%, #262a1b, transparent 60%), var(--bg);
}

.youtube-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
}

.youtube-heading h2 {
  font-size: clamp(40px, 5.4vw, 90px);
}

.youtube-heading h2 em {
  display: block;
}

.youtube-lead {
  max-width: 36ch;
  margin-top: 20px;
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 700;
  line-height: 1.45;
}

.youtube-intro,
.youtube-steps p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.button.youtube-cta {
  margin-top: 24px;
  min-height: 44px;
  color: var(--on-lime);
  background: var(--lime);
}

.button.youtube-cta:hover {
  background: var(--fg);
}

.youtube-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.youtube-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 26px);
  padding-block: clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
}

.youtube-step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 800;
}

.youtube-steps h3 {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.2;
}

.youtube-note {
  grid-column: 1 / -1;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 24px;
  color: var(--on-lime);
  background: var(--lime);
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .youtube-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.packages-head .text-link {
  color: var(--fg);
}

.packages-note {
  color: var(--muted);
}

/* ---------- Вопрос–ответ (07) ---------- */

.faq-intro {
  color: var(--muted);
}

.faq-contact {
  min-height: 48px;
  padding-inline: 26px;
}

.faq-list {
  border-top-color: var(--line);
}

.faq-list details {
  border-bottom-color: var(--line);
}

.faq-list summary {
  color: var(--fg);
}

.faq-list summary:hover {
  color: var(--lime);
}

.faq-list p {
  color: var(--muted);
}

/* ---------- За кадром (08) ---------- */

.backstage-caption {
  color: var(--muted);
}

.backstage-grid li {
  overflow: hidden;
  border-radius: clamp(6px, .65vw, 10px);
}

.backstage-grid img {
  border-radius: 0;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.backstage-grid li:hover img {
  transform: scale(1.05);
}

/* ---------- Футер (09) ---------- */

.contact-footer {
  background:
    radial-gradient(ellipse at 92% 100%, #262a18, transparent 50%),
    var(--bg);
}

.footer-marquee {
  margin-bottom: clamp(36px, 5vw, 80px);
  overflow: hidden;
  border-block: 1px solid var(--line);
  pointer-events: none;
}

.footer-marquee-track {
  display: flex;
  width: max-content;
  padding-block: clamp(10px, 1.4vw, 22px);
  animation: strip-scroll 28s linear infinite;
}

.footer-marquee span {
  padding-right: .4em;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 96px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  white-space: nowrap;
}

.contact-intro,
.contact-link-label,
.footer-line {
  color: var(--muted);
}

.contact-link-value {
  color: var(--fg);
  text-decoration-color: var(--line);
}

.contact-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 901px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .contact-actions {
    justify-self: end;
    text-align: right;
  }
}

.contact-heading {
  grid-column: auto;
}

.contact-heading h2 {
  font-size: clamp(36px, 4vw, 64px);
}

.contact-heading em {
  display: inline;
}

.contact-intro {
  max-width: 58ch;
  margin-block: 10px 16px;
  font-size: 15px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 12px;
}

.contact-link {
  align-items: center;
  gap: 8px;
}

.contact-link-label {
  min-width: 0;
}

.contact-link-value {
  font-size: 17px;
}

.contact-link:hover .contact-link-value {
  color: var(--lime);
  text-decoration-color: var(--lime);
}

.brief-page {
  background: radial-gradient(ellipse at 0 0, #34362a, transparent 60%), var(--bg);
}

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.contact-consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--lime);
}

.brief-modal-telegram {
  margin-top: auto;
  padding-top: 14px;
}

.brief-modal {
  background: transparent;
}

.brief-modal-form {
  background: var(--paper);
  color-scheme: light;
}

/* ---------- Меньше движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .footer-marquee-track {
    animation: none;
  }

  .backstage-grid img {
    transition: none;
  }

  .backstage-grid li:hover img {
    transform: none;
  }

  .header {
    transition: none;
  }
}

/* ---------- Адаптив ---------- */

@media (max-width: 760px) {
  #hero-title {
    font-size: clamp(36px, 10vw, 76px);
  }

  #hero-title em {
    border-radius: 12px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-secondary {
    display: none;
  }

  .hero-benefits li {
    padding: 6px 13px 6px 7px;
  }

  .about-photo {
    width: 100%;
    transform: rotate(-1.5deg);
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .services > div {
    min-height: 0;
  }

  .client-grid li {
    min-height: clamp(68px, 15vw, 86px);
    padding: 6px clamp(5px, 1.5vw, 12px);
  }

  .package-name {
    font-size: clamp(30px, 8.5vw, 42px);
  }

  .package-index {
    font-size: clamp(48px, 14vw, 68px);
  }
}

@media (max-width: 1100px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 560px) {
  .hero-benefits li {
    padding: 5px 12px 5px 7px;
  }

  .hero-cta {
    min-width: 0;
    padding: 8px 8px 8px 20px;
  }

  .hero-cta span {
    width: 30px;
    height: 30px;
  }

  .badge {
    padding: 5px 12px 5px 7px;
  }
}

@media (max-height: 420px) {
  .badge {
    display: none;
  }

  .hero-benefits {
    gap: 6px;
  }

  .hero-benefits li {
    padding: 4px 10px;
    font-size: 12px;
  }

  #hero-title {
    font-size: clamp(28px, 9svh, 38px);
  }

  .hero-title-line {
    font-size: inherit;
  }

  .hero {
    gap: 7px;
    padding-block: 6px;
  }

  .hero-cta {
    min-height: 0;
    padding: 6px 6px 6px 18px;
  }

  .hero-cta span {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: row;
    gap: 6px 14px;
  }

  .hero-benefits span {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  #hero-title em {
    margin-top: 0;
    padding: .02em .18em .06em;
    border-radius: 10px;
  }
}

@media (min-width: 550px) and (max-height: 420px) and (prefers-reduced-motion: reduce) {
  .hero-benefits {
    width: min(540px, calc(100vw - 16px));
  }

  .hero-benefits li {
    gap: 4px;
    padding-inline: 5px;
    font-size: 11px;
  }
}
