:root {
  --graphite: #11110f;
  --graphite-2: #1b1b18;
  --paper: #f4f0e7;
  --paper-2: #e7dfd0;
  --ink: #171714;
  --muted: #6a6258;
  --lime: #d8ff45;
  --red: #ff6542;
  --line-dark: rgba(244, 240, 231, 0.18);
  --line-light: rgba(17, 17, 15, 0.16);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Arial,
    sans-serif;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 18px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--lime);
  color: var(--graphite);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(17, 17, 15, 0.98) 0%, rgba(17, 17, 15, 0.9) 44%, rgba(17, 17, 15, 0.44) 100%),
    linear-gradient(0deg, rgba(17, 17, 15, 0.26), rgba(17, 17, 15, 0.26)),
    url("./assets/pavel-garskiy-hero-wide.jpg") right top / cover no-repeat,
    var(--graphite);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(244, 240, 231, 0.045) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(244, 240, 231, 0.035) 0 1px, transparent 1px 42px);
  opacity: 0.72;
}

.hero__scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(17, 17, 15, 0.75));
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 64px;
}

.hero__identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.hero__identity .eyebrow {
  margin: 0;
}

.hero__avatar {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border: 2px solid rgba(244, 240, 231, 0.84);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.44);
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--lime);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: 82px;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 840px;
  margin-bottom: 24px;
  color: var(--paper);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.08;
}

.hero__copy {
  max-width: 780px;
  margin-bottom: 18px;
  color: rgba(244, 240, 231, 0.88);
  font-size: 21px;
}

.hero__meta {
  max-width: 760px;
  margin-bottom: 30px;
  color: rgba(244, 240, 231, 0.7);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.hero__meta span {
  display: block;
}

.hero__meta span + span {
  margin-top: 3px;
  color: rgba(244, 240, 231, 0.58);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.writing-card a::after,
.contact-links a::after {
  content: "->";
  margin-left: 6px;
}

.writing-card a:hover,
.writing-card a:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible {
  transform: translateY(-1px);
}

.section {
  position: relative;
  scroll-margin-top: 24px;
  padding: 72px 0;
}

.hero {
  scroll-margin-top: 0;
}

.section__inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.section__inner--two {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.section--light {
  background: var(--paper);
  color: var(--ink);
}

.section--dark {
  background: var(--graphite);
  color: var(--paper);
}

.section--focus {
  background: var(--paper-2);
  color: var(--ink);
  border-bottom: 1px solid var(--line-light);
}

.section--accent {
  background: var(--red);
  color: var(--graphite);
}

.section--contact {
  background: var(--lime);
  color: var(--graphite);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading--wide {
  max-width: 850px;
}

.section-heading p,
.rich-text p,
.ai-panel p,
.contact-block p {
  color: inherit;
}

.rich-text {
  max-width: 760px;
  font-size: 22px;
}

.rich-text p:last-child,
.ai-panel p:last-child,
.case-card p:last-child,
.writing-card p:last-child,
.contact-block p:last-child {
  margin-bottom: 0;
}

.case-grid,
.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.writing-grid {
  grid-template-columns: repeat(2, 1fr);
}

.case-card,
.writing-card {
  min-height: 100%;
  padding: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--graphite-2);
}

.writing-card {
  border-color: var(--line-light);
  background: #fffaf0;
}

.case-card__label,
.writing-card__meta {
  display: block;
  margin-bottom: 18px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.writing-card__meta {
  color: var(--red);
}

.case-card p,
.section--dark .section-heading p {
  color: rgba(244, 240, 231, 0.74);
}

.topic-list {
  border-top: 1px solid var(--line-light);
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 60px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-light);
}

.topic-row h3 {
  margin-bottom: 0;
}

.topic-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
}

.ai-panel {
  padding-top: 8px;
  font-size: 21px;
}

.process-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 34px;
}

.process-line span {
  position: relative;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 2px solid rgba(17, 17, 15, 0.8);
  border-radius: 6px;
  color: var(--graphite);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.process-line span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: rgba(17, 17, 15, 0.8);
}

.writing-card h3 {
  color: var(--ink);
}

.writing-card p {
  color: var(--muted);
}

.writing-card a {
  display: inline-flex;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 56px;
  align-items: start;
}

.contact-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.contact-topics span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid rgba(17, 17, 15, 0.84);
  border-radius: 6px;
  color: var(--graphite);
  font-size: 16px;
  font-weight: 800;
}

