/* Alexsas Landing — общий CSS (лендинг + проект + профайл + архивы) */

html body { font-family: 'Manrope', system-ui, sans-serif; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #ffffff;
  --white: #000000;
  --accent: #ff3333;
  --accent2: #cc0000;
  --gray: #000000;
  --border: rgba(53,51,50,0.12);
  --project-cat-color: rgba(0, 0, 0, 0.3);
  --mono: 'Manrope', system-ui, sans-serif;
  --display: 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --nav-pad-y: 24px;
  --nav-pad-x: 40px;
  --page-top-offset: 320px;
  --page-top-offset-mobile: 200px;
  --ui-font-size: 1.25rem;
  --ui-line-height: 1.6;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.6;
  overflow-x: hidden;
  text-transform: none;
}
body,
body * {
  font-family: var(--body) !important;
  font-size: 1.25rem !important;
  letter-spacing: normal !important;
  color: #000 !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-variation-settings: normal !important;
  text-shadow: none !important;
}

a, a:link, a:visited, a:hover, a:active { color: var(--white); text-decoration: none; }

/* H1: 2rem поверх глобального body * и clamp у шаблонных заголовков */
h1 {
  font-size: 2rem !important;
  line-height: 1.2;
}
.single-post h1.ps-title,
.is-portfolio-single h1.ps-title {
  font-size: 2rem !important;
  line-height: 1.2;
}
.page h1.profile-title,
.page-template-page-profile h1.profile-title {
  font-size: 2rem !important;
  line-height: 1.2;
}
h1.logos-title {
  font-size: 2rem !important;
  line-height: 1.2;
}
/* Потомки H1: перебиваем body * (иначе ссылки/span остаются 1.25rem) */
h1 *,
h1 a,
h1 a:link,
h1 a:visited,
h1 a:hover,
h1 a:active {
  font-size: inherit !important;
}

/* NAV */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: flex-start; align-items: center;
  padding: var(--nav-pad-y) var(--nav-pad-x);
  border-bottom: none;
  transition: border-color .3s, background .3s;
  position: fixed;
}
.site-nav.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
.site-nav::after {
  content: '';
  position: absolute;
  left: var(--nav-pad-x);
  right: var(--nav-pad-x);
  bottom: 0;
  height: 1px;
  background: transparent;
}
.nav-logo,
.nav-logo:link,
.nav-logo:visited,
.nav-logo:hover,
.nav-logo:active {
  text-transform: none;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  white-space: nowrap;
  color: #000 !important;
}
.is-landing .nav-logo,
.is-landing .nav-logo:link,
.is-landing .nav-logo:visited,
.is-landing .nav-logo:hover,
.is-landing .nav-logo:active {
  color: #000 !important;
}
.nav-links {
  display: flex; gap: 32px;
  margin-left: auto;
  justify-content: flex-end;
  list-style: none;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none;
  text-align: right;
}
.nav-links a {
  color: var(--gray);
  transition: color .2s;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
}
.nav-links a:hover { color: var(--white); }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a {
  color: var(--accent) !important;
}
.nav-side {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
}
.nav-toggle {
  display: none;
  font-family: inherit;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none;
  border: 1px solid var(--border);
  padding: 8px 20px;
  line-height: 1.2;
  box-sizing: border-box;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s, color .2s;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .2s, opacity .2s, top .2s;
}
.nav-toggle-bars::before {
  position: absolute;
  top: -5px;
  left: 0;
}
.nav-toggle-bars::after {
  position: absolute;
  top: 5px;
  left: 0;
}
.site-nav.is-open .nav-toggle-bars { background: transparent; }
.site-nav.is-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.site-nav.is-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}
.nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none;
  border: 1px solid var(--border);
  padding: 8px 20px;
  line-height: 1.2;
  box-sizing: border-box;
  min-height: 44px;
  height: auto;
  transition: border-color .2s, color .2s;
}
.nav-contact:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle {
  height: auto;
  min-height: 44px;
}

