/* ─────────────────────────────────────────────────────────────
   Sureality — creative studio
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0d0d0d;
  --fg: #ffffff;
  --muted: #a3a3a3;
  --dim: #666666;
  --crew-role: #9c9c9c;
  --page-x: 50px;
  --media-radius: 16px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: var(--mono);
  --body: var(--mono);
  --ui: var(--mono);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  /* `clip`, not `hidden`: hidden makes body a scroll container, which silently
     kills position: sticky on the projects section. */
  overflow-x: clip;
}

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

.visually-hidden {
  position: absolute;
  font-weight: 400;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ── fixed nav ───────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 20px var(--page-x);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

/* the header only arrives once the hero film has scrolled away */
.nav.is-visible { opacity: 1; transform: none; }
.nav.is-visible .nav__pill { pointer-events: auto; }

.nav__pill {
  width: min(1000px, 100%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 7px 6px 20px;
  border-radius: 44px;
  background: rgba(13, 13, 13, 0.2);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.nav__logo img { height: 44px; width: auto; object-fit: contain; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__links > a:not(.pill-btn) {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  border-radius: 26px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav__links > a:not(.pill-btn):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 100px;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  color: #000;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: clip;
  will-change: transform;
  transform: scale(1);
  transition: transform 0.5s var(--spring), filter 0.4s var(--ease);
}

.pill-btn:hover { transform: scale(1.05); filter: brightness(1.06); }
.pill-btn:active { transform: scale(0.98); transition-duration: 0.12s; }
.pill-btn--lg { height: 48px; padding: 0 28px; }

.preloader {
  position: absolute;         /* fills the hero, which is exactly one viewport tall */
  inset: 0;
  z-index: 5;                 /* above the hero film, below the lockup */
  background: var(--bg);
  transition: opacity 0.9s var(--ease);
}

.preloader.is-done { opacity: 0; }
.preloader.is-gone { display: none; }

/* the mark rides above the sheet and glides into place */
.hero__lockup { z-index: 10; }
.is-intro { overflow: hidden; }
.is-intro .hero__tagline { opacity: 0; }
/* stays out of sight until the script has centred it */
.is-intro .hero__logo { visibility: hidden; }

.hero__logo { transform-origin: top left; }
.hero__tagline { transition: opacity 0.6s var(--ease) 0.35s; }

/* ── fixed backdrop ──────────────────────────────────────── */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.backdrop video { width: 100%; height: 100%; object-fit: cover; }

.backdrop__scrim {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.62);
}

main { position: relative; z-index: 1; }

/* ── hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__media video { width: 100%; height: 100%; object-fit: cover; }

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.08) 45%, rgba(13,13,13,0.8) 100%);
}

.hero__lockup {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  padding: 36px 40px 26px;
}

.hero__logo {
  width: min(432px, 55vw);
  height: auto;
  object-fit: contain;
}

.hero__tagline {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
}

/* ── marquees ────────────────────────────────────────────── */

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--duration, 40s) linear infinite;
}

.clients .marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-100% / var(--copies, 2))); }
}

/* clients */

.clients { padding: 70px 0 65px; }

.clients__track { --duration: 78s; gap: 88px; align-items: center; }

.clients__track li {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Marks are pre-trimmed and optically balanced by the build script, including the
   width cap that stops wide lockups dominating — a shared height is all that's left. */
.clients__track img {
  height: 55px;
  width: auto;
  opacity: 0.88;
  transition: opacity 0.4s var(--ease);
}

.clients__track li:hover img { opacity: 1; }

/* ── official partner credentials ────────────────────────── */

.accredit {
  margin: 130px var(--page-x);
  padding: 0;
  text-align: center;
}


.accredit__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1000px;            /* matches the founders block below it */
  margin: 0 auto;
}

.accredit__list li + li { border-left: 1px solid rgba(255, 255, 255, 0.12); }

.accredit__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}

.accredit__list img {
  height: 54px;
  width: auto;
  opacity: 0.92;
}

