/* ---------- Text roll (label slides up on hover) ---------- */
.roll {
  display: inline-grid;
  overflow: hidden;
  height: 22px;
  line-height: 22px;
}

.roll__line {
  grid-area: 1 / 1;
  transition: transform 0.45s var(--ease);
}

.roll__line + .roll__line {
  transform: translateY(100%);
}

a:hover .roll__line,
button:hover .roll__line {
  transform: translateY(-100%);
}

a:hover .roll__line + .roll__line,
button:hover .roll__line + .roll__line {
  transform: translateY(0);
}

/* ---------- Pill button ---------- */
.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 24px 0 22px;
  border-radius: 100px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(14, 14, 14, 0.12);
  transition: transform 0.3s var(--ease);
}

.pill-button:active {
  transform: scale(0.97);
}

.pill-button__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---------- [ Bracket ] link ---------- */
.bracket-link {
  display: inline-flex;
  gap: 8px;
  font-size: 16px;
  line-height: 22px;
  transition: gap 0.3s var(--ease), opacity 0.3s;
}

.bracket-link:hover {
  gap: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
}

.site-header__bar {
  display: flex;
  align-items: center;
  max-width: var(--max);
  margin-inline: auto;
  padding: 18px var(--gutter);
  height: 86px;
}

.site-header__logo img {
  width: 133px;
  height: 50px;
  object-fit: contain;
}

.site-header__nav {
  display: flex;
  gap: 40px;
  margin-left: auto;
  margin-right: 68px;
}

.site-header__toggle {
  display: none;
  width: 32px;
  height: 32px;
  margin-left: auto;
  position: relative;
}

.site-header__toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.site-header__toggle span:first-child { top: 11px; }
.site-header__toggle span:last-child { top: 19px; }

.site-header.is-open .site-header__toggle span:first-child { top: 15px; transform: rotate(45deg); }
.site-header.is-open .site-header__toggle span:last-child { top: 15px; transform: rotate(-45deg); }

.mobile-menu {
  display: none;
}

