﻿/* =========================================================
   denvm.ru — Components (header, hero, cards, forms, footer)
   ========================================================= */

/* --- Header ------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.header.is-stuck {
  border-bottom-color: var(--on-brand-line);
  box-shadow: 0 6px 24px rgba(4, 32, 60, 0.3);
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--on-brand);
}

.brand:hover {
  color: var(--on-brand);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--on-brand);
  color: var(--brand);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

/* The mark is a bitmap now instead of a letter: keep the 40x40 box and the
   rounded corners, drop the letter styling, and let the image fill it. */
img.brand__mark,
img.footer__mark {
  display: block;
  object-fit: cover;
  background: none;
  font-size: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  color: var(--on-brand);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__name em {
  font-style: normal;
  color: var(--on-brand-accent);
}

.brand__role {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--on-brand);
  letter-spacing: 0.01em;
}

.nav {
  justify-self: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  position: relative;
  display: block;
  padding: 10px 14px;
  color: var(--on-brand);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--on-brand-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}

.nav__link:hover {
  color: var(--on-brand-accent);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--on-brand-accent);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--on-brand-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--on-brand);
  transition: top 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.burger span:nth-child(1) {
  top: 16px;
}

.burger span:nth-child(2) {
  top: 21px;
}

.burger span:nth-child(3) {
  top: 26px;
}

.burger.is-open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* --- Buttons ------------------------------------------------ */

.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-bd: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    background-color 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(10, 102, 194, 0.24);
}

.btn:active {
  transform: translateY(0);
}

.btn__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.btn__icon svg {
  width: 13px;
  height: 13px;
}

.btn--accent {
  --btn-bg: var(--accent);
  --btn-bd: var(--accent);
  --btn-fg: #fff;
}

.btn--accent:hover {
  box-shadow: 0 12px 26px rgba(4, 32, 60, 0.4);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
}

.btn--ghost:hover {
  --btn-bd: var(--accent);
  --btn-fg: var(--accent);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.btn--outline {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-bd: #d7dde3;
}

.btn--outline:hover {
  --btn-bd: var(--accent);
  --btn-fg: var(--accent);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 13.5px;
}

.btn--block {
  width: 100%;
  justify-content: center;
}

.btn__arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}

.link-more:hover {
  color: var(--accent-dark);
}

.link-more svg {
  transition: transform 0.25s var(--ease);
}

.link-more:hover svg {
  transform: translateX(4px);
}

/* --- Hero ---------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 52px;
  padding-block: 56px 0;
}

.hero__media {
  position: relative;
  align-self: end;
  aspect-ratio: 1.16 / 1;
}

.hero__media::before {
  content: '';
  position: absolute;
  left: -30px;
  bottom: 0;
  width: 250px;
  height: 250px;
  border-radius: 50% 50% 0 50% / 50% 50% 50% 0;
  background: linear-gradient(140deg, #1180d6 0%, #074b8c 100%);
  z-index: 0;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 auto;
  width: 132px;
  height: 132px;
  background-image: radial-gradient(circle, var(--accent) 1.6px, transparent 1.7px);
  background-size: 15px 15px;
  opacity: 0.4;
  z-index: 1;
}

.hero__photo {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
  background: #e8ecef;
}

.hero__dot {
  position: absolute;
  z-index: 3;
  top: 26px;
  left: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(10, 102, 194, 0.14);
}

.hero__body {
  position: relative;
  padding: 8px 0 64px;
}

.hero__greeting {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 19px;
  font-weight: 500;
}

.hero__title {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero__role {
  margin-top: 6px;
  color: var(--ink);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: 560px;
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* --- Social links -------------------------------------------- */

.social {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.social svg {
  width: 18px;
  height: 18px;
}

/* Messenger marks are supplied as artwork, so they fill the round button
   without being clipped by its border-radius. */
.social__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.social:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

.social--light {
  color: var(--on-brand-muted);
  background: rgba(255, 255, 255, 0.08);
}

.social--light:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-2px);
}

/* Inline icons inherit a text-sized box unless overridden below */
.btn > svg,
.link-more > svg,
.slider__btn > svg,
.to-top > svg,
.form__success > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.to-top > svg {
  width: 18px;
  height: 18px;
}

/* --- About / info cards -------------------------------------- */

