/* Shared typography, project navigation and footer — all standalone pages. */
:root {
  --font-family: 'Golos Text', sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

.wordmark {
  font-weight: 700;
}

/* Figma 112:32826 — shared navigation, motion and unpublished case states. */
html.enhanced-scroll {
  scroll-behavior: auto;
}

html {
  scroll-padding-top: 118px;
}

.compact-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.portfolio-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 24px 188px;
  gap: 24px;
  min-height: 82px;
  padding: 18px 0 0;
  font-size: 14px;
}

.portfolio-nav > a,
.portfolio-nav > .nav-unavailable {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.portfolio-nav b {
  font-weight: 650;
  text-transform: uppercase;
}

.portfolio-nav small {
  color: var(--muted);
  font-size: 14px;
}

.portfolio-nav .muted b,
.portfolio-nav .nav-unavailable {
  color: var(--muted);
}

.portfolio-nav a[aria-current="page"] b {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.portfolio-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.portfolio-nav > .theme {
  grid-column: 5;
  justify-self: end;
  align-self: start;
}

.header-contacts {
  grid-column: 6;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-content: start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -.02em;
}

.header-contact,
.header-contacts > a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-contacts img,
.theme img {
  display: block;
  flex: none;
}

.header-feedback {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1;
  width: max-content;
  max-width: min(300px, 80vw);
  margin: 6px 0;
  padding: 8px 12px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.header-feedback:empty { display: none; }
.theme .theme-icon--dark { display: none; }
.dark .theme .theme-icon--light { display: none; }
.dark .theme .theme-icon--dark { display: block; }
.dark .header-contacts img,
.dark .theme img { filter: invert(1); }

.home-header { position: relative; }
.home-header > .theme {
  position: absolute;
  top: calc(clamp(56px, 7.4vw, 110px) * .96);
  right: 0;
  padding: 0;
}
.home-header .status-row { padding-bottom: 20px; }
.home-page .avatar { width: 64px; height: 64px; overflow: hidden; }
.home-page .avatar img { width: 100%; height: 100%; object-fit: cover; }
.intro-copy p { margin: 0; }
.intro-copy p + p { margin-top: 1.31em; }
.reading-word { transition: opacity .12s linear; }

.cover-upcoming-b2b { background: radial-gradient(ellipse at 45% 35%, #fff9f7, #f1e5e3); }
.cover-upcoming-ds { background: #e7e7e7; }
.home-page .cover-neutral { background: #d9d5cc; }
.dark .cover-upcoming-b2b { background: radial-gradient(ellipse at 45% 35%, #453936, #2e2928); }
.dark .cover-upcoming-ds { background: #303030; }
.dark .cover-neutral { background: #35332f; }

.scroll-progress span {
  background: linear-gradient(110deg, #8b5cf6, #d879db, #f4ac93, #7aa7f9, #8b5cf6);
  background-size: 300% 100%;
  animation: progress-shimmer 9s ease-in-out infinite;
}
@keyframes progress-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.site-footer-bottom > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-up-icon {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
}

.project-nav-card:not(a):hover { background: #f6f6f3; }
.dark .project-nav-card:not(a):hover { background: #242422; }

@media (max-width: 1100px) {
  .home-header .portfolio-nav { grid-template-columns: repeat(3, minmax(0, 1fr)) 188px; }
  .home-header .header-contacts { grid-column: 4; }
}

@media (max-width: 800px) {
  .portfolio-nav,
  .home-header .portfolio-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 12px;
    padding: 16px 0;
  }
  .portfolio-nav > a,
  .portfolio-nav > .nav-unavailable { font-size: 12px; }
  .portfolio-nav small { font-size: 11px; }
  .compact-header .portfolio-nav > .nav-unavailable { display: none; }
  .portfolio-nav > .theme { grid-column: 3; grid-row: 2; justify-self: end; align-self: start; margin: 0; }
  .header-contacts,
  .home-header .header-contacts { grid-column: 1 / span 2; grid-row: 2; }
  .home-header > .theme { top: calc(clamp(42px, 10vw, 72px) * .96); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reading-word { opacity: 1 !important; transition: none; }
  .scroll-progress span { animation: none; transition: none; }
}

.site-footer {
  display: block;
  padding: 0;
  border: 0;
  font-size: 14px;
  color: var(--fg);
}

.site-footer-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  padding: 75px 0 105px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: -.02em;
}

.site-footer-main > * {
  min-width: 0;
}

.site-footer-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

.site-footer-email a {
  overflow-wrap: anywhere;
}

.site-footer-navigation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0;
}

.site-footer-description {
  max-width: 392px;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -.02em;
}

.site-footer-social,
.site-footer-social > a,
.site-footer-telegram {
  display: flex;
  align-items: center;
}

.site-footer-social {
  flex-wrap: wrap;
  gap: 12px 34px;
}

.site-footer-social > a,
.site-footer-telegram {
  gap: 8px;
  white-space: nowrap;
}

.site-footer-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.site-footer-feedback {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.site-footer-feedback:empty {
  display: none;
}

.site-footer img {
  display: block;
  flex: none;
}

.dark .site-footer img {
  filter: invert(1);
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 25px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.site-footer-bottom > :last-child {
  justify-self: end;
}

/* Contact details now live in the same footer on every page. */
.tariffs-case .tariff-next,
.story-projects {
  padding: 0;
}

.project-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 20px;
  margin-bottom: 0;
  border-top: 1px solid var(--rule);
}

.project-nav-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 150px;
  padding: 28px 32px;
  border: 0;
  border-radius: 8px;
  background: #f6f6f3;
  color: var(--fg);
  font-family: var(--font-family);
  transition: background .2s ease;
}

.project-nav-next {
  grid-template-columns: minmax(0, 1fr) 120px;
  text-align: right;
}

.project-nav-preview {
  margin: 0;
  width: 120px;
  height: 90px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--card);
}

.project-nav-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-nav-next .project-nav-preview {
  grid-column: 2;
  grid-row: 1;
}

.project-nav-next .project-nav-copy {
  grid-column: 1;
  grid-row: 1;
}

.project-nav-copy {
  min-width: 0;
}

.project-nav-direction {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-navigation .project-nav-copy h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.project-nav-copy p {
  margin: 9px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.02em;
  color: var(--muted);
}

.project-nav-card:hover {
  background: #eeeee9;
}

.dark .project-nav-card {
  background: #242422;
}

.dark .project-nav-card:hover {
  background: #30302c;
}

.tariffs-case .project-navigation {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .site-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }

  .site-footer-social {
    gap: 12px 24px;
  }
}

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

@media (max-width: 600px) {
  .site-footer-main {
    grid-template-columns: minmax(0, 1fr);
    padding: 55px 0 65px;
    gap: 32px;
  }

  .site-footer-navigation {
    padding-top: 0;
  }

  .site-footer-description {
    max-width: 430px;
    font-size: 22px;
  }

  .site-footer-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-size: 12px;
  }

  .site-footer-bottom > span:not([aria-hidden]) {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
  }

  .project-nav-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 18px;
  }

  .project-nav-next {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .project-nav-preview {
    width: 88px;
    height: 66px;
  }

  .project-navigation .project-nav-copy h2 {
    font-size: 21px;
  }

  .project-nav-copy p {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-nav-card {
    transition: none;
  }
}

/* Figma 396:27925 — contact controls shared by header and footer. */
.home-header .portfolio-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.home-header .header-contacts { grid-column: 5; }
.site-footer-contacts { justify-self: end; min-width: 0; }
.contact-links {
  position: relative;
  display: grid;
  grid-template-columns: 82px 74px;
  grid-auto-rows: 26px;
  gap: 7px 32px;
  align-content: start;
  justify-self: end;
  width: 188px;
  padding: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -.02em;
}
.contact-links > a,
.contact-links .header-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
.contact-links .header-contact > a { flex: 1; }
.contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
}
.contact-icon img { display: block; flex: none; max-width: none; }
.contact-links > [role="status"] {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 2;
  width: max-content;
  max-width: min(300px, 80vw);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.contact-links > [role="status"]:empty { display: none; }
.nav-unavailable { cursor: default; }
.portfolio-nav > .nav-unavailable:hover { color: var(--muted); text-decoration: none; }
.compact-brand { gap: 0 !important; }
.theme { width: 24px; height: 24px; padding: 0; align-items: center; justify-content: center; }
.theme-icon--light { display: grid; place-items: center; width: 24px; height: 24px; }
.theme:focus-visible,
.site-footer-copy:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
/* Scroll the large wordmark away while keeping the original navigation in view. */
.home-header {
  position: sticky;
  top: calc(-1 * var(--home-header-offset, 0px));
  z-index: 100;
  background: var(--bg);
}
.home-header.is-stuck { box-shadow: 0 1px 0 var(--rule); }
.home-header.is-stuck > .theme { top: calc(var(--home-header-offset) + 18px); right: 212px; }
@media (max-width: 1100px) {
  .home-header .portfolio-nav { grid-template-columns: repeat(3, minmax(0, 1fr)) 188px; }
  .home-header .header-contacts { grid-column: 4; }
  .site-footer-contacts { justify-self: start; }
}
@media (max-width: 800px) {
  .home-header .portfolio-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-links { justify-self: start; }
  .home-header .header-contacts { grid-column: 1 / span 2; grid-row: 2; }
  .home-header.is-stuck .portfolio-nav {
    grid-template-columns: max-content max-content minmax(0, 1fr);
  }
  .home-header.is-stuck .nav-unavailable {
    justify-self: end;
    padding-right: 36px;
  }
  .home-header.is-stuck .header-contacts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, max-content);
    justify-content: space-between;
    column-gap: 12px;
    width: 100%;
  }
  .home-header.is-stuck > .theme { top: calc(var(--home-header-offset) + 16px); right: 0; }
}
@media (max-width: 380px) {
  .portfolio-nav > .nav-unavailable { font-size: 11px; }
  .home-header.is-stuck .header-contacts { font-size: 12px; column-gap: 6px; }
  .home-header.is-stuck .header-contacts > a,
  .home-header.is-stuck .header-contact { gap: 4px; }
}