@media (max-width: 809px) {
  .site-header__bar {
    height: 68px;
    padding-block: 10px;
    border-bottom: 1px solid var(--ink-05);
  }

  .site-header__logo img {
    width: 110px;
    height: 41px;
  }

  .site-header__nav,
  .site-header__cta {
    display: none;
  }

  .site-header__toggle {
    display: block;
  }

  .mobile-menu {
    display: grid;
    gap: 32px;
    position: absolute;
    inset: 68px 0 auto;
    padding: 24px var(--gutter) 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--ink-05);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.45s var(--ease), visibility 0s linear 0.45s;
  }

  .site-header.is-open .mobile-menu {
    clip-path: inset(0);
    visibility: visible;
    transition: clip-path 0.45s var(--ease);
  }

  .mobile-menu__nav {
    display: grid;
    gap: 16px;
  }

  .mobile-menu__link {
    font-size: 28px;
    line-height: 34px;
    font-weight: 600;
    letter-spacing: -0.04em;
  }

  .mobile-menu__cta {
    justify-self: start;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin: var(--section-gap) 8px 8px;
  padding: 40px 36px 36px;
  background: var(--dark);
  color: var(--white-60);
  border-radius: var(--radius-lg);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__nav,
.site-footer__social,
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.site-footer .bracket-link:hover {
  color: #fff;
}

.site-footer__headline {
  max-width: 860px;
  margin: 150px auto 190px;
  text-align: center;
  font-size: 60px;
  line-height: 72px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: 326px 349px 425px 1fr;
  align-items: end;
  gap: 24px 0;
}

.site-footer__brand img {
  width: 97px;
  height: 29px;
  object-fit: contain;
}

.site-footer__copyright {
  margin-top: 10px;
  font-size: 13px;
  line-height: 18px;
}

.site-footer__label {
  margin-bottom: 8px;
}

.site-footer__value {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  transition: opacity 0.3s;
}

.site-footer__value:hover {
  opacity: 0.7;
}

@media (max-width: 1199px) {
  .site-footer__headline {
    font-size: 48px;
    line-height: 58px;
    margin-block: 110px 140px;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

@media (max-width: 809px) {
  .site-footer {
    padding: 28px 20px 24px;
  }

  .site-footer__top {
    align-items: flex-start;
  }

  .site-footer__nav,
  .site-footer__social {
    flex-direction: column;
    gap: 10px;
  }

  .site-footer__social {
    align-items: flex-end;
  }

  .site-footer__headline {
    font-size: 40px;
    line-height: 48px;
    text-align: left;
    margin-block: 80px 96px;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-footer__brand { order: 4; }
  .site-footer__legal { order: 3; gap: 24px; }

  .site-footer__value {
    font-size: 22px;
    line-height: 29px;
  }
}

/* ---------- Section scaffolding ---------- */
.section {
  padding-top: var(--section-gap);
}

.section-label {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}

.section-title {
  max-width: 860px;
  font-size: 60px;
  line-height: 72px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink-60);
}

.section-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.section-title--right {
  text-align: right;
}

@media (max-width: 1199px) {
  .section-title {
    font-size: 48px;
    line-height: 58px;
  }
}

@media (max-width: 809px) {
  .section-label {
    font-size: 18px;
    line-height: 25px;
    margin-bottom: 24px;
  }

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

  .section-head--split {
    flex-direction: column;
    gap: 0;
  }

  .section-title--right {
    text-align: left;
  }
}

/* ---------- Page hero ("Work", "Blog", "Contacts") ---------- */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding-top: 34px;
}

.page-hero__title {
  font-size: 260px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.page-hero__text {
  max-width: 450px;
  margin-bottom: 44px;
  color: var(--ink-60);
}

.page-hero--center {
  justify-content: flex-start;
}

@media (max-width: 1199px) {
  .page-hero__title { font-size: 180px; }
}

@media (max-width: 809px) {
  .page-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 48px;
  }

  .page-hero__title {
    font-size: 80px;
    line-height: 88px;
  }

  .page-hero__text { margin-bottom: 0; }
}

/* ---------- Stats ---------- */
.stats {
  display: flex;
  gap: 40px;
}

.stats__value {
  font-size: 40px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stats__label {
  margin-top: 4px;
  color: var(--ink-60);
}

.stats--large .stats__value {
  font-size: 60px;
  line-height: 60px;
}

/* ---------- Slider arrows ---------- */
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  color: #fff;
  transition: background 0.3s;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
}

.slider-arrow--prev svg {
  transform: rotate(180deg);
}

.slider-arrow--small {
  width: 28px;
  height: 28px;
  margin-top: -14px;
  background: rgba(14, 14, 14, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- Work card (/projects grid, "Discover other projects") ---------- */
.work-card {
  display: block;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface);
}

.work-card__image {
  aspect-ratio: 540 / 303;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg);
}

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

.work-card:hover .work-card__image img {
  transform: scale(1.04);
}

.work-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 4px 6px;
}

.work-card__text {
  min-width: 0;
}

.work-card__title {
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-card__summary {
  margin-top: 2px;
  color: var(--gray);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-card__tag {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s;
}

.work-card:hover .work-card__tag {
  background: var(--ink);
  color: #fff;
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags--end {
  justify-content: flex-end;
}

.tag {
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(14, 14, 14, 0.05);
}

/* ---------- Contact form ---------- */
.contact-form__form {
  display: grid;
  gap: 16px;
}

.contact-form__field {
  display: grid;
  gap: 8px;
}

.contact-form__field label {
  color: var(--gray);
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
  letter-spacing: normal;
}

.contact-form__field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(14, 14, 14, 0.05);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.contact-form__field input::placeholder {
  color: var(--gray-light);
}

.contact-form__field input:focus {
  border-color: var(--accent);
  background: #fff;
}

.contact-form__error {
  color: #d03b3b;
  font-size: 13px;
}

.contact-form__submit {
  justify-self: center;
  margin-top: 16px;
}

.contact-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__success {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--lilac);
  text-align: center;
  font-weight: 500;
}

/* ---------- Rich text (blog, legal, legacy) ---------- */
.prose {
  color: var(--ink-60);
}

.prose > * + * {
  margin-top: 16px;
}

.prose h2,
.prose h3 {
  margin-top: 64px;
  color: var(--ink);
  font-size: 40px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.prose h4 {
  margin-top: 60px;
  color: var(--ink);
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.prose h5,
.prose h6 {
  margin-top: 32px;
  color: var(--ink);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 20px;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li + li {
  margin-top: 4px;
}

.prose blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.prose img {
  border-radius: var(--radius-lg);
}

@media (max-width: 809px) {
  .prose h2,
  .prose h3 {
    font-size: 28px;
    line-height: 34px;
  }

  .prose h4 {
    font-size: 22px;
    line-height: 29px;
    margin-top: 40px;
  }
}