.accredit__role {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.accredit__since {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: -6px;
}

/* ── manifesto ───────────────────────────────────────────── */

.manifesto { padding: 65px 40px 0; }


.manifesto__copy {
  font-family: var(--body);
  font-size: clamp(18px, 1.72vw, 33px);
  line-height: 1.45;
  color: var(--dim);
  max-width: none;
  margin: 0 auto;
  text-align: center;
}



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

.manifesto__copy .char {
  transition: color 0.35s linear;
  color: var(--dim);
}

.manifesto__copy .char.is-lit { color: #fff; }

.works { padding: 130px var(--page-x) 0; }

.works__head {
  margin-bottom: 48px;          /* the categories need room before the grid */
  text-align: center;
}

.works__head h2 {
  font-family: var(--display);
  font-size: 24px;
}

/* the heading doubles as "show everything", but only once a filter is on */
.works__head h2 button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: default;
}

.works__head.is-filtered h2 button { cursor: pointer; color: rgba(255, 255, 255, 0.6); }
.works__head.is-filtered h2 button:hover { color: #fff; }

.disciplines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.disciplines li { display: flex; }
.disciplines li + li { border-left: 1px solid rgba(255, 255, 255, 0.16); }

.disciplines button {
  display: block;
  padding: 0 18px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.3s var(--ease);
}

.disciplines button:hover,
.disciplines button:focus-visible { color: #fff; }
.disciplines button[aria-pressed="true"] { color: #fff; }

/* cards fade out on their way off the grid, and slide to their new slot */
.project { transition: opacity 0.5s var(--ease); }
.project.is-hidden { display: none; }
.project.is-fading { opacity: 0; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* eight films: two clean rows of four */

.project {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--media-radius);
  overflow: hidden;
}

.project video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.1s var(--ease);
}

.project__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity 0.35s var(--ease);
}

/* the still only steps aside once frames are actually rendering */
.project.is-playing .project__cover { opacity: 0; }

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--media-radius);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 45%);
  pointer-events: none;
  z-index: 2;
}

.project:hover video,
.project:hover .project__cover { transform: scale(1.06); }
.project__cover { transition: opacity 0.35s var(--ease), transform 1.1s var(--ease); }

.project__title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--display);
  font-size: 14px;
  color: #fff;
}

/* ── founders ────────────────────────────────────────────── */

.founders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 0 var(--page-x) 65px;
  max-width: 1000px;
  margin: 0 auto;
}

.founder__media {
  border-radius: var(--media-radius);
  overflow: hidden;
  background: #141414;
  aspect-ratio: 1 / 1;
}

.founder__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
}

.founder:hover .founder__media img {
  transform: scale(1.04);
  filter: grayscale(0);
}

.founder h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 14px;
}

.founder__role {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--crew-role);
  margin-top: 6px;
}

.founder__bio {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 12px;
}

/* ── crew ────────────────────────────────────────────────── */

.crew { padding: 65px 0 110px; }

.crew__track { --duration: 72s; gap: 16px; padding: 4px 0; }

.crew-card {
  flex: 0 0 auto;
  width: 212px;
  background: transparent;
}

.crew-card__media {
  aspect-ratio: 4 / 5;
  border-radius: var(--media-radius);
  overflow: hidden;
  background: #141414;
}

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

.crew-card__name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  margin-top: 14px;
}

.crew-card__role {
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--crew-role);
  min-height: 17px;
  margin-top: 5px;
}

/* ── outro / footer ──────────────────────────────────────── */

.outro {
  padding: 90px 40px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.outro__mark {
  width: 141px;
  height: auto;
  margin-bottom: 16px;          /* the mark needs room above the headline */
}

.outro__title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
}

.socials {
  display: flex;
  gap: 20px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
}

.icon {
  display: block;
  width: 31px;
  height: 31px;
  background: #fff;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.socials a:hover .icon { opacity: 1; transform: translateY(-2px); }

.icon--instagram {
  -webkit-mask-image: url("assets/icons/instagram.svg");
  mask-image: url("assets/icons/instagram.svg");
}
.icon--telegram {
  -webkit-mask-image: url("assets/icons/telegram.svg");
  mask-image: url("assets/icons/telegram.svg");
}
.icon--whatsapp {
  -webkit-mask-image: url("assets/icons/whatsapp.svg");
  mask-image: url("assets/icons/whatsapp.svg");
}

.outro__bar {
  width: 100%;
  max-width: 1200px;
  margin-top: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--body);
  font-size: 13px;
  color: var(--muted);
}