.about__text {
  margin-top: 22px;
  max-width: 420px;
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.fact {
  padding: 28px 12px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.fact:hover {
  transform: translateY(-4px);
  border-color: var(--accent-100);
  box-shadow: var(--shadow-md);
}

.fact__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent-50);
  color: var(--accent);
}

.fact__icon svg {
  width: 22px;
  height: 22px;
}

.fact__label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fact__value {
  margin-top: 6px;
  color: var(--body);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* --- Skills -------------------------------------------------- */

.skill {
  margin-top: 22px;
}

.skill__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}

.skill__value {
  color: var(--body);
  font-weight: 500;
}

.skill__track {
  height: 7px;
  border-radius: 999px;
  background: #eef1f3;
  overflow: hidden;
}

.skill__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1180d6 0%, #0a66c2 100%);
  transition: width 1.2s var(--ease);
}

/* --- Services ------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.service {
  position: relative;
  padding: 34px 14px 30px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.service:hover {
  transform: translateY(-5px);
  border-color: var(--accent-100);
  box-shadow: var(--shadow-md);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--accent-50);
  color: var(--accent);
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease);
}

.service__icon svg {
  width: 26px;
  height: 26px;
}

.service:hover .service__icon {
  background: var(--accent);
  color: #fff;
}

.service__title {
  font-size: 14px;
  font-weight: 600;
}

.service__text {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.65;
}

/* --- Projects ------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Whole card is clickable via a stretched link, so the markup stays semantic */
.project__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius);
}

.project__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project:hover .project__media img {
  transform: scale(1.05);
}

.project__body {
  padding: 18px 20px 20px;
}

.project__title {
  font-size: 15.5px;
  font-weight: 600;
}

.project__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-style: normal;
}

.tag:hover {
  background: var(--accent-50);
  color: var(--accent);
}

.project__link {
  position: absolute;
  inset: 0;
}

/* --- Timeline (experience / education) ------------------------ */

.timeline-item {
  position: relative;
  padding: 0 0 26px 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item__dot {
  position: absolute;
  left: 0;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-100);
}

.timeline-item__top {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.timeline-item__period {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 116px;
}

.timeline-item__role {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.timeline-item__place {
  color: var(--body);
  font-size: 13.5px;
}

.timeline-item__period + div {
  flex: 1;
}

/* --- Testimonials --------------------------------------------- */

.slider {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.slider__track {
  display: flex;
  width: 100%;
  transition: transform 0.55s var(--ease);
}

.slider__slide {
  flex: 0 0 100%;
  min-width: 0;
}

.slider__nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #dfe4e8;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.slider__dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.slider__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.slider__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.quote {
  position: relative;
  padding: 30px 30px 26px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quote__mark {
  color: #d3e6f9;
  margin-bottom: 10px;
}

.quote__mark svg {
  width: 34px;
  height: 34px;
}

.quote__text {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
  font-style: italic;
}

.quote__author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.quote__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
}

.quote__name {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.quote__role {
  color: var(--body);
  font-size: 13px;
}

/* --- Blog ----------------------------------------------------- */

.post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post__media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface);
}

.post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.post:hover .post__media img {
  transform: scale(1.05);
}

.post__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.post__title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}

.post__excerpt {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.post__meta span + span::before {
  content: '•';
  margin-right: 10px;
}

.post__link {
  position: absolute;
  inset: 0;
}

/* --- Forms ----------------------------------------------------- */

.form {
  display: grid;
  gap: 14px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: block;
}

.field__label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.field__control {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 14.5px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field__control::placeholder {
  color: #a8b0ba;
}

.field__control:hover {
  border-color: #dbe1e6;
}

.field__control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 102, 194, 0.12);
}

textarea.field__control {
  min-height: 132px;
  resize: vertical;
}

.form__note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form__success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 13.5px;
  font-weight: 500;
}

.form__error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fdeced;
  color: #a1161f;
  font-size: 13.5px;
  font-weight: 500;
}

.form__error > svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.form__error a {
  color: inherit;
  font-weight: 600;
}

.field__control.is-invalid,
.field__control.is-invalid:hover {
  border-color: #d94a55;
}

.field__control.is-invalid:focus {
  border-color: #d94a55;
  box-shadow: 0 0 0 4px rgba(217, 74, 85, 0.14);
}

/* --- Contact list ---------------------------------------------- */