.contact-block {
  max-width: none;
}

.contact-block h2 {
  font-size: 58px;
}

.contact-block p {
  max-width: 760px;
  font-size: 23px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 11px 16px;
  border: 2px solid var(--graphite);
  border-radius: 6px;
  background: var(--graphite);
  color: var(--lime);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(17, 17, 15, 0.22);
}

.contact-links--hero {
  max-width: 760px;
}

.contact-links--hero a {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--graphite);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.34);
}

.product-intro {
  margin-bottom: 36px;
}

.product-intro h2 {
  margin-bottom: 0;
}

.product-video {
  margin: 0;
}

.product-video__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  background: var(--graphite);
  box-shadow: 0 24px 60px rgba(17, 17, 15, 0.22);
}

.product-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--graphite);
}

.product-video__play {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product-video__play[hidden] {
  display: none;
}

.product-video__pill {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 10px;
  border-radius: 99px;
  background: var(--lime);
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}

.product-video__play:hover .product-video__pill,
.product-video__play:focus-visible .product-video__pill {
  transform: translateY(-2px);
}

.product-video__play:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: -3px;
}

.product-video__icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--graphite);
}

.product-video__icon::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--lime);
}

.product-video figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 1179px) {
  .product-video__pill {
    padding: 4px;
  }

  .product-video__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

.section--compact {
  padding: 32px 0;
}

.section-heading--compact {
  margin-bottom: 12px;
}

.section-heading--compact h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.section--compact .writing-grid {
  gap: 12px 32px;
}

.section--compact .writing-card {
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line-light);
  border-radius: 0;
  background: transparent;
}

.section--compact .writing-card__meta {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.section--compact .writing-card h3 {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.25;
}

.section--compact .writing-card p {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.section--compact .writing-card a {
  margin-top: 0;
  font-size: 14px;
}

.speaking-card {
  width: min(100%, 680px);
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  background: #fffaf0;
}

.carousel {
  position: relative;
  width: 100%;
  background: var(--graphite);
}

.carousel:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.carousel__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__track {
  display: flex;
  width: 100%;
}

.carousel__slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.carousel__slide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  vertical-align: middle;
}

.carousel__nav {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 15, 0.58);
  color: #fffaf0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.carousel.is-ready .carousel__nav {
  display: block;
}

.carousel__nav--prev {
  left: 12px;
}

.carousel__nav--next {
  right: 12px;
}

.carousel__dots {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  pointer-events: none;
}

.carousel.is-ready .carousel__dots {
  pointer-events: auto;
}

.carousel__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.carousel__dots button[aria-current="true"] {
  width: 18px;
  background: var(--lime);
}

.speaking-card__body {
  padding: 22px 24px 24px;
}

.speaking-card__body .section-kicker {
  margin-bottom: 10px;
}

.speaking-card h3 {
  margin-bottom: 8px;
}

