:root {
  --bg: #0f0f0f;
  --panel: #171717;
  --heading: #f2f2f2;
  --text: #d3d3d3;
  --muted: #9f9f9f;
  --accent: #591212;
  --accent-soft: #591212;
  --line: rgba(242, 242, 242, 0.1);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  --content-max: 1680px;
  --page-pad: 48px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(89, 18, 18, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 0 var(--page-pad);
  border-bottom: 1px solid rgba(242, 242, 242, 0.08);
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  color: var(--heading);
  font-size: 0.94rem;
  font-weight: 700;
}

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

.main-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 9px 14px;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.main-nav a:hover {
  background: rgba(89, 18, 18, 0.16);
  color: var(--heading);
}

.main-nav a.is-active {
  color: var(--heading);
  font-size: 0.96rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--heading);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-open .menu-toggle span:first-child {
  transform: translate3d(0, 4.5px, 0) rotate(45deg);
}

.menu-open .menu-toggle span:last-child {
  transform: translate3d(0, -4.5px, 0) rotate(-45deg);
}

.section-anchor {
  scroll-margin-top: var(--header-height);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 78svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(180deg, var(--bg) 0, var(--bg) 96px, rgba(15, 15, 15, 0.94) 132px, rgba(15, 15, 15, 0.72) 178px, rgba(15, 15, 15, 0) 260px),
    linear-gradient(90deg, rgba(15, 15, 15, 0.99) 0%, rgba(15, 15, 15, 0.9) 46%, rgba(15, 15, 15, 0.98) 100%),
    url("./assets/hero-bg.jpg");
  background-position: center;
  background-size: cover;
  opacity: 0.42;
  transform: translateZ(0) scale(1.02);
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 38%;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0), var(--bg));
  content: "";
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 108px var(--page-pad) 58px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contacts h2 {
  margin: 0;
  color: var(--heading);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 980px;
  font-size: 5rem;
  font-weight: 700;
}

.hero h1 span {
  display: block;
  color: rgba(242, 242, 242, 0.74);
}

.hero-copy {
  max-width: 730px;
  margin: 28px 0 0;
  color: var(--text);
  font-size: 1.25rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 12px 22px;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--heading);
}

.button-secondary {
  border-color: rgba(242, 242, 242, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
}

.section {
  padding: 74px 0 24px;
}

.blog-section {
  background:
    linear-gradient(180deg, rgba(89, 18, 18, 0.055), rgba(15, 15, 15, 0) 42%),
    var(--bg);
}

.blog-section .eyebrow {
  font-size: 0.86rem;
}

.section-inner {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 36px;
}

.section-heading--wide-carousel {
  width: min(55vw, 1036px);
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.section-heading--wide-carousel p:not(.eyebrow) {
  max-width: min(88%, 860px) !important;
}

@media (max-width: 820px) {
  .section-heading--wide-carousel p:not(.eyebrow) {
    max-width: 100% !important;
  }
}

.section-heading-spaced {
  margin-top: 90px;
}

.section-heading h2,
.contacts h2 {
  font-size: 3rem;
  font-weight: 700;
}

.section-heading p:not(.eyebrow),
.contacts p {
  margin: 18px 0 0;
  max-width: 700px;
  color: var(--text);
  font-size: 1rem;
}

.carousel {
  position: relative;
  margin-top: 32px;
}

.carousel--wide {
  width: min(55vw, 1036px);
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.section-heading--blog-carousel,
.carousel--blog {
  width: min(calc(100vw - (var(--page-pad) * 2)), 1080px);
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.carousel-track {
  display: flex;
  gap: 24px;
  margin: 0 calc(var(--page-pad) * -1);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px var(--page-pad) 22px;
  scroll-behavior: smooth;
  scroll-padding-inline: var(--page-pad);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.carousel--wide .carousel-track {
  gap: 0;
  margin: 0;
  padding: 6px 0 22px;
  scroll-padding-inline: 0;
}

.carousel--blog .carousel-track {
  gap: 20px;
  margin: 0;
  padding: 6px 0 22px;
  scroll-padding-inline: 0;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.project-card {
  flex: 0 0 min(78vw, 1480px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 242, 242, 0.08);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  scroll-snap-align: center;
  transform: translateZ(0);
  transition:
    border-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.carousel--wide .project-card {
  flex-basis: 100%;
}

.project-card--vertical {
  flex-basis: min(28vw, 390px);
  max-width: 390px;
}

.carousel--blog .project-card--vertical {
  flex-basis: calc((100% - 40px) / 3);
  max-width: none;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(89, 18, 18, 0.24), rgba(255, 255, 255, 0.04)),
    #101010;
  isolation: isolate;
}

.project-card--vertical .video-shell {
  aspect-ratio: 9 / 16;
}

.thumbnail-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--heading);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.thumbnail-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  transition: transform 260ms ease;
}

.project-card--vertical .thumbnail-image {
  object-fit: cover;
}

.thumbnail-button::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.34)),
    rgba(0, 0, 0, 0.08);
  content: "";
}

.thumbnail-button.is-fallback::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(89, 18, 18, 0.3), transparent 58%),
    #111;
  content: "";
}

.fallback-title {
  position: relative;
  z-index: 2;
  max-width: 75%;
  color: rgba(242, 242, 242, 0.82);
  font-weight: 700;
  text-align: center;
}

.play-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(242, 242, 242, 0.2);
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.58);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.play-mark::before {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid var(--heading);
  content: "";
}

.video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.project-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  min-height: 104px;
  padding: 24px;
}

.project-text {
  min-width: 0;
}