.contact-list {
  padding: 12px 26px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
}

.contact-item + .contact-item {
  border-top: 1px solid var(--line-2);
}

.contact-item__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--accent-50);
  color: var(--accent);
}

.contact-item__icon svg {
  width: 19px;
  height: 19px;
}

.contact-item__label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.contact-item__value {
  color: var(--body);
  font-size: 13.5px;
  word-break: break-word;
}

/* --- Page hero (inner pages) ------------------------------------ */

.page-head {
  position: relative;
  padding: 64px 0 56px;
  background: linear-gradient(180deg, #f7faf9 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
}

.page-head::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 102, 194, 0.08) 0%, rgba(10, 102, 194, 0) 70%);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span[aria-current] {
  color: var(--ink);
}

.page-head__title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-head__lead {
  max-width: 620px;
  margin-top: 12px;
  font-size: 16px;
}

/* Detail section: photo + content, used on every inner page */
.detail__title {
  margin-bottom: 18px;
  font-size: 27px;
  font-weight: 600;
}

.detail__body > * + * {
  margin-top: 24px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat {
  padding: 24px 20px;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat__value {
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat__label {
  margin-top: 6px;
  color: var(--body);
  font-size: 13.5px;
}

/* --- CTA band ------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  background: var(--ink);
}

.cta-band::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 102, 194, 0.35) 0%, rgba(10, 102, 194, 0) 70%);
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-band__title {
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
}

.cta-band__text {
  margin-top: 8px;
  color: #9aa4b1;
  max-width: 520px;
}

/* --- Footer ----------------------------------------------------- */

.footer {
  position: relative;
  padding: 62px 0 0;
  background: var(--brand);
  color: var(--on-brand-muted);
}

.footer a {
  color: var(--on-brand);
}

.footer a:hover {
  color: var(--on-brand);
}

.footer__grid {
  display: grid;
  /* The quick-links column is the only one carrying content now (the third is
     held for the analytics counter), so it takes the extra width and the menu
     stays on a single centred line. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 44px;
  padding-bottom: 46px;
}

/* First footer column: brand centred with the messenger row beneath it. */
.footer__intro {
  text-align: center;
}

.footer__intro .footer__brand {
  display: inline-flex;
  margin: 0 auto 16px;
}

.footer__intro .footer__socials {
  justify-content: center;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--on-brand);
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--on-brand);
  color: var(--brand);
  font-size: 17px;
  font-weight: 700;
}

.footer__name {
  color: var(--on-brand);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer__name em {
  font-style: normal;
  color: var(--on-brand-accent);
}

.footer__role {
  color: var(--on-brand);
  font-size: 13.5px;
}

.footer__title {
  margin-bottom: 18px;
  color: var(--on-brand);
  font-size: 15px;
  font-weight: 600;
}

.footer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px 30px;
}

.footer__links li {
  white-space: nowrap;
}

.footer__links a {
  position: relative;
  padding: 4px 0;
  font-size: 14px;
  transition: color 0.2s var(--ease);
}

.footer__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--on-brand-accent);
  transition: width 0.25s var(--ease);
}

.footer__links a:hover::after {
  width: 100%;
}

.footer__socials {
  display: flex;
  gap: 10px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--on-brand-line);
  color: var(--on-brand-muted);
  font-size: 13px;
  text-align: center;
}

.footer__bottom a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Floats above the content, so the top is reachable from anywhere.
   z-index keeps it under the lightbox (300) and the open mobile nav. */
.to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(10, 102, 194, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    background-color 0.25s var(--ease), visibility 0.25s var(--ease);
}

/* `visibility` also drops it out of the tab order while hidden. */
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.to-top:hover {
  transform: translateY(-3px);
  background: var(--accent-dark);
}

.to-top:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* --- Gallery + lightbox ---------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.gallery__item {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 61, 110, 0.35);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.gallery__item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-100);
  box-shadow: var(--shadow-md);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__item:hover::after {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 26, 48, 0.92);
  backdrop-filter: blur(3px);
  animation: lb-fade 0.25s var(--ease);
}

.lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  max-height: 100%;
  animation: lb-zoom 0.25s var(--ease);
}

.lightbox__figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
  max-height: 100%;
}