/* HERO */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  padding-top: 160px;
}
.hero.is-marquee-hidden {
  height: calc(100vh - var(--hero-marquee-space, 82px));
}
.hero-bg {
  position: absolute; inset: 0;
  background: #fff;
}
.home-text-widget {
  position: absolute;
  left: var(--nav-pad-x);
  right: auto;
  top: 100px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: min(620px, calc(100vw - 80px));
  min-height: 160px;
  background: #fff;
  border: none;
  padding: 0 !important;
  z-index: 4;
  line-height: 1.6;
  letter-spacing: 0 !important;
  text-transform: none;
  text-align: left !important;
  text-indent: 0 !important;
  white-space: pre-line;
  margin: 0 !important;
}
.home-text-widget-text {
  display: block;
  width: 100%;
  align-self: flex-start;
  margin: 0 !important;
  padding: 0 !important;
  text-indent: 0 !important;
}
.home-text-widget.is-caps {
  text-transform: none !important;
}
.home-text-widget,
.home-text-widget * {
  text-align: left !important;
  text-indent: 0 !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.hero-content { position: relative; padding: 0 40px 60px; z-index: 2; }
.hero-label {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: none;
  color: var(--gray);
  margin-bottom: 24px;
}
.hero-label span { color: var(--accent); margin-right: 12px; }

.hero-headline {
  font-family: var(--display);
  font-size: clamp(64px, 10vw, 140px);
  line-height: .90;
  letter-spacing: -.02em;
  font-weight: 900;
  margin-bottom: 40px;
  text-transform: none;
}
.hero-headline em { font-style: normal; color: var(--accent); }

.hero-sub {
  max-width: 440px;
  font-size: 13px;
  color: var(--gray);
  line-height: 1.8;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}
.hero-scroll-hint {
  position: absolute;
  right: 40px;
  bottom: 60px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: none;
  color: var(--gray);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-scroll-hint::before {
  content: '';
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--gray));
}
.hero-marquee {
  position: relative;
  overflow: hidden;
  padding: 0;
  z-index: 1;
  background: #fff;
  margin: 24px 0;
}
.ps-body .hero-marquee {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin-top: 24px !important;
  margin-bottom: 24px !important;
  clear: both;
}
.hero .hero-marquee,
.hero-marquee.is-hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  z-index: 3;
  margin: 0;
}
/* Резина: при нехватке высоты вторая строка скрывается (см. landing.js). */
.hero-marquee.is-single-row-fallback .hero-marquee-track-wrap:not(:first-child) {
  display: none !important;
}
.hero-marquee.is-hidden-no-space {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}
.hero-marquee-track-wrap {
  overflow: hidden;
}
.hero-marquee-track {
  display: flex;
  width: fit-content;
  white-space: nowrap;
  animation: heroMarquee var(--marquee-duration, 21s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
.hero-marquee-seq {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.hero-marquee-track-wrap.is-reverse .hero-marquee-track {
  animation-direction: reverse;
}
.hero-marquee-item {
  position: relative;
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--marquee-row-height, 56px);
  margin-right: 56px;
}
.hero-marquee-item-img {
  max-height: calc(var(--marquee-row-height, 56px) - 4px);
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.hero-marquee-item-text {
  font-size: 14px;
  line-height: var(--marquee-row-height, 56px);
  text-transform: none;
  white-space: nowrap;
}
@keyframes heroMarquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50.0001%, 0, 0); }
}

/* HOME FEATURED (хаотичный masonry) */
.home-featured {
  padding: 120px 40px 80px;
}
.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 96px;
}
.home-featured-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-featured-item:nth-child(4n + 1) {
  grid-column: 1 / 7;
}
.home-featured-item:nth-child(4n + 2) {
  grid-column: 8 / 13;
  padding-top: 120px;
}
.home-featured-item:nth-child(4n + 3) {
  grid-column: 2 / 8;
}
.home-featured-item:nth-child(4n + 4) {
  grid-column: 9 / 13;
  padding-top: 80px;
}
.home-featured-link {
  display: block;
}
.home-featured-media {
  background: #fff;
}
.home-featured-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.home-featured-image-empty {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
}
.home-featured-meta {
  padding-top: 10px;
}
.home-featured-title {
  color: #000 !important;
  margin-bottom: 2px;
  line-height: 1.1;
}
.home-featured-cat {
  color: var(--project-cat-color) !important;
  line-height: 1.2;
  margin-top: 0;
}