.project-title {
  margin: 0;
  color: var(--heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.project-title--comment {
  font-weight: 500;
}

.project-category {
  display: none;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.project-description {
  max-width: 940px;
  margin: 14px 0 0;
  color: rgba(211, 211, 211, 0.86);
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-link {
  justify-self: end;
  margin-top: 4px;
  border-bottom: 1px solid rgba(89, 18, 18, 0.58);
  color: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    border-color 180ms ease,
    color 180ms ease;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
}

.carousel-arrow {
  position: absolute;
  top: 32%;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(242, 242, 242, 0.16);
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.72);
  color: var(--heading);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.94;
  transform: translate3d(0, -50%, 0);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.carousel-arrow--prev {
  left: -68px;
}

.carousel-arrow--next {
  right: -68px;
}

.carousel-arrow:disabled {
  cursor: default;
  opacity: 0.28;
}

.carousel--vertical .carousel-arrow {
  display: none;
}

.carousel--blog .carousel-arrow {
  display: grid;
}

.carousel--blog .carousel-dots {
  display: flex;
}

.carousel-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(242, 242, 242, 0.18);
  cursor: pointer;
  padding: 0;
  transition:
    background-color 180ms ease,
    width 180ms ease;
}

.carousel-dot.is-active {
  width: 38px;
  background: var(--accent-soft);
}

.contacts {
  padding: 116px var(--page-pad) 108px;
}

.contacts-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding-top: 52px;
}

.contacts .eyebrow {
  margin-bottom: 22px;
}

.contacts p:not(.eyebrow) {
  margin-top: 22px;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translate3d(0, -2px, 0);
  }

  .button-primary:hover {
    background: #591212;
  }

  .button-secondary:hover {
    border-color: rgba(242, 242, 242, 0.26);
    background: rgba(255, 255, 255, 0.07);
  }

  .carousel-arrow:not(:disabled):hover {
    border-color: rgba(242, 242, 242, 0.28);
    background: var(--accent);
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1.04);
  }

  .project-card:hover {
    border-color: rgba(89, 18, 18, 0.34);
    box-shadow: 0 34px 82px rgba(0, 0, 0, 0.44);
    transform: translate3d(0, -5px, 0);
  }

  .thumbnail-button:hover .thumbnail-image {
    transform: translateZ(0) scale(1.035);
  }

  .thumbnail-button:hover .play-mark {
    background: rgba(89, 18, 18, 0.82);
    transform: translate3d(0, 0, 0) scale(1.04);
  }

  .project-link:hover {
    color: var(--heading);
    border-color: var(--heading);
  }
}

@media (max-width: 1180px) {
  :root {
    --page-pad: 34px;
  }

  .hero h1 {
    max-width: 820px;
    font-size: 3.75rem;
  }

  .hero-copy {
    font-size: 1.12rem;
  }

  .section-heading h2,
  .contacts h2 {
    font-size: 2.45rem;
  }

  .project-card--vertical {
    flex-basis: min(38vw, 360px);
  }

  .carousel--blog .project-card--vertical {
    flex-basis: calc((100% - 40px) / 3);
  }
}

@media (max-width: 820px) {
  :root {
    --page-pad: 22px;
    --header-height: 68px;
  }

  .site-header {
    padding: 0 var(--page-pad);
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 14px;
    left: 14px;
    display: grid;
    gap: 2px;
    visibility: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    padding: 10px;
    transform: translate3d(0, -8px, 0);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease;
  }

  .menu-open .main-nav {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .main-nav a {
    border-radius: 6px;
    padding: 13px 14px;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: 78svh;
  }

  .hero-bg {
    background-position: 58% center;
    opacity: 0.36;
  }

  .hero-inner {
    padding-top: 94px;
    padding-bottom: 50px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero-copy {
    margin-top: 22px;
    font-size: 1rem;
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 320px;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-top: 58px;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .section-heading-spaced {
    margin-top: 68px;
  }

  .section-heading h2,
  .contacts h2 {
    font-size: 2.05rem;
  }

  .carousel-track {
    gap: 16px;
    padding-bottom: 18px;
  }

  .carousel--wide {
    width: calc(100vw - 44px);
  }

  .section-heading--wide-carousel {
    width: calc(100vw - 44px);
  }

  .carousel--wide .carousel-track {
    gap: 0;
    padding-bottom: 18px;
  }

  .carousel-arrow {
    display: none;
  }

  .carousel--blog .carousel-arrow {
    display: none;
  }

  .project-card {
    flex-basis: calc(100vw - 44px);
  }

  .project-card--vertical {
    flex-basis: min(78vw, 320px);
  }

  .carousel--blog .carousel-track {
    gap: 14px;
  }

  .carousel--blog .project-card--vertical {
    flex-basis: calc((100% - 14px) / 2);
  }

  .project-meta {
    grid-template-columns: 1fr;
    min-height: 122px;
    padding: 18px;
  }

  .project-title {
    font-size: 1.18rem;
  }

  .project-link {
    justify-self: start;
  }

  .play-mark {
    width: 62px;
    height: 62px;
  }

  .contacts {
    padding: 86px var(--page-pad) 82px;
  }

  .contacts-inner {
    padding-top: 52px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.28rem;
  }

  .section-heading h2,
  .contacts h2 {
    font-size: 1.82rem;
  }

  .carousel-dot {
    width: 22px;
  }

  .carousel-dot.is-active {
    width: 32px;
  }
}

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .carousel .carousel-arrow,
  .carousel--blog .carousel-arrow {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.hero-actions .button.is-accent,
.contact-actions .button.is-accent {
  border-color: transparent !important;
  background: var(--accent) !important;
}

.hero-actions .button:not(.is-accent),
.contact-actions .button:not(.is-accent) {
  border-color: rgba(242, 242, 242, 0.16) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
