/* ============================================================
   VIVAT — стили внутренних страниц (поверх styles.css / service.css).
   Подключать ПОСЛЕ styles.css.
   ============================================================ */

/* ---------- Активный пункт меню ---------- */
.nav > a.is-active,
.nav-item > .nav-trigger.is-active { color: var(--ink); }
.nav > a.is-active { position: relative; }
.nav > a.is-active::after,
.nav-item > .nav-trigger.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-item { position: relative; }

/* ============================================================
   Универсальный hero внутренней страницы (контакты, портфолио, услуги)
   ============================================================ */
.page-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(130% 120% at 72% 8%, #2b2440, var(--bg) 66%);
  padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 90px);
}
.page-hero__inner { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(34px, 5vw, 66px); line-height: 1.03; letter-spacing: -0.02em;
  max-width: 20ch; margin: 20px 0 20px;
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero__sub { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); max-width: 58ch; }

/* ============================================================
   ПОРТФОЛИО — листинг
   ============================================================ */
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.pf-filter {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 17px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.pf-filter:hover { color: var(--ink); border-color: var(--ink-3); }
.pf-filter.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.pf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px;
}
@media (max-width: 980px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pf-grid { grid-template-columns: 1fr; } }

.pf-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); transition: transform .3s, border-color .3s;
}
.pf-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.pf-card__media {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--bg-3) 0 14px, var(--bg-2) 14px 28px);
  display: flex; align-items: center; justify-content: center;
}
/* сюда подставляется реальное изображение (featured image в WP) */
.pf-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-card__media .ph-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3);
  text-transform: uppercase; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 11px;
}
.pf-card__tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-2);
  background: color-mix(in oklab, var(--bg) 70%, transparent); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.pf-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pf-card__client { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 9px; }
.pf-card__body h3 { font-size: 20px; line-height: 1.22; margin-bottom: 12px; }
.pf-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.pf-card__meta span { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; }

/* ============================================================
   КЕЙС — одиночная страница (шаблон single-case)
   ============================================================ */
.case-hero { border-bottom: 1px solid var(--line-soft); }
.case-hero .crumbs { margin-bottom: 18px; }
.case-hero__client { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; color: var(--accent); }
.case-hero h1 { font-size: clamp(32px, 4.6vw, 60px); line-height: 1.04; letter-spacing: -0.02em; max-width: 22ch; margin: 16px 0 22px; }
.case-hero__sub { font-size: clamp(17px, 1.5vw, 21px); color: var(--ink-2); max-width: 60ch; }

.case-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px;
  border-top: 1px solid var(--line-soft); padding-top: 28px;
}
@media (max-width: 760px) { .case-meta { grid-template-columns: repeat(2, 1fr); } }
.case-meta__item .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.case-meta__item .v { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }

/* большое cover-изображение кейса */
.case-cover {
  margin-top: 44px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-soft);
  aspect-ratio: 16/7; position: relative;
  background: radial-gradient(120% 120% at 50% 20%, #2b2440, #12101d 72%);
  display: flex; align-items: center; justify-content: center;
}
.case-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-cover .ph-label {
  position: relative; z-index: 1; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  color: #fff; text-transform: uppercase; border: 1px dashed color-mix(in oklab,#fff 30%, transparent);
  border-radius: 8px; padding: 8px 14px; background: color-mix(in oklab, #110f1a 38%, transparent);
}

/* блоки задача/решение/результат */
.case-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 820px) { .case-body { grid-template-columns: 1fr; } }
.case-block + .case-block { margin-top: 36px; }
.case-block h2 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 14px; }
.case-block p { color: var(--ink-2); font-size: 16.5px; margin: 0 0 14px; text-wrap: pretty; }
.case-block ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.case-block ul li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink); font-size: 15.5px; }
.case-block ul li svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; color: var(--accent); }

.case-aside {
  align-self: start; position: sticky; top: 108px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  padding: 26px 26px 24px;
}
.case-aside h3 { font-size: 18px; margin-bottom: 14px; }
.case-aside .quote { color: var(--ink-2); font-size: 16px; line-height: 1.6; font-style: italic; border-left: 2px solid var(--accent); padding-left: 16px; margin: 0 0 18px; }
.case-aside .who { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }

/* галерея кейса */
.case-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 760px) { .case-gallery { grid-template-columns: repeat(2, 1fr); } }
.case-gallery .shot {
  aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; position: relative;
  border: 1px solid var(--line-soft);
  background: repeating-linear-gradient(135deg, var(--bg-3) 0 14px, var(--bg-2) 14px 28px);
  display: flex; align-items: center; justify-content: center;
}
.case-gallery .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-gallery .shot.is-wide { grid-column: span 2; aspect-ratio: auto; }
@media (max-width: 760px) { .case-gallery .shot.is-wide { grid-column: span 2; } }
.case-gallery .ph-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; border: 1px dashed var(--line); border-radius: 8px; padding: 6px 11px; }

/* следующий кейс */
.next-case { border-top: 1px solid var(--line-soft); }
.next-case .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.next-case .lbl { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.next-case h2 { font-size: clamp(24px, 3vw, 40px); max-width: 18ch; }

/* ============================================================
   КОНТАКТЫ
   ============================================================ */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
@media (max-width: 900px) { .contacts-grid { grid-template-columns: 1fr; } }
.contact-list { display: grid; gap: 18px; margin-top: 6px; }
.contact-row { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--bg-2); transition: border-color .25s; }
.contact-row:hover { border-color: var(--accent); }
.contact-row .ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.contact-row .ic svg { width: 22px; height: 22px; }
.contact-row .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.contact-row .v { font-size: 18px; font-weight: 700; color: var(--ink); }
.contact-row .v a:hover { color: var(--accent); }
.contact-row .small { font-size: 14px; color: var(--ink-2); margin-top: 4px; }

.contact-socials { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.contact-socials a {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14.5px; transition: all .2s;
}
.contact-socials a:hover { border-color: var(--accent); color: var(--ink); }
.contact-socials svg { width: 18px; height: 18px; }

.map-frame {
  margin-top: 28px; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/8; background: repeating-linear-gradient(135deg, var(--bg-3) 0 14px, var(--bg-2) 14px 28px);
  display: flex; align-items: center; justify-content: center;
}
.map-frame .ph-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 14px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* light theme мелочи */
[data-theme="light"] .page-hero,
[data-theme="light"] .case-cover { background: radial-gradient(130% 120% at 72% 8%, #efe9f8, var(--bg) 66%); }