/* SECTIONS */
section { position: relative; }

.section-label {
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: none;
  color: var(--gray);
  margin-bottom: 16px;
}
.section-label::before { content: '//'; color: var(--accent); margin-right: 8px; }

/* ABOUT */
.about {
  padding: 140px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  border-bottom: 1px solid var(--border);
}
.about-number {
  font-family: var(--display);
  font-size: clamp(100px, 16vw, 220px);
  line-height: 1;
  color: rgba(53,51,50,.04);
  user-select: none;
  position: absolute;
  left: 40px;
  top: -40px;
}
.about-headline {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin-bottom: 32px;
  margin-top: 40px;
  font-weight: 900;
}
.about-text {
  color: var(--gray);
  line-height: 2;
  font-size: 13px;
  max-width: 400px;
}
.about-right {
  padding-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.stat {
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform .5s;
}
.stat:hover { border-color: rgba(255,51,51,.3); }
.stat:hover::before { transform: scaleX(1); }
.stat-num {
  font-family: var(--display);
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}
.stat-desc {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: none;
  color: var(--gray);
}

/* WORK */
.work { padding: 140px 40px; border-bottom: 1px solid var(--border); }
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 80px;
}
.work-headline {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  font-weight: 900;
}
.work-count {
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--gray);
  text-transform: none;
  padding-bottom: 8px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.work-count:hover {
  color: var(--accent);
  border-color: rgba(255,51,51,.35);
}
.projects {
  display: grid;
  gap: 1px;
  background: var(--border);
}
.project {
  background: var(--black);
  padding: 40px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 40px;
  transition: background .2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.project::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
  transition: opacity .3s;
}
.project:hover { background: rgba(53,51,50,.004); }
.project:hover::after { opacity: 1; }
.project-index {
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(53,51,50,.2);
  font-family: var(--mono);
}
.project-cat {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: none;
  color: var(--project-cat-color);
  margin-bottom: 8px;
}
.project-name {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: .02em;
  color: var(--accent);
}
.project-excerpt {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0 !important;
  color: var(--gray);
  text-transform: none;
  max-width: 720px;
}
.blog-archive .project-excerpt .excerpt-more-mark {
  color: var(--accent) !important;
  margin-left: 6px;
}
.blog-archive .project-name {
  color: var(--accent) !important;
}
.blog-archive .project-excerpt {
  color: #000 !important;
}
.blog-archive .project {
  align-items: start;
  padding-left: 0;
}
.blog-archive .project:hover {
  background: #fff !important;
}
.blog-archive .project:hover::after {
  opacity: 0 !important;
}
.blog-archive .project-info {
  align-self: start;
}
.blog-archive .project-index {
  color: #d0d0d0 !important;
  padding-top: 4px;
  text-align: left;
  font-size: 0.8rem !important;
}
.project-arrow {
  font-size: 20px;
  color: var(--gray);
  transition: color .2s, transform .2s;
}
.project:hover .project-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* SERVICES */
.services {
  padding: 140px 40px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.services-left { position: sticky; top: 120px; }
.services-headline {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  margin-top: 16px;
  font-weight: 900;
}
.services-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}
.service {
  padding: 36px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: background .2s;
}
.service:last-child { border-bottom: none; }
.service:hover { background: rgba(53,51,50,.03); }
.service-name {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: .02em;
}
.service-desc {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.7;
  max-width: 260px;
  margin-top: 8px;
}
.service-tag {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: none;
  color: var(--accent);
  border: 1px solid rgba(255,51,51,.3);
  padding: 4px 12px;
  white-space: nowrap;
}

