/* TEM40K — Clay en estructura, trail en materia. */
:root {
  --ink: #0c0c0b;
  --paper: #f3efe6;
  --paper-2: #e7dfd1;
  --rallye: #ff5a2a;
  --dust: #6f6354;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Schibsted Grotesk", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1360px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .case img,
  .case:hover img { transform: none !important; }
  [data-in] { opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.28vw, 1.2rem);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection {
  background: var(--rallye);
  color: var(--paper);
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

.skip {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  text-decoration: none;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus,
.skip:focus-visible {
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.6rem;
  padding: 0.35rem var(--gutter);
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.2em;
  font-size: 0.92rem;
  text-decoration: none;
  text-transform: uppercase;
}
.nav__brand img {
  height: 3.4rem;
  width: auto;
  object-fit: contain;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 2.4vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.1rem;
  text-decoration: none;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.7rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.hero {
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 5.1rem var(--gutter) 1.15rem;
  box-sizing: border-box;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.8vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.042em;
  max-width: 12ch;
  margin: 0 0 0.95rem;
}
.showreel {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
}
.showreel__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #c4b8a4;
}
.showreel img,
.showreel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}
.showreel video {
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.showreel video.is-on { opacity: 1; }
.showreel:has(video.is-on) img { opacity: 0; }

.section { padding: clamp(3.8rem, 8vw, 7rem) 0; }
.section--tight { padding-top: 0; }
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dust);
  margin: 0 0 0.7rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 2px;
  margin-right: 0.55rem;
  background: var(--rallye);
  vertical-align: middle;
  transform: translateY(-0.12em);
}
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5.4vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.032em;
  margin: 0 0 0.95rem;
}
.lede {
  max-width: 38ch;
  margin: 0 0 2.4rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--dust));
  font-size: 1.05em;
}

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.2rem) clamp(1.1rem, 2vw, 1.8rem);
}
.case {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.case__frame {
  position: relative;
  overflow: hidden;
  background: #161513;
  aspect-ratio: 16/9;
}
.case__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 0%, transparent);
  transition: background 320ms var(--ease);
  pointer-events: none;
}
.case:hover .case__frame::after {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.case img,
.case video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.case video.is-on { opacity: 1; }
.case:has(video.is-on) img { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .case video { display: none; }
}
.case h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  margin: 0.85rem 0 0.2rem;
  line-height: 1.04;
}
.case__meta {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dust);
}

.brands {
  font-family: var(--font-body);
  font-size: 1.05em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dust);
  line-height: 1.65;
  max-width: 54ch;
  margin: 0;
}

.proof {
  padding: clamp(2.6rem, 5.5vw, 4.4rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.proof__grid > div {
  padding-right: clamp(1rem, 2.4vw, 2rem);
}
.proof__grid > div + div {
  padding-left: clamp(1rem, 2.4vw, 2rem);
  border-left: 1px solid var(--line);
}
.proof__n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  letter-spacing: -0.034em;
  line-height: 0.92;
  margin: 0 0 0.5rem;
  font-variant-numeric: tabular-nums;
}
.proof__l {
  margin: 0;
  color: var(--dust);
  max-width: 16ch;
  font-size: 0.92em;
  line-height: 1.42;
}

.logo-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.8rem);
  align-items: center;
}
.logo-wall li {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-wall img {
  width: 100%;
  height: auto;
  max-height: 5.6rem;
  object-fit: contain;
  filter: grayscale(0.15);
  opacity: 0.88;
  transition: opacity var(--t) var(--ease), filter var(--t) var(--ease);
}
.logo-wall li:hover img {
  opacity: 1;
  filter: none;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.8rem, 5.5vw, 5rem);
  align-items: center;
}
.about__frame {
  overflow: hidden;
  background: #161513;
  aspect-ratio: 4/5;
}
.about__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}
.about p {
  margin: 0 0 1.15rem;
  max-width: 38ch;
}
.about p:last-child { margin-bottom: 0; }

.talk {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 9vw, 7.2rem) var(--gutter);
}
.talk h2 { margin-bottom: 0.7rem; }
.talk a.mail {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 3.15rem);
  font-weight: 800;
  color: var(--rallye);
  text-decoration: none;
  letter-spacing: -0.024em;
  display: inline-block;
  min-height: 44px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 2px;
  background-position: 0 92%;
  background-repeat: no-repeat;
  transition: background-size 380ms var(--ease);
}
.talk a.mail:hover { background-size: 100% 2px; }
.talk .eyebrow { color: color-mix(in srgb, var(--paper) 48%, transparent); }

.feature {
  padding: 0 var(--gutter) clamp(2.8rem, 6.5vw, 5.4rem);
}
.feature__frame {
  overflow: hidden;
  background: #161513;
  aspect-ratio: 21/9;
}
@media (max-width: 800px) {
  .feature__frame { aspect-ratio: 16/9; }
}
.feature__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
.feature .wrap { margin-top: 1.35rem; }
.more {
  margin: 1.9rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.more a { text-decoration: none; }
.more a::after { content: " →"; }
.more a:hover { color: var(--rallye); }

.kit p { max-width: 48ch; }
.brand-list {
  list-style: none;
  margin: 0;
  padding: 0 0 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 2rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.page-hero {
  padding: 8.2rem var(--gutter) 1.8rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7.4vw, 5.4rem);
  line-height: 0.9;
  margin: 0 0 1.1rem;
  letter-spacing: -0.034em;
  max-width: 14ch;
}

footer {
  padding: 1.8rem var(--gutter) 2.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  border-top: 1px solid var(--line);
}
footer > span {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
}
footer a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
footer a:hover { color: var(--ink); }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.35rem;
}

[data-in] {
  opacity: 0;
  transform: translate3d(0, 1.1rem, 0);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-in].is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 800px) {
  .cases { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about__frame { aspect-ratio: 16/10; }
  .brand-list { grid-template-columns: 1fr; }
  .proof__grid { grid-template-columns: 1fr 1fr; }
  .proof__grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .proof__grid > div:nth-child(n+3) {
    padding-top: 1.4rem;
    margin-top: 1.4rem;
    border-top: 1px solid var(--line);
  }
  .logo-wall { grid-template-columns: 1fr 1fr; }
  .nav__links { gap: 0.7rem; }
  .nav__links a.nav__social { display: none; }
  .hero {
    height: auto;
    max-height: none;
  }
  .showreel { flex: 0 0 auto; }
  .showreel__frame {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}
@media (max-width: 640px) {
  .nav__word { display: none; }
  .nav__links { gap: 0.35rem; font-size: 0.68rem; }
  .nav__brand img { height: 2.85rem; }
  .nav { min-height: 4rem; }
  .hero { padding-top: 4.5rem; padding-bottom: 0.75rem; }
  .hero h1 { max-width: none; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: clamp(1.85rem, 8.6vw, 2.25rem); }
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.talk :focus-visible { outline-color: var(--paper); }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
