@import "./fonts.css";

:root {
  --l: #c8102e;
  --d: #0f0f0f;
  --f-h: "Humane", system-ui, sans-serif;
  --f-nm: "Neue Montreal", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Chrome / interactive overlays shouldn't be selectable; content is.
   (Previously `user-select: none` was applied globally, which prevented
   visitors from selecting body copy or copying the contact email.) */
nav,
.menu-overlay,
.preloader,
.split-overlay,
.tags-overlay,
.scroll-progress,
#custom-cursor,
.home-marquee {
  user-select: none;
}

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

.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;
}

/* Keyboard skip link — hidden until focused. */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20002;
  margin: 0.5rem;
  padding: 0.6rem 1rem;
  font-family: var(--f-nm);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  background-color: var(--d);
  color: var(--l);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--l);
  outline-offset: 2px;
}

/* Visible keyboard focus for interactive elements (was missing site-wide). */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  z-index: 200;
  background-color: var(--d);
  mix-blend-mode: difference;
  pointer-events: none;
  will-change: width;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
}

body {
  font-family: var(--f-nm);
  background-color: var(--l);
  color: var(--d);
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Removed global saturate(0) to allow images to display their natural color and vibrancy. */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-h);
  line-height: 0.85;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(5rem, 20vw, 20rem);
}
h2 {
  font-size: clamp(4.5rem, 15vw, 15rem);
}
h3 {
  font-size: clamp(4rem, 12vw, 12rem);
}
h4 {
  font-size: clamp(3.5rem, 10vw, 10rem);
}
h5 {
  font-size: clamp(3rem, 8vw, 8rem);
}
h6 {
  font-size: clamp(2.5rem, 6vw, 6rem);
}

p {
  font-family: var(--f-nm);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.125;
  text-transform: uppercase;
}

p.md {
  font-size: 1.125rem;
}
p.lg {
  font-size: 1.25rem;
}

/* Long-form descriptive copy reads better in sentence case than all-caps.
   Short labels keep the brand's uppercase default; only running prose opts out.
   (All-caps multi-line text is measurably slower to read and worse for
   low-vision / dyslexic users.) */
.intro-heritage,
.faq-lede,
.about-col-copy p,
.clients-copy p {
  text-transform: none;
  line-height: 1.5;
  letter-spacing: 0;
}
.sample-project-content-wrapper h6,
.sample-project-details h6,
.faq-item dd {
  text-transform: none;
}

.container {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  padding: 2.5rem;
}

.line,
.word {
  position: relative;
  will-change: transform;
}

.line {
  display: block;
}
.word {
  display: inline-block;
}

.line-mask,
.word-mask {
  display: block;
  overflow: hidden;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}

@media (pointer: fine) {
  #custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20001;
    width: 28px;
    height: 28px;
    opacity: 0;
    background-color: var(--l);
    -webkit-mask: url("/icons/cursor.png") center / contain no-repeat;
    mask: url("/icons/cursor.png") center / contain no-repeat;
    mix-blend-mode: difference;
    pointer-events: none;
    user-select: none;
    transform: translate3d(var(--x, -100px), var(--y, -100px), 0)
      translate(-50%, -50%);
    transition: opacity 120ms ease;
    will-change: transform, opacity;
  }

  #custom-cursor.is-visible {
    opacity: 1;
  }

  .container {
    padding: 2.25rem;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform, clip-path, filter;
}

::view-transition-old(root) {
  animation: 1.5s cubic-bezier(0.87, 0, 0.13, 1) both move-out;
}

::view-transition-new(root) {
  clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  animation: 1.5s cubic-bezier(0.87, 0, 0.13, 1) both move-in;
}

@keyframes move-out {
  from {
    opacity: 1;
    filter: none;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    filter: brightness(0.25);
    transform: translateY(-35%);
  }
}

@keyframes move-in {
  from {
    clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
  }
  to {
    clip-path: polygon(0% 100%, 100% 100%, 100% 0%, 0% 0%);
  }
}