/* CTA */
.cta {
  padding: 160px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute; inset: 0;
  background: #fff;
  pointer-events: none;
}
.cta-label {
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: none;
  color: var(--gray);
  margin-bottom: 32px;
}
.cta-label span { color: var(--accent); }
.cta-headline {
  font-family: var(--display);
  font-size: clamp(56px, 10vw, 140px);
  line-height: .92;
  margin-bottom: 48px;
}
.cta-headline .outline { color: var(--accent); display: block; }
.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn-primary {
  background: var(--accent);
  color: var(--black);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: none;
  padding: 16px 40px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #cc0000; transform: translateY(-2px); }
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: none;
  padding: 16px 40px;
  transition: border-color .2s, transform .15s;
}
.btn-secondary:hover { border-color: rgba(53,51,50,.4); transform: translateY(-2px); }

/* FOOTER */
.site-footer {
  position: relative;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: var(--accent);
}
.footer-mail,
.footer-copy {
  font-size: 14px;
}

/* PARALLAX / REVEAL */
.parallax { will-change: transform; }
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

hr.tech { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ------------------------------------------------------------------
 * PROJECT SINGLE
 * --------------------------------------------------------------- */
.ps-wrap { padding: var(--page-top-offset) 40px 80px; }
.ps-meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 80px;
}
.ps-back {
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--gray);
  text-transform: none;
}
.ps-back:hover { color: var(--accent); }
.ps-title {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 128px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: none;
}
.single-post .ps-title {
  font-size: clamp(18px, 2.2vw, 34px) !important;
  line-height: 1.1;
}
.single-post .ps-meta {
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 20px;
}
.single-post .ps-back {
  justify-self: start;
  white-space: nowrap;
}
.single-post .ps-meta-v {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}
.single-post .ps-title {
  justify-self: center;
  text-align: center;
  color: var(--accent) !important;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.single-post .ps-body p,
.single-post .ps-body .wp-block-paragraph {
  letter-spacing: 0 !important;
}
.is-portfolio-single .ps-body p,
.is-portfolio-single .ps-body .wp-block-paragraph {
  letter-spacing: 0 !important;
}
.page .ps-body p,
.page .ps-body .wp-block-paragraph {
  letter-spacing: 0 !important;
}
.ps-meta-v {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--accent);
  text-transform: none;
}
a.ps-meta-v,
a.ps-meta-v:link,
a.ps-meta-v:visited,
a.ps-meta-v:hover,
a.ps-meta-v:active {
  color: var(--accent);
}
.ps-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: rgba(53,51,50,.04);
  margin-bottom: 80px;
}
.ps-body {
  --content-max-width: 720px;
  --viewport-width: 100vw;
  --content-current-width: min(var(--content-max-width), calc(100vw - (var(--nav-pad-x) * 2)));
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.9;
  color: var(--white);
  text-transform: none;
}
.ps-body p,
.ps-body .wp-block-paragraph {
  font-size: 1.25rem;
  font-weight: 400;
}
.ps-body em,
.ps-body i,
.profile-body .left em,
.profile-body .left i,
.home-text-widget em,
.home-text-widget i {
  letter-spacing: 0 !important;
}
.ps-body .wp-block-code,
.ps-body .wp-block-code code,
.ps-body pre,
.ps-body code {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.ps-body .is-style-alexsas-main-style,
.profile-body .left .is-style-alexsas-main-style {
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray);
}
.ps-body p { margin-bottom: 20px; }
/* Картинки внутри блоков: без жёстких отступов — иначе перебиваются margin/gap из редактора */
.ps-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
}
.ps-body .wp-block-image img,
.ps-body figure img {
  margin: 0;
}
.ps-body .wp-block-image,
.ps-body figure {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}
/*
 * Full width: не использовать margin-left: calc(...) без !important —
 * в редакторе при margin: 0 Gutenberg пишет inline margin и ломает выход из колонки 720px.
 * Центрирование через transform не конфликтует с margin из блока (кроме margin: 0 по всем сторонам).
 */
