:root {
  --bg: #ffecec;
  --ink: #292929;
  --accent: #076b51;
  --headline: "Didact Gothic", Arial, sans-serif;
  --text: "Noto Sans", Arial, sans-serif;
  --container: 1200px;
  --gutter: 20px;
  --radius: 10px;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#cases,
#about {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

mark {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mark {
  background: rgba(35, 201, 157, 0.49);
}

.mark--rose {
  background: rgba(141, 16, 71, 0.27);
}

.mark--mint {
  background: rgb(196, 235, 225);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.site-header__bar {
  position: relative;
  height: var(--header-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__link {
  font-family: var(--headline);
  font-size: 24px;
  line-height: 1.3;
  text-transform: lowercase;
  text-decoration: none;
}

.site-header__logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.site-header__logo img {
  width: 220px;
  height: auto;
}

.burger {
  display: none;
  width: 28px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

.mobile-nav {
  display: none;
}

.mobile-nav a {
  font-family: var(--headline);
  font-size: 24px;
  text-transform: lowercase;
  text-decoration: none;
}

/* Home hero */
.hero {
  padding: 24px 0 20px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 261px minmax(0, 1fr) 271px;
  column-gap: 38px;
  align-items: start;
}

.hero__photo {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 261px;
  height: 244px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 22px;
}

.hero__name {
  grid-column: 2;
  font-family: var(--headline);
  font-size: 90px;
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -1px;
  text-transform: lowercase;
  margin: 18px 0 0;
}

.hero__contacts {
  grid-column: 3;
  text-align: right;
  margin-top: 39px;
  font-size: 24px;
  line-height: 1;
  text-transform: lowercase;
}

.hero__contacts a {
  display: block;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__contacts a + a {
  margin-top: 13px;
  text-decoration: none;
}

.hero__contacts a:last-child:hover {
  text-decoration: underline;
}

.hero__bio,
.hero__meta {
  grid-column: 2 / span 2;
  margin: 22px 0 0;
  font-size: 26px;
  line-height: 34px;
  max-width: 539px;
}

.hero__meta {
  margin-top: 21px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 46px 0 0;
  padding: 0;
  list-style: none;
}

.pills li,
.pill {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* Home sections */
.section-title {
  font-family: var(--headline);
  font-size: 80px;
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

.section-title--lower {
  text-transform: lowercase;
  letter-spacing: -1px;
}

.cases {
  padding-top: 60px;
  padding-bottom: 45px;
}

.cases .section-title {
  margin-bottom: 45px;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 40px;
}

.case-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}

.case-card img {
  width: 100%;
  aspect-ratio: 560 / 420;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.35s ease;
}

.case-card:hover img {
  transform: scale(1.015);
}

.experience {
  padding: 40px 0 80px;
}

.experience .section-title {
  margin-bottom: 48px;
}

.job {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 56px;
}

.job__date {
  font-family: var(--headline);
  font-size: 22px;
  line-height: 1;
  text-transform: lowercase;
  margin: 0 0 12px;
}

.job__role {
  font-size: 24px;
  font-weight: 500;
  line-height: 24px;
  margin: 0;
}

.job__body {
  font-size: 20px;
  line-height: 23px;
}

.job__body p {
  margin: 0 0 1em;
}

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

/* Case pages */
.case-hero {
  padding: 18px 0 40px;
}

.case-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
  min-height: 360px;
}

.case-hero__tags {
  margin: 20px 0 40px;
}

.case-hero__tags li {
  height: 38px;
  font-size: 20px;
  padding: 0 14px;
}

.case-hero__title {
  font-family: var(--headline);
  font-size: 50px;
  font-weight: 400;
  line-height: 60px;
  margin: 0 0 24px;
  max-width: 820px;
}

.case-hero__lead {
  font-size: 22px;
  line-height: 34px;
  max-width: 661px;
  margin: 0;
}

.case-hero__media {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 12px;
  justify-self: end;
}

.case-hero__cta {
  display: inline-flex;
  margin-top: 28px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

.case-body > h2 {
  font-family: var(--headline);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  margin: 75px 0 0;
}

.case-body > p,
.case-body .principle,
.case-body .feature-row,
.case-body .two-col,
.case-body .ba,
.case-body .teaser,
.case-body .covers,
.case-body .stats {
  margin: 15px 0;
}

.case-body > figure {
  margin: 15px 0 30px;
}

.case-body > figure img {
  width: 100%;
}

.case-body__last {
  padding-bottom: 75px;
}

.case-body ol,
.case-body ul,
.accordion__panel ol {
  margin: 0.4em 0;
  padding-left: 1.25em;
}

.accordion {
  padding-top: 35px;
}

.accordion__item {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.accordion__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--headline);
  font-size: 36px;
  font-weight: 400;
  color: var(--ink);
}

.accordion__icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  position: relative;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.accordion__icon::before {
  width: 22px;
  height: 2px;
}

.accordion__icon::after {
  width: 2px;
  height: 22px;
}

.accordion__item.is-open .accordion__icon::after,
.accordion__btn[aria-expanded="true"] .accordion__icon::after {
  opacity: 0;
}

.accordion__panel {
  padding: 0 0 28px;
  max-width: 920px;
}

.accordion__panel[hidden] {
  display: none;
}

.accordion__panel p {
  margin: 0 0 0.8em;
}

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

.split {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  column-gap: 40px;
  padding: 30px 0;
}

.split__title {
  margin: 0;
  padding: 7px 50px 7px 0;
  font-family: var(--headline);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.split__text {
  padding: 8px 0 6px;
  font-size: 20px;
  line-height: 31px;
}

.principle {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 15px 0;
}

.principle__num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--headline);
  font-size: 28px;
}

.principle__text {
  margin: 0;
  padding-top: 8px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 24px 0;
}

.feature-row--reverse {
  direction: rtl;
}

.feature-row--reverse > * {
  direction: ltr;
}

.feature-row__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}

.feature-row__text {
  margin: 0;
}

.feature-row__media,
.feature-row__media img {
  width: 100%;
  height: 300px;
  object-fit: contain;
}

.stats {
  padding: 45px 0 90px;
}

.stats__title {
  font-family: var(--headline);
  font-size: 36px;
  font-weight: 400;
  margin: 0 0 15px;
}

.stats__descr {
  font-size: 18px;
  margin: 0 0 40px;
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 40px;
}

.stat__num {
  font-family: var(--headline);
  font-size: 120px;
  font-weight: 400;
  line-height: 0.9;
  margin: 0 0 8px;
}

.stat__title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
}

.stat__descr {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

.stat:nth-child(2) {
  grid-column: 2;
}

.two-col {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 32px;
  align-items: start;
  padding: 15px 0;
}

.two-col__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}

.two-col__text {
  margin: 0;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 62%;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ba {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  user-select: none;
}

.ba__img {
  width: 100%;
}

.ba__top {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
}

.ba__top img {
  height: 100%;
  width: auto;
  max-width: none;
  min-width: 100%;
  object-fit: cover;
}

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--accent);
  transform: translateX(-50%);
}

.ba__handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
}

.teaser img {
  width: 100%;
  border-radius: var(--radius);
}

.teaser__link {
  font-family: var(--headline);
  font-size: 28px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 15px 0;
}

.covers img {
  width: 100%;
}

.site-footer {
  background: var(--accent);
  color: var(--bg);
  padding: 18px 0;
}

.site-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 18px;
}

.site-footer__links a {
  color: var(--bg);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__top {
  font-family: var(--headline);
  font-size: 20px;
  color: var(--bg);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 979px) {
  .site-header__logo {
    position: static;
    transform: none;
  }

  .site-header__logo img {
    width: 180px;
  }

  .site-header__link {
    display: none;
  }

  .burger {
    display: block;
  }

  .mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 20px 20px;
  }

  .hero__grid,
  .cases-grid,
  .job,
  .case-hero__layout,
  .split,
  .feature-row,
  .feature-row--reverse,
  .stats__grid,
  .two-col,
  .teaser,
  .covers {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .split {
    column-gap: 0;
    padding: 20px 0;
  }

  .split__title {
    padding: 0 0 8px;
  }

  .split__text {
    padding: 0;
  }

  .hero__photo {
    width: 100%;
    max-width: 261px;
    height: auto;
    aspect-ratio: 261 / 244;
    grid-row: auto;
    margin-top: 12px;
  }

  .hero__name,
  .hero__contacts,
  .hero__bio,
  .hero__meta {
    grid-column: 1;
    text-align: left;
    max-width: none;
  }

  .hero__name {
    font-size: 52px;
    margin-top: 24px;
  }

  .pills {
    margin-top: 24px;
  }

  .pills li {
    font-size: 16px;
    height: 36px;
  }

  .section-title {
    font-size: 48px;
  }

  .stat:nth-child(2) {
    grid-column: auto;
  }

  .case-hero__title {
    font-size: 32px;
    line-height: 1.2;
  }

  .case-hero__media {
    width: 180px;
    height: 180px;
    justify-self: start;
  }

  .case-body > h2,
  .accordion__btn {
    font-size: 26px;
  }

  .case-body > h2 {
    margin-top: 48px;
  }

  .site-footer__row {
    flex-direction: column;
    align-items: flex-start;
  }
}