.speaking-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 980px) {
  body {
    font-size: 17px;
  }

  .hero {
    background-position: right top;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 38px;
  }

  .hero__lead {
    font-size: 28px;
  }

  .hero__copy,
  .rich-text,
  .ai-panel {
    font-size: 20px;
  }

  .talk h1 {
    font-size: 36px;
  }

  .section__inner--two,
  .contact-layout,
  .topic-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(17, 17, 15, 0.98) 0%, rgba(17, 17, 15, 0.9) 56%, rgba(17, 17, 15, 0.72) 100%),
      url("./assets/pavel-garskiy-hero-wide.jpg") 66% top / cover no-repeat,
      var(--graphite);
  }

  .hero__inner,
  .section__inner {
    width: min(100% - 32px, var(--max));
  }

  .hero__inner {
    padding-top: 70px;
    padding-bottom: 30px;
  }

  .hero__identity {
    align-items: flex-start;
    gap: 12px;
  }

  .hero__avatar {
    width: 72px;
    height: 72px;
  }

  h1 {
    font-size: 42px;
    line-height: 1;
  }

  .talk h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 31px;
  }

  h3 {
    font-size: 22px;
  }

  .hero__lead {
    font-size: 24px;
  }

  .hero__copy,
  .rich-text,
  .ai-panel,
  .topic-row p,
  .contact-block p {
    font-size: 18px;
  }

  .hero__meta {
    font-size: 15px;
  }

  .section {
    padding: 54px 0;
  }

  .case-grid,
  .writing-grid,
  .process-line {
    grid-template-columns: 1fr;
  }

  .case-card,
  .writing-card {
    padding: 22px;
  }

  .process-line span:not(:last-child)::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -10px;
    width: 2px;
    height: 10px;
  }

  .contact-block h2 {
    font-size: 36px;
  }

  .product-intro {
    margin-bottom: 24px;
  }

  .product-video__pill {
    left: 10px;
    bottom: 10px;
  }

  .product-video__icon {
    width: 36px;
    height: 36px;
  }

  .product-video__icon::after {
    left: 14px;
    top: 11px;
    border-width: 7px 0 7px 11px;
  }

  .product-video figcaption {
    font-size: 14px;
  }

  .section-heading--compact h2 {
    font-size: 18px;
  }

  .contact-topics span {
    min-height: 40px;
    font-size: 15px;
  }
}

/* Первый экран + видео VIBEM: видео должно попадать в первый экран */
.hero {
  min-height: auto;
}

.hero__inner {
  padding: 44px 0 40px;
}

.hero__identity {
  margin-bottom: 14px;
}

.hero__avatar {
  width: 68px;
  height: 68px;
}

.hero h1 {
  margin-bottom: 10px;
  font-size: 64px;
}

.hero__lead {
  margin-bottom: 16px;
  font-size: 28px;
}

.hero__copy {
  max-width: 900px;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.5;
}

.hero__meta {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: 15px;
}

.section--product {
  padding: 40px 0 56px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 48px;
  align-items: center;
}

.product-intro {
  margin-bottom: 0;
}

.product-intro h2 {
  margin-bottom: 16px;
  font-size: 40px;
}

.product-intro .rich-text {
  font-size: 18px;
}

.product-intro .rich-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .hero h1 {
    font-size: 52px;
  }

  .hero__lead {
    font-size: 24px;
  }

  .hero__copy {
    font-size: 17px;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-intro h2 {
    font-size: 32px;
  }
}

@media (max-width: 720px) {
  .hero__inner {
    padding: 28px 0 28px;
  }

  .hero__avatar {
    width: 56px;
    height: 56px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero__lead {
    font-size: 21px;
  }

  .hero__copy {
    font-size: 16px;
  }

  .hero__meta {
    font-size: 14px;
  }

  .section--product {
    padding: 28px 0 40px;
  }

  .product-intro h2 {
    font-size: 26px;
  }

  .product-intro .rich-text {
    font-size: 16px;
  }
}

@media (min-width: 1180px) {
  .product-video__pill {
    top: 16px;
    right: 16px;
    bottom: auto;
    left: auto;
  }
}

@media (max-width: 720px) {
  .contact-links--hero {
    gap: 8px;
  }

  .contact-links--hero a {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 14px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.34);
  }

  .hero__copy {
    font-size: 15px;
  }

  .product-intro {
    display: contents;
  }

  .product-layout {
    gap: 0;
  }

  .product-intro .section-kicker {
    order: 1;
    margin-bottom: 8px;
  }

  .product-intro h2 {
    order: 2;
    margin-bottom: 14px;
  }

  .product-video {
    order: 3;
  }

  .product-intro .rich-text {
    order: 4;
    margin-top: 18px;
  }
}