.ps-body .alignfull {
  width: auto !important;
  max-width: none !important;
  margin-left: calc((var(--content-current-width) - var(--viewport-width)) / 2) !important;
  margin-right: calc((var(--content-current-width) - var(--viewport-width)) / 2) !important;
  box-sizing: border-box;
}
.ps-body .alignfull img,
.ps-body img.alignfull {
  width: 100%;
  max-width: 100%;
}
.ps-body .alignwide {
  width: auto !important;
  max-width: none !important;
  margin-left: calc((var(--content-current-width) - (100vw - (var(--nav-pad-x) * 2))) / 2) !important;
  margin-right: calc((var(--content-current-width) - (100vw - (var(--nav-pad-x) * 2))) / 2) !important;
  box-sizing: border-box;
}
.ps-body .alignwide img {
  width: 100%;
  max-width: 100%;
}
@supports (width: 100dvw) {
  .ps-body {
    --viewport-width: 100dvw;
  }
}
.ps-body h2, .ps-body h3 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -.01em;
  margin: 48px 0 16px;
  text-transform: none;
}
.ps-body h2 { font-size: 32px; }
.ps-body h3 { font-size: 22px; color: var(--accent); }
.ps-body a,
.ps-body a:link,
.ps-body a:visited,
.ps-body a:hover,
.ps-body a:active {
  color: var(--accent);
  border-bottom: 1px solid rgba(255,51,51,.3);
  font-size: inherit !important;
}
.ps-body .home-featured a,
.ps-body .home-featured a:link,
.ps-body .home-featured a:visited,
.ps-body .home-featured a:hover,
.ps-body .home-featured a:active {
  border-bottom: none !important;
}

/* Блок «Файл» (PDF/ZIP) в теле страниц/постов */
.ps-body .wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 20px 0;
  letter-spacing: 0 !important;
  text-transform: none !important;
  max-width: 720px;
}
.ps-body .wp-block-file > a:first-of-type {
  color: #000 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
  text-decoration: none !important;
  letter-spacing: 0 !important;
}
.ps-body .wp-block-file > a:first-of-type:hover {
  color: var(--accent) !important;
  border-bottom-color: rgba(255, 51, 51, 0.45) !important;
}
.ps-body .wp-block-file .wp-block-file__button {
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: none;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  color: #000 !important;
  padding: 8px 14px;
  border-radius: 0;
  text-decoration: none !important;
  line-height: 1.2;
  transition: border-color .2s, color .2s;
}
.ps-body .wp-block-file .wp-block-file__button:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.ps-nav {
  border-top: 1px solid var(--border);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.ps-nav a {
  display: block;
  padding: 24px;
  border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
}
.ps-nav a:hover { border-color: rgba(255,51,51,.3); background: rgba(53,51,50,.03); }
.ps-nav .ps-nav-label {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--gray);
  text-transform: none;
  margin-bottom: 12px;
}
.ps-nav .ps-nav-title {
  font-family: var(--display);
  font-size: 20px;
  color: var(--accent);
}

