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

@property --link-fill {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}
@property --h3-fill {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

:root {
  --padding: 40px;
  --full: calc(100dvh - var(--padding) * 2);
  --bg: #f0f0f0;
  --fg: #333;
  --border: rgba(51, 51, 51, 0.2);
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}
html:has(body.dark) {
  --bg: #141414;
  --fg: #e6e6e6;
  --border: rgba(230, 230, 230, 0.18);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  background-color: var(--bg);
  padding: var(--padding);
}
body.loading,
body.scroll-lock {
  overflow: hidden;
  height: 100dvh;
}

body.loading header,
body.intro-open header {
  /* color: white; */
  cursor: wait;
}

body.intro-sequence nav ul {
  opacity: 0;
  visibility: hidden;
}

body.intro-black nav p,
body.intro-open:not(.intro-tagline-visible-offset) nav p {
  opacity: 0;
  transform: translateX(calc(35vw + var(--padding)));
}

body.intro-open nav p,
body.intro-outro-phase2 nav p {
  position: relative;
  z-index: 2;
}

body.intro-open.intro-tagline-visible-offset nav p {
  opacity: 1;
  transform: translateX(calc(35vw + var(--padding)));
}

body.intro-outro-phase2 nav p {
  opacity: 1;
  transform: translateX(0);
}

body.intro-black .intro video {
  opacity: 0;
}

.fade-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, var(--bg), transparent),
    linear-gradient(to top, var(--bg), transparent);
  background-size: 100% 20vh, 100% 20vh;
  background-position: top, bottom;
  background-repeat: no-repeat;
}
body.loading .intro,
body.intro-open .intro {
  opacity: 1;
}
body.footer-intro .intro {
  opacity: 1;
}
.intro {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s linear;
  background-color: var(--bg);
}
.intro video {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 40vmax;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 1.5s linear;
  z-index: 0;
  display: none;
}
body.intro-open .intro video {
  opacity: 1;
}
body.footer-intro .intro video {
  opacity: 1;
}