.lightbox__img,
.lightbox__video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(88vw, 1100px);
  max-height: 74vh;
  border-radius: var(--radius);
  background: #0d1520;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__audio {
  display: block;
  width: min(88vw, 520px);
}

.lightbox__video[hidden],
.lightbox__audio[hidden],
.lightbox__img[hidden] {
  display: none;
}

/* Wide poster for the video entry */
.gallery--video {
  grid-template-columns: minmax(0, 1fr);
}

.gallery__item--wide {
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

/* Album covers are 3:2 and carry their titles baked into the artwork, so the
   cells match that ratio and `contain` keeps every cover fully visible. */
.gallery--audio {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gallery--audio .gallery__item {
  aspect-ratio: 3 / 2;
}

.gallery--audio .gallery__item img {
  object-fit: contain;
}

/* Certificate previews: exactly two per row in a fixed 16:9 window, no
   captions. `cover` fills the window, so portrait certificates show a
   horizontal band — the lightbox carries the whole document. */
.gallery--cert {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.gallery--cert .gallery__item {
  aspect-ratio: 16 / 9;
}
/* Screenshot of a live site: one click opens it in a new tab. */
.case + .case {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.case__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.case .prose {
  margin-bottom: 0;
}

.case .prose p:last-child {
  margin-bottom: 0;
}

.site-shot {
  display: block;
  margin-top: 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-shot:hover {
  transform: translateY(-3px);
  border-color: var(--accent-100);
  box-shadow: var(--shadow-md);
}

.site-shot__img {
  display: block;
  width: 100%;
  height: auto;
}

.site-shot__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--white);
}

.site-shot__label {
  font-weight: 600;
}

.site-shot__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-shot__hint svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.gallery__play {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(10, 102, 194, 0.92);
  color: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.34);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
  pointer-events: none;
}

.gallery__play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.gallery__item--wide:hover .gallery__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--accent-dark);
}

.lightbox__caption,
.lightbox__counter {
  margin: 0;
  color: #c7d4e2;
  font-size: 13px;
  text-align: center;
}

.lightbox__caption:empty {
  display: none;
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.lightbox__btn svg {
  width: 20px;
  height: 20px;
}

.lightbox__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.lightbox__btn--close {
  position: fixed;
  top: 20px;
  right: 20px;
}

/* Nav buttons float over the backdrop so they never squeeze the image */
.lightbox__btn--prev,
.lightbox__btn--next {
  position: fixed;
  top: 50%;
  margin-top: -22px;
}

.lightbox__btn--prev {
  left: 20px;
}

.lightbox__btn--next {
  right: 20px;
}

.lightbox__counter {
  margin: 0;
  color: #8fa3b8;
  font-size: 12.5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@keyframes lb-fade {
  from {
    opacity: 0;
  }
}

@keyframes lb-zoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

/* --- 404 --------------------------------------------------------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 62vh;
  text-align: center;
  padding: 70px var(--gutter);
}

.notfound__code {
  color: var(--accent);
  font-size: clamp(72px, 14vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}

.notfound__title {
  margin-top: 12px;
  font-size: 28px;
}

.notfound__text {
  margin: 12px auto 26px;
  max-width: 460px;
}

/* --- Form error dialog ---------------------------------------- */
/* Оформление повторяет лайтбокс: тот же фон, то же появление, та же кнопка. */

.alert {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.alert[hidden] {
  display: none;
}

.alert__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 26, 48, 0.6);
  backdrop-filter: blur(2px);
  animation: lb-fade 0.2s var(--ease);
}

.alert__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 26px 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  animation: lb-zoom 0.2s var(--ease);
}

.alert__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: #fdeced;
  color: #c0272f;
}

.alert__icon svg {
  width: 22px;
  height: 22px;
}

.alert__title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.alert__text {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.55;
}

.alert__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 2px 0 6px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  list-style: none;
}

.alert__list[hidden] {
  display: none;
}

.alert__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--body);
  font-size: 13.5px;
}

.alert__list li[hidden] {
  display: none;
}

.alert__list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d94a55;
}

.alert__list strong {
  color: var(--ink);
  font-weight: 500;
}

.alert__close {
  margin-top: 2px;
  padding: 11px 24px;
  font-size: 14px;
}

.alert__mail {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-100);
}

.alert__mail[hidden] {
  display: none;
}

.alert__mail:hover {
  border-bottom-color: var(--accent);
}