/* Portfolio single: верхняя строка и навигация без "кнопок" */
.is-portfolio-single .ps-meta {
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 20px;
}
.is-portfolio-single .ps-title {
  justify-self: center;
  text-align: center;
  color: var(--accent) !important;
  font-size: clamp(18px, 2.2vw, 34px) !important;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.is-portfolio-single .ps-back {
  justify-self: start;
  white-space: nowrap;
}
.is-portfolio-single .ps-meta-v {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}
.is-portfolio-single .ps-nav {
  width: 100%;
  max-width: none;
  margin-top: 120px;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 24px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.is-portfolio-single .ps-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: auto;
}
.is-portfolio-single .ps-nav-link:hover {
  border: none;
  background: transparent;
}
.is-portfolio-single .ps-nav-prev {
  justify-content: flex-start;
}
.is-portfolio-single .ps-nav-next {
  justify-content: flex-end;
}
.is-portfolio-single .ps-nav .ps-nav-title {
  margin: 0;
  font-size: 14px;
  color: #000;
}
.is-portfolio-single .ps-nav-prev .ps-nav-arrow {
  order: -1;
  margin-right: 10px;
}
.is-portfolio-single .ps-nav-next .ps-nav-arrow {
  margin-left: 10px;
}
.is-portfolio-single .ps-nav .ps-nav-arrow {
  font-size: 14px;
  color: #000;
  line-height: 1;
}
.is-portfolio-single .ps-nav-empty {
  width: 1px;
}

/* ------------------------------------------------------------------
 * ARCHIVE
 * --------------------------------------------------------------- */
.archive-wrap { padding: var(--page-top-offset) 40px 80px; }
.archive-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 60px;
}
.archive-head.archive-head-hidden {
  display: none;
}
.archive-kicker {
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--gray);
  text-transform: none;
  margin-bottom: 12px;
}
.archive-title {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  font-weight: 900;
  text-transform: none;
}
.archive-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
}
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}
.archive-filter {
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: none;
  border: none;
  color: #000;
  padding: 0;
  background: transparent;
  transition: color .2s;
}
.is-portfolio-archive .archive-filter,
.is-portfolio-tax .archive-filter {
  letter-spacing: 0 !important;
}
.archive-filter:hover {
  color: var(--accent) !important;
}
.archive-filter.is-active {
  color: var(--accent) !important;
}
.archive-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.archive-card {
  border: none;
  overflow: hidden;
  background: #fff;
  transition: transform .2s, background .2s;
}
.archive-card:hover {
  transform: translateY(-3px);
  background: #fff;
}
.archive-card-media {
  aspect-ratio: 4 / 3;
  background: rgba(53,51,50,.03);
}
.archive-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.archive-card-image-empty {
  width: 100%;
  height: 100%;
  background: #fff;
}
.archive-card-info {
  padding: 16px 0 20px;
  text-align: left;
}
.archive-card .project-name {
  font-size: clamp(20px, 1.9vw, 30px);
  line-height: 1.05;
  letter-spacing: 0 !important;
  margin-bottom: 2px;
}
.archive-card .project-cat {
  color: var(--project-cat-color) !important;
  letter-spacing: 0 !important;
  margin-bottom: 0;
  margin-top: 0;
  line-height: 1.2;
}

/* LOGOS PAGE */
.logos-wrap {
  padding: var(--page-top-offset) var(--nav-pad-x) 80px;
}
.logos-head {
  margin-bottom: 40px;
}
.logos-title {
  color: var(--accent) !important;
  font-size: clamp(20px, 2.4vw, 36px) !important;
  line-height: 1.1;
  text-transform: none;
  margin: 0;
}
.logos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.2vw, 56px);
  align-items: center;
}
.logos-item {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logos-item-img {
  max-width: min(100%, 340px);
  width: auto;
  height: auto;
  display: block;
}
.logos-empty {
  color: #888 !important;
  letter-spacing: 0 !important;
  text-transform: none;
}

/* Логичные брейкпоинты для страницы логотипов */
@media (min-width: 1360px) {
  .logos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(28px, 3vw, 64px);
  }
}
@media (max-width: 1100px) {
  .logos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------
 * PROFILE
 * --------------------------------------------------------------- */
.profile-wrap { padding: var(--page-top-offset) 40px 80px; }
.profile-kicker {
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--gray);
  text-transform: none;
  margin-bottom: 16px;
}
.profile-title {
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 128px);
  line-height: .95;
  font-weight: 900;
  text-transform: none;
  margin-bottom: 60px;
}
.page .profile-title,
.page-template-page-profile .profile-title {
  font-size: clamp(18px, 2.2vw, 34px) !important;
  line-height: 1.1;
  color: var(--accent) !important;
  text-align: left;
}
.profile-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 80px;
  align-items: start;
}
.profile-body .left { text-transform: none; }
.profile-body .left p { margin-bottom: 16px; font-size: 1.25rem; line-height: 1.8; color: var(--white); font-weight: 400; }
.profile-body .right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 110px;
  align-self: start;
}