h1, h2 {
  font-size: inherit;
  font-weight: 400;
}
h1 {
  text-transform: lowercase;
  position: fixed;
  left: var(--padding);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 18px;
  font-weight: 550;
}
h1 .mode-toggle {
  opacity: 0.6;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  transition: opacity 0.35s ease;
}
h1 .mode-toggle.is-collapsed {
  opacity: 1;
}
h1 .mode-toggle.is-collapsed:has(.mode-chars:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 0.85em;
  min-height: 1em;
  min-height: 1cap;
  contain: layout;
}
.mode-chars {
  display: inline;
}
.mode-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 5px;
  height: 5px;
  margin: auto;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
  pointer-events: none;
  transition:
    opacity 0.4s linear,
    transform 0.5s  cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: 0s;
}
.mode-toggle.is-collapsed:has(.mode-chars:empty)::after {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.12s;
  will-change: transform, opacity;
}
header,
footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  height: var(--full);
}
header {
  position: relative;
  z-index: 3;
  transition: color .2s linear;
}
nav p {
  transition:
    opacity .5s linear,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
footer {
  margin-top: 49vh;
}
footer p:first-child {
  margin-top: -100dvh;
  grid-column-start: 3;
  position: sticky;
  top: calc((var(--full) / 2) + var(--padding));
}
footer p:last-child {
  opacity: 0.6;
  transform: translateY(-110%);
}
nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column: 3 / 5;
}
nav ul {
  display: flex;
  gap: 12px;
}
li {
  list-style: none;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translate(12px, 6px);
  }
}
/* Intro-only: once intro-sequence drops, until JS sets .intro-links-done (see index.html). */
body:not(.intro-sequence):not(.intro-links-done) nav ul:not(.appear) a {
  animation: appear 0.2s calc(var(--delay, 0ms) + 350ms) cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
nav ul.appear a {
  animation: appear 0.2s var(--delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
a {
  text-decoration: none;
  display: inline-block;
  color: transparent;
  -webkit-text-fill-color: transparent;
  --link-fill: 0%;
  background-image: linear-gradient(
    to right,
    var(--fg) 0%,
    var(--fg) var(--link-fill),
    color-mix(in srgb, var(--fg) 60%, transparent) var(--link-fill),
    color-mix(in srgb, var(--fg) 60%, transparent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  transition: --link-fill 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
a:hover,
a:focus-visible {
  --link-fill: 100%;
}
main {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 40px;
}
section {
  grid-column: 2 / 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  padding-top: 16px;
  margin-top: 120px;
  scroll-margin-top: 50vh;
}
section.sub-section {
  grid-column: 3 / 5;
  margin-top: -1px;
}
main > section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
main > section.is-line-visible::before {
  transform: scaleX(1);
}
section:first-child,
section.video-section + section {
  margin-top: 0;
}
section video {
  width: 100%;
}

.video-section {
  overflow: clip;
}

.video-section > div {
  min-height: 100vh;
}

.video-section video {
  position: sticky;
  top: 50vh;
  transform: translateY(-50%);
  filter: grayscale(1);
  transition: filter 2s .5s cubic-bezier(0.16, 1, 0.3, 1), opacity 2s linear;
  will-change: filter;
  opacity: 0.2;
}
.video-section.is-line-visible video {
  filter: grayscale(0);
  opacity: 1;
}
section > div {
  grid-column: 2 / 4;
}
section > div > p:first-child:not(:only-child) {
  margin-bottom: 16px;
}
.sub-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 48px;
  padding-top: 16px;
  transition-delay: 0.2s;
}
section .sub-section {
  position: relative;
}
section .sub-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
section .sub-section.is-line-visible::before {
  transform: scaleX(1);
}
.sub-section a {
  display: block;
  margin-bottom: 8px;
}
h3 {
  font-size: 4vmin;
  font-weight: 400;
  line-height: 1.2;
  grid-column: 1 / 4;
  text-align: center;
  max-width: 30ch;
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: 136px;
}
.h3-reveal-section {
  overflow: clip;
}
.h3-reveal-section > h2 {
  grid-column: 1 / 4;
}
.h3-reveal-section .h3-reveal-stage {
  grid-column: 1 / 4;
  min-height: 100vh;
}
.h3-reveal-section h3 {
  position: sticky;
  top: 48vh;
  transform: translateY(-50%);
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 140px;
  margin-bottom: 80px;
  color: transparent;
  -webkit-text-fill-color: transparent;
  --h3-fill: 0%;
  background-image: linear-gradient(
    to right,
    var(--fg) 0%,
    var(--fg) var(--h3-fill),
    color-mix(in srgb, var(--fg) 60%, transparent) var(--h3-fill),
    color-mix(in srgb, var(--fg) 60%, transparent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  transition: --h3-fill 2s .5s cubic-bezier(0.16, 1, 0.3, 1);
}
.h3-reveal-section.is-line-visible h3 {
  --h3-fill: 100%;
}
.brands {
  margin-top: var(--padding);
  grid-column: 1 / 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.brand {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
}
.brand video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s 0.5s linear;
}
.brand:nth-child(1) {
  grid-column-start: 2;
}
.brand:nth-child(7) {
  grid-column-start: 3;
}
.brand:not(:nth-child(3)):not(:nth-child(6)):not(:nth-child(8)) {
  border-right: 0;
}
.brand > svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: 20%;
  max-width: 65%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  fill: var(--fg);
  transition: fill 0.2s linear;
}
.brand:hover video {
  opacity: 1;
  transition-delay: 0s;
}
.brand:hover > svg {
  fill: white
}

@media (max-width: 1064px) {
  /* :root {
    --padding: 24px;
  } */
  nav p,
  footer p:first-child {
    display: none;
  }
  nav ul {
    grid-column: span 2;
  }
  footer p:last-child {
    grid-column: 3/5;
  }
}
@media (max-width: 864px) {
  :root {
    --padding: 24px;
  }
  .sub-section {
    grid-column: 1 / 5;
    grid-template-columns: repeat(3, 1fr);
  }
  .sub-section p:last-child,
  .sub-section div:last-child {
    grid-column: span 2;
  }
}
@media (max-width: 540px) {
  :root {
    --padding: 16px;
  }
  h1 {
    /* font-size: inherit; */
    line-height: 1;
  }
  h3 {
    font-size: 5.5vw;
  }
  .mobile {
    display: block;
  }
  .loading main,
  .intro-open main {
    transform: translateY(5%);
  }
  main {
    position: relative;
    background-color: var(--bg);
    z-index: 3;
    transition: transform 0s 1s;
  }
  section,
  section.sub-section {
    grid-column: 1 / 5;
  }
  .h3-reveal-section .h3-reveal-stage,
  .video-section > div {
    min-height: 50vh;
  }
  .brands {
    grid-template-columns: repeat(3, 1fr);
  }
  /* .brand:last-child {
    grid-row-start: 3;
    grid-column-start: 2;
  } */
  /* .brand:not(:nth-child(3)):not(:nth-child(5)) {
    border-right: 1px solid var(--border);
  } */
  /* .brand:not(:nth-child(2)):not(:nth-child(4)):not(:nth-child(5)) {
    border-right: 0;
  } */
  .brand:nth-child(5) {
    grid-column-start: 2;
  }
  .brand:nth-child(7) {
    grid-column-start: auto;
  }
  .brand:not(:nth-child(3)):not(:nth-child(6)):not(:nth-child(8)) {
    border-right: 1px solid var(--border);
  }
  .brand:not(:nth-child(2)):not(:nth-child(4)):not(:nth-child(6)):not(:nth-child(8)) {
    border-right: 0;
  }
}