.outro__bar a {
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.outro__bar a:hover { color: #d4d4d4; }

/* ── responsive ──────────────────────────────────────────── */

/* laptops and small desktops */
@media (max-width: 1180px) {
  .clients__track { gap: 64px; }
}

/* tablets */
@media (max-width: 1024px) {
  .works__grid { grid-template-columns: repeat(3, 1fr); }
  :root { --page-x: 28px; --media-radius: 12px; }
  .hero__lockup { padding: 28px; }
  .hero__logo { width: min(340px, 56vw); }
  .hero__tagline { font-size: 15px; }
  .manifesto { padding: 40px 28px 0; }
  .works__grid { gap: 14px; }
  .project__title { left: 18px; bottom: 18px; font-size: 16px; }
  .founders { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: center; padding: 0 28px 40px; gap: 20px; }
  .founder__media, .founder__bio { max-width: none; }
  .crew-card { width: 190px; }
  .clients__track { gap: 48px; }
  .clients__track img { height: 48px; }
  .outro { padding: 48px 28px 32px; gap: 22px; }
  .outro__mark { width: 112px; }
  .outro__bar { margin-top: 38px; font-size: 13px; }
}

/* phones */
@media (max-width: 640px) {
  :root { --page-x: 20px; --media-radius: 10px; }

  .nav { padding: 12px 20px; }
  .nav__pill { padding: 5px 6px 5px 14px; }
  .nav__links > a:not(.pill-btn) { display: none; }
  .nav__logo img { height: 30px; }
  .pill-btn { height: 46px; padding: 0 22px; font-size: 14px; }

  .hero__lockup { padding: 20px; }
  .hero__logo { width: min(184px, 50vw); }
  .hero__tagline { font-size: 13px; }

  .clients { padding: 52px 0 46px; }
  .clients__track { gap: 52px; }
  .clients__track img { height: 48px; }

  .manifesto { padding: 46px 20px 0; }
  .manifesto__copy { font-size: 21px; line-height: 1.5; }
  /* the six categories cannot sit on one phone line, so they wrap as pills —
     dividers are dropped because they would land at the start of each new row */
  .disciplines { margin-top: 20px; gap: 8px; }
  .disciplines li + li { border-left: 0; }
  .disciplines button {
    font-size: 14px;
    padding: 12px 15px;           /* 44px tall: a real tap target */
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 100px;
  }
  .disciplines button[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .works { padding: 92px 20px 0; }
  .works__head { margin-bottom: 32px; }
  .works__head h2 { font-size: 20px; }
  .works__grid { grid-template-columns: 1fr; gap: 14px; }
  .project__title { left: 16px; bottom: 16px; font-size: 15px; }

  .founders { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 20px 46px; gap: 12px; }
  .founder__media { max-width: none; }
  .founder h3 { font-size: 15px; margin-top: 12px; }
  .founder__role { font-size: 12px; margin-top: 4px; }
  .founder__bio { display: none; }          /* too cramped to read two-up on a phone */

  .crew { padding: 46px 0 76px; }
  .crew-card { width: 172px; }
  .crew-card__name { font-size: 15px; margin-top: 12px; }
  .crew-card__role { font-size: 12px; }

  .outro { padding: 62px 20px 28px; gap: 18px; }
  .outro__mark { width: 116px; margin-bottom: 10px; }
  .outro__title { font-size: 20px; }
  .socials { gap: 16px; }
  .outro__bar { margin-top: 30px; font-size: 13px; gap: 12px; }
}

@media (max-width: 640px) {

  .accredit { margin: 92px 20px; }
  .accredit__list { grid-template-columns: 1fr; gap: 26px; }
  .accredit__list li + li { border-left: 0; }
  .accredit__list img { height: 44px; }
  .accredit__role { font-size: 13px; }
  .accredit__since { font-size: 12px; }
}

/* very small phones: let the footer credit stack instead of colliding */
@media (max-width: 380px) {
  .outro__bar { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
  .crew-card { width: 156px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .manifesto__copy .char { color: #fff; }
  * { transition-duration: 0.01ms !important; }
}