/* MOBILE */
@media (max-width: 768px) {
  :root {
    --nav-pad-y: 20px;
    --nav-pad-x: 24px;
  }
  .site-nav { padding: var(--nav-pad-y) var(--nav-pad-x); }
  .site-nav::after {
    left: var(--nav-pad-x);
    right: var(--nav-pad-x);
  }
  .nav-side {
    margin-left: auto;
    margin-right: 0;
    gap: 0;
  }
  .nav-toggle {
    display: flex;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    width: 24px;
    height: 24px;
  }
  .nav-toggle:hover {
    border-color: transparent !important;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    margin: 0;
    list-style: none;
    border-bottom: 1px solid var(--border);
    background: #fff;
    backdrop-filter: blur(12px);
    z-index: 101;
  }
  .site-nav.is-open .nav-links { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a {
    display: block;
    padding: 16px 24px;
    color: var(--white);
    text-align: right;
  }
  .hero-content { padding: 0 24px 48px; }
  .hero-scroll-hint { display: none; }
  .hero-marquee {
    left: 0;
    right: 0;
    bottom: 20px;
    padding: 0;
  }
  .ps-body .hero-marquee {
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
  }
  .home-text-widget {
    left: var(--nav-pad-x);
    right: auto;
    top: 96px !important;
    width: calc(100vw - 48px);
    min-height: 120px;
    padding: 0 !important;
  }
  .hero-marquee-item { margin-right: 40px; }
  .home-featured {
    padding: 80px 24px 60px;
  }
  .home-featured-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 28px;
  }
  .home-featured-item,
  .home-featured-item:nth-child(4n + 1),
  .home-featured-item:nth-child(4n + 2),
  .home-featured-item:nth-child(4n + 3),
  .home-featured-item:nth-child(4n + 4) {
    grid-column: auto;
    margin-top: 0;
    padding-top: 0;
  }
  .about { grid-template-columns: 1fr; padding: 80px 24px; gap: 48px; }
  .about-number { display: none; }
  .work { padding: 80px 24px; }
  .work-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .project { grid-template-columns: 48px 1fr auto; gap: 16px; padding: 24px; }
  .services { grid-template-columns: 1fr; padding: 80px 24px; }
  .services-left { position: static; }
  .service { flex-direction: column; align-items: flex-start; }
  .cta { padding: 100px 24px; }
  .site-footer { flex-direction: row; gap: 16px; text-align: left; }
  .site-footer::before {
    left: 24px;
    right: 24px;
  }
  .ps-wrap, .archive-wrap, .profile-wrap { padding: var(--page-top-offset-mobile) 24px 60px; }
  .logos-wrap { padding: var(--page-top-offset-mobile) var(--nav-pad-x) 60px; }
  .logos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 5vw, 36px);
  }
  .archive-cards { grid-template-columns: 1fr; gap: 16px; }
  .archive-filter { padding: 0; }
  .ps-meta { grid-template-columns: 1fr; gap: 16px; }
  .single-post .ps-meta,
  .is-portfolio-single .ps-meta {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "back meta"
      "title title";
    align-items: start;
    gap: 10px 12px;
  }
  .single-post .ps-back,
  .is-portfolio-single .ps-back {
    grid-area: back;
    justify-self: start;
    white-space: nowrap;
  }
  .single-post .ps-meta-v,
  .is-portfolio-single .ps-meta-v {
    grid-area: meta;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
  }
  .single-post .ps-title,
  .is-portfolio-single .ps-title {
    grid-area: title;
    justify-self: stretch;
    text-align: right;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .profile-body { grid-template-columns: 1fr; gap: 40px; }
  .profile-body .right { position: static; top: auto; }
  .ps-nav { grid-template-columns: 1fr; padding: 24px; }
  .is-portfolio-single .ps-nav { padding: 20px 0 8px; }
}

@media (max-width: 640px) {
  .logos-grid {
    grid-template-columns: 1fr;
  }
}
