/* ==========================================================================
   Shaf Creative Studio — design system
   Palette and type are taken directly from the studio portfolio deck.
   ========================================================================== */

:root {
  --ink: #0d0d0d;
  --ink-2: #151515;
  --ink-3: #383838;
  --paper: #ffffff;
  --mist: #ececec;
  --line: #e0e0e0;
  --ash: #9e9e9e;
  --slate: #616161;
  --blue: #4f6bed;
  --blue-deep: #3a52c9;

  --font: 'Poppins', ui-sans-serif, sans-serif;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
  --header-h: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--blue);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--blue);
  color: var(--paper);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Grain — fixed, non-interactive */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  line-height: 1.6;
}

.label--blue {
  color: var(--blue);
}

.label--muted {
  color: var(--ash);
}

.display {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-size: clamp(2.6rem, 7.4vw, 7.25rem);
}

.h2 {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.04;
  font-size: clamp(2rem, 4.4vw, 4rem);
}

.h3 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.3;
}

.accent {
  color: var(--blue);
}

.caps {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.9;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.6;
  font-weight: 300;
  max-width: 38ch;
}

.muted {
  color: var(--slate);
}

.theme-dark .muted {
  color: var(--ash);
}

/* Masked line reveal: <span class="line"><span>Text</span></span> */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.line > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms + 120ms);
}

.is-in .line > span,
.line.is-in > span {
  transform: none;
}

/* Generic reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}

[data-reveal='fade'] {
  transform: none;
}

[data-reveal='scale'] {
  transform: scale(1.06);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

html:not(.js) [data-reveal],
html:not(.js) .line > span {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(5rem, 11vw, 10rem);
}

.theme-dark {
  background: var(--ink);
  color: var(--paper);
}

.theme-mist {
  background: var(--mist);
}

.rule {
  height: 1px;
  background: currentColor;
  opacity: 0.14;
  border: 0;
  margin: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  color: var(--paper);
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.brand {
  display: block;
  width: 92px;
}

.brand img {
  width: 100%;
}

.nav {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
}

.nav a {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  padding-block: 0.5rem;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0.38em;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.menu-toggle__icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.menu-toggle__icon i {
  width: 2px;
  background: currentColor;
  animation: eq 1s var(--ease) infinite alternate;
}

.menu-toggle__icon i:nth-child(1) { height: 60%; animation-delay: -0.2s; }
.menu-toggle__icon i:nth-child(2) { height: 100%; animation-delay: -0.6s; }
.menu-toggle__icon i:nth-child(3) { height: 40%; animation-delay: -0.4s; }
.menu-toggle__icon i:nth-child(4) { height: 80%; animation-delay: -0.1s; }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2.5rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease);
  visibility: hidden;
}

.mobile-menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
}

.mobile-menu__close {
  position: absolute;
  top: 0;
  right: var(--gutter);
  height: var(--header-h);
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu nav a {
  font-size: clamp(2.4rem, 11vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.8s var(--ease-out);
}

.mobile-menu nav a small {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.2em;
}

.mobile-menu nav a[aria-current='page'] {
  color: var(--blue);
}

.mobile-menu.is-open nav a {
  opacity: 1;
  transform: none;
}

.mobile-menu.is-open nav a:nth-child(1) { transition-delay: 0.25s; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: 0.31s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: 0.37s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: 0.43s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: 0.49s; }
.mobile-menu.is-open nav a:nth-child(6) { transition-delay: 0.55s; }

@media (max-width: 860px) {
  :root {
    --header-h: 72px;
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand {
    width: 76px;
  }
}

/* ==========================================================================
   Page transition — "equalizer curtain"
   Blue bars rise like a level meter, ink bars follow, the destination name
   flashes, then everything drops away to reveal the next page.
   ========================================================================== */

.pt {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  visibility: hidden;
}

.pt__bars {
  position: absolute;
  inset: 0;
  display: flex;
}

.pt__bars span {
  flex: 1 1 0;
  height: 100%;
  margin-right: -1px; /* hide sub-pixel seams */
  transform: scaleY(0);
  transform-origin: 50% 100%;
}

.pt__bars--blue span {
  background: var(--blue);
}

.pt__bars--ink span {
  background: var(--ink);
}

.pt__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--paper);
  gap: 1rem;
  opacity: 0;
}

.pt__kicker {
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--blue);
}

.pt__title {
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

.pt__meter {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}

.pt__meter i {
  width: 3px;
  background: var(--paper);
  animation: eq 0.55s var(--ease) infinite alternate;
}

.pt__meter i:nth-child(odd) { animation-duration: 0.4s; }
.pt__meter i:nth-child(3n) { animation-duration: 0.7s; background: var(--blue); }

/* Covered (incoming page, before reveal) */
html.pt-cover .pt,
html.pt-leave .pt,
html.pt-reveal .pt {
  visibility: visible;
  pointer-events: auto;
}

html.pt-cover .pt__bars span {
  transform: scaleY(1);
}

html.pt-cover .pt__label {
  opacity: 1;
}

/* Failsafe: never leave the curtain down if scripts fail to run */
html.pt-cover .pt {
  animation: pt-failsafe 0s linear 4s forwards;
}

@keyframes pt-failsafe {
  to {
    visibility: hidden;
    opacity: 0;
  }
}

/* Leaving: bars rise from the floor */
html.pt-leave .pt__bars span {
  transform: scaleY(1);
  transform-origin: 50% 100%;
  transition: transform 0.62s var(--ease);
  transition-delay: calc(var(--w, 0) * 1ms);
}

html.pt-leave .pt__bars--ink span {
  transition-delay: calc(var(--w, 0) * 1ms + 140ms);
}

html.pt-leave .pt__label {
  opacity: 1;
  transition: opacity 0.35s 0.55s;
}

/* Revealing: bars lift away to the ceiling */
html.pt-reveal .pt__bars span {
  transform: scaleY(0);
  transform-origin: 50% 0%;
  transition: transform 0.75s var(--ease);
  transition-delay: calc(var(--w, 0) * 1ms + 180ms);
}

html.pt-reveal .pt__bars--blue span {
  transition-delay: calc(var(--w, 0) * 1ms + 300ms);
}

html.pt-reveal .pt__label {
  opacity: 0;
  transition: opacity 0.25s;
}

/* Page content settles in as the curtain lifts */
html.pt-reveal main,
html.pt-reveal .site-footer {
  animation: page-in 1.2s var(--ease-out) 0.25s both;
}

@keyframes page-in {
  from {
    transform: translateY(70px);
  }
}

/* ==========================================================================
   Waveform motif
   ========================================================================== */

.wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: var(--wave-h, 90px);
}

.wave i {
  flex: 1 1 0;
  min-width: 2px;
  height: calc(var(--h, 0.5) * 100%);
  background: currentColor;
  opacity: 0.55;
  transform-origin: 50% 100%;
  animation: eq calc(var(--s, 1) * 1s) var(--ease) infinite alternate;
  animation-delay: calc(var(--o, 0) * -1s);
}

.wave--center {
  align-items: center;
}

.wave--center i {
  transform-origin: 50% 50%;
}

@keyframes eq {
  from { transform: scaleY(1); }
  to { transform: scaleY(0.25); }
}

/* ==========================================================================
   Buttons & links
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.9rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.55s var(--ease);
}

.btn:hover {
  color: var(--paper);
  border-color: var(--blue);
}

.btn:hover::before {
  transform: scaleY(1);
}

.btn--solid {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.btn--solid::before {
  background: var(--ink);
}

.btn--solid:hover {
  border-color: var(--ink);
}

.theme-dark .btn--solid::before {
  background: var(--paper);
}

.theme-dark .btn--solid:hover {
  color: var(--ink);
  border-color: var(--paper);
}

.btn .arrow {
  transition: transform 0.5s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(6px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--blue);
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.text-link:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  background: var(--mist);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: -12% 0;
  will-change: transform;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.32;
  transform: scale(1.08);
  transition: transform 2.4s var(--ease-out);
}

.is-in .hero__media img,
.hero.is-in .hero__media img {
  transform: scale(1);
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--mist) 22%, rgba(236, 236, 236, 0.4) 60%, rgba(236, 236, 236, 0.1));
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  align-content: end;
  gap: 3rem;
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.hero__copy .display {
  margin-top: 1.5rem;
}

.hero__copy .caps {
  margin-top: 2.5rem;
  max-width: 62ch;
  color: var(--ink-3);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero__aside {
  display: grid;
  justify-items: end;
  gap: 2.5rem;
  padding-bottom: 0.5rem;
}

.hero__logo {
  width: min(360px, 80%);
}

.hero__wave {
  position: absolute;
  inset: auto 0 0;
  --wave-h: 70px;
  color: var(--ink);
  opacity: 0.25;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.scroll-cue span {
  position: relative;
  display: block;
  width: 1px;
  height: 46px;
  background: rgba(13, 13, 13, 0.2);
  overflow: hidden;
}

.scroll-cue span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  animation: cue 2s var(--ease) infinite;
}

@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero__aside {
    justify-items: start;
  }

  .hero__logo {
    display: none;
  }
}

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(4rem, 10vw, 8rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.page-hero .display {
  margin-top: 1.5rem;
}

.page-hero__bg {
  position: absolute;
  inset: -15% 0;
  z-index: 0;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: grayscale(1);
}

.page-hero .wrap {
  position: relative;
  z-index: 1;
}

.crumb {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.crumb .label + .label::before {
  content: '/';
  margin-right: 0.9rem;
  color: var(--ash);
}

.page-hero__index {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--header-h) + 2rem);
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 700;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px currentColor;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 860px) {
  .page-hero__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.6rem;
  background: var(--ink);
  color: var(--paper);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

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

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__track span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7);
}

.marquee__track span::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--blue);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Split statement
   ========================================================================== */

.statement {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.statement__body {
  display: grid;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.statement__body p {
  margin: 0;
}

@media (max-width: 860px) {
  .statement {
    grid-template-columns: 1fr;
  }
}

/* Image + overlapping copy */
.duo {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 2rem 0;
}

.duo__media {
  grid-column: 1 / span 7;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

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

.duo__card {
  grid-column: 6 / span 7;
  grid-row: 1;
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  gap: 1.5rem;
}

.theme-dark .duo__card {
  background: var(--ink-2);
  color: var(--paper);
}

.duo--flip .duo__media {
  grid-column: 6 / span 7;
}

.duo--flip .duo__card {
  grid-column: 1 / span 7;
}

@media (max-width: 860px) {
  .duo__media,
  .duo__card,
  .duo--flip .duo__media,
  .duo--flip .duo__card {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .duo__card {
    margin: -4rem 1rem 0;
  }
}

/* ==========================================================================
   Numbered tiles (Seven ways / industries)
   ========================================================================== */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tile {
  position: relative;
  min-height: 210px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--blue);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease);
}

.tile:hover::after {
  transform: scaleY(1);
}

.tile__num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  transition: color 0.4s;
}

.tile:hover .tile__num {
  color: var(--paper);
}

.tile__name {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
}

.tile--note {
  background: transparent;
  justify-content: flex-end;
}

.tile--note::before,
.tile--note::after {
  display: none;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.stat {
  border-left: 2px solid var(--blue);
  padding-left: 1.25rem;
}

.stat__num {
  font-size: clamp(2.6rem, 5.4vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin-top: 0.85rem;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
  line-height: 1.7;
}

.theme-dark .stat__label {
  color: var(--ash);
}

@media (max-width: 860px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
  }
}

/* ==========================================================================
   Work — horizontal reel (home) & project cards
   ========================================================================== */

.reel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.reel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 30%);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: var(--gutter);
  padding-bottom: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--blue) transparent;
  cursor: grab;
}

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

.reel > * {
  scroll-snap-align: start;
}

@media (max-width: 860px) {
  .reel {
    grid-auto-columns: 78%;
  }
}

.card {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-2);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter 0.8s;
  filter: grayscale(0.25);
}

.card:hover .card__media img {
  transform: scale(1.06);
  filter: grayscale(0);
}

.card__tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.7rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.card__role {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 1.8;
}

.card__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--slate);
}

.theme-dark .card__desc {
  color: var(--ash);
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ash);
}

/* Work filters */
.filters {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.filter {
  padding: 0.75rem 1.2rem;
  border: 1px solid rgba(128, 128, 128, 0.35);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

.filter:hover {
  border-color: var(--blue);
}

.filter[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.filter sup {
  margin-left: 0.3rem;
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.5rem 2rem;
}

.work-grid .card {
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}

.work-grid .card.is-hiding {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
}

.work-grid .card[hidden] {
  display: none;
}

@media (min-width: 861px) {
  .work-grid:not(.is-filtered) .card:nth-child(3n + 2) {
    margin-top: 4rem;
  }
}

@media (max-width: 1100px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* Album */
.album {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.album__cover {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: grid;
  gap: 2rem;
}

.album__disc {
  position: relative;
  aspect-ratio: 1;
}

.album__disc img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}

.album__disc::after {
  content: '';
  position: absolute;
  top: 5%;
  bottom: 5%;
  right: -8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--blue) 0 9%, var(--ink) 9.5% 11%, transparent 11.5%),
    repeating-radial-gradient(circle, #1b1b1b 0 2px, #0a0a0a 2px 4px);
  transition: transform 1.4s var(--ease-out);
}

.album:hover .album__disc::after {
  transform: translateX(18%) rotate(120deg);
}

.tracklist {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}

.tracklist li {
  break-inside: avoid;
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13.5px;
  transition: color 0.3s, padding-left 0.4s var(--ease);
}

.tracklist li:hover {
  color: var(--blue);
  padding-left: 0.5rem;
}

.tracklist li span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .album {
    grid-template-columns: 1fr;
  }

  .album__cover {
    position: relative;
    top: 0;
    max-width: 420px;
  }
}

@media (max-width: 520px) {
  .tracklist {
    columns: 1;
  }
}

/* ==========================================================================
   Services list
   ========================================================================== */

.service-list {
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
  align-items: baseline;
  padding-block: clamp(1.75rem, 3vw, 2.6rem);
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  isolation: isolate;
}

.service::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  background: var(--blue);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease);
}

.service:hover::before {
  transform: scaleY(1);
}

.service:hover {
  color: var(--paper);
}

.service:hover .service__num,
.service:hover .service__desc {
  color: var(--paper);
}

.service__num {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--blue);
  transition: color 0.4s;
}

.service__name {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
}

.service__desc {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.9;
  color: var(--slate);
  transition: color 0.4s;
}

.theme-dark .service__desc {
  color: var(--ash);
}

@media (max-width: 760px) {
  .service {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .service__desc {
    grid-column: 2;
  }
}

/* Industries */
.industries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
  counter-reset: ind;
  list-style: none;
  margin: 0;
  padding: 0;
}

.industries li {
  counter-increment: ind;
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.industries li::before {
  content: counter(ind, decimal-leading-zero) '.';
  font-size: 11px;
  color: var(--blue);
  min-width: 2.2rem;
}

@media (max-width: 640px) {
  .industries {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Pillars (Why Shaf)
   ========================================================================== */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.5rem 2.5rem;
}

.pillar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.pillar::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--blue);
}

.pillar h3 {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--blue);
}

.pillar p {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.9;
}

@media (max-width: 960px) {
  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pillars {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Founder
   ========================================================================== */

.founder {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.founder__media {
  position: relative;
}

.founder__media img {
  width: 100%;
  aspect-ratio: 919 / 1262;
  object-fit: cover;
}

.founder__media::before {
  content: '';
  position: absolute;
  inset: 2rem -2rem -2rem 2rem;
  border: 1px solid var(--blue);
  z-index: -1;
}

.founder__body {
  display: grid;
  gap: 1.4rem;
}

.founder__body p {
  margin: 0;
}

.signature {
  width: 160px;
  opacity: 0.9;
}

@media (max-width: 860px) {
  .founder {
    grid-template-columns: 1fr;
  }

  .founder__media {
    max-width: 440px;
  }
}

/* ==========================================================================
   Vision / Mission
   ========================================================================== */

.vm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vm__item {
  position: relative;
  padding: clamp(3rem, 7vw, 6.5rem) var(--gutter);
  display: grid;
  gap: 2rem;
  align-content: start;
  min-height: 70vh;
  overflow: hidden;
}

.vm__item > :not(img) {
  position: relative;
  z-index: 1;
}

.vm__item p {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  text-transform: uppercase;
  line-height: 1.75;
  letter-spacing: 0.02em;
  font-weight: 500;
  position: relative;
}

.vm__item img {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 55%;
  object-fit: cover;
  opacity: 0.85;
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
}

@media (max-width: 860px) {
  .vm {
    grid-template-columns: 1fr;
  }

  .vm__item {
    min-height: 60vh;
  }
}

/* ==========================================================================
   Gallery + lightbox
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(140px, 16vw, 230px);
  grid-auto-flow: dense;
  gap: 0.75rem;
}

.gallery button {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
}

.gallery button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), opacity 0.6s;
}

.gallery button::after {
  content: '+';
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--paper);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}

.gallery button:hover img {
  transform: scale(1.07);
}

.gallery button:hover::after {
  opacity: 1;
  transform: none;
}

.g-w2 { grid-column: span 2; }
.g-w3 { grid-column: span 3; }
.g-w4 { grid-column: span 4; }
.g-h2 { grid-row: span 2; }

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 160px;
  }

  .g-w2,
  .g-w3,
  .g-w4 {
    grid-column: span 1;
  }

  .g-wide-m {
    grid-column: span 2;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: rgba(13, 13, 13, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s, visibility 0.45s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-height: 82vh;
  width: auto;
  max-width: 100%;
  transform: scale(0.94);
  transition: transform 0.6s var(--ease-out);
}

.lightbox.is-open img {
  transform: none;
}

.lightbox__bar {
  position: absolute;
  inset: auto var(--gutter) 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--paper);
}

.lightbox__bar button,
.lightbox__close {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 0.75rem 0;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: var(--gutter);
}

.lightbox__count {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ash);
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  color: var(--paper);
}

.cta .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: end;
}

.cta .btn--solid {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.cta .btn--solid::before {
  background: var(--ink);
}

.cta .btn--solid:hover {
  color: var(--paper);
  border-color: var(--ink);
}

.cta__wave {
  position: absolute;
  inset: auto 0 0;
  --wave-h: 46%;
  color: var(--paper);
  opacity: 0.16;
  pointer-events: none;
}

@media (max-width: 760px) {
  .cta .wrap {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
}

.contact__details {
  display: grid;
  gap: 3rem;
  align-content: start;
}

.contact__block {
  display: grid;
  gap: 0.9rem;
}

.contact__block p {
  margin: 0;
}

.contact__big {
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.contact__big a {
  background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}

.contact__big a:hover {
  background-size: 100% 2px;
  color: var(--blue);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  font-size: 13px;
  transition: color 0.3s, padding 0.4s var(--ease);
}

.link-list a::after {
  content: '\2197';
  color: var(--blue);
  transition: transform 0.4s var(--ease);
}

.link-list a:hover {
  color: var(--blue);
  padding-left: 0.5rem;
}

.link-list a:hover::after {
  transform: translate(3px, -3px);
}

.link-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}

@media (max-width: 960px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .link-cols {
    grid-template-columns: 1fr;
  }
}

/* Form */
.form {
  position: relative;
  display: grid;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.field {
  position: relative;
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--ash);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 0;
  border-radius: 0;
  transition: border-color 0.4s;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.field select option {
  background: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.field::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.field:focus-within::after {
  transform: scaleX(1);
}

.field__error {
  min-height: 1.2em;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #ff8a8a;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #ff8a8a;
}

.form__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form__note {
  font-size: 11px;
  color: var(--ash);
  max-width: 34ch;
  margin: 0;
}

.form .btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.form__status {
  margin: 0;
  font-size: 12px;
  color: #ff8a8a;
}

.form__status:empty {
  display: none;
}

.form-success {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
  background: var(--blue);
  color: var(--paper);
  clip-path: inset(100% 0 0 0);
  visibility: hidden;
  transition: clip-path 0.9s var(--ease), visibility 0s 0.9s;
}

.form-success .wave {
  --wave-h: 40px;
  width: 140px;
  color: var(--paper);
}

.form.is-sent .form-success {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.9s var(--ease), visibility 0s;
}

@media (max-width: 600px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: 2rem;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.footer__logo {
  width: 150px;
}

.footer__col {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  font-size: 13px;
}

.footer__col .label {
  margin-bottom: 0.75rem;
}

.footer__col a {
  color: var(--ash);
  transition: color 0.3s;
  width: fit-content;
}

.footer__col a:hover {
  color: var(--paper);
}

.footer__big {
  margin-top: clamp(3rem, 7vw, 6rem);
  font-size: clamp(3rem, 12.5vw, 13rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  user-select: none;
}

.footer__big span {
  color: var(--blue);
  -webkit-text-stroke: 0;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--slate);
}

@media (max-width: 860px) {
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.stack-sm > * + * { margin-top: 1rem; }
.stack > * + * { margin-top: 1.75rem; }
.stack-lg > * + * { margin-top: 3rem; }
.mt-lg { margin-top: clamp(3rem, 6vw, 5rem); }
.center { text-align: center; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  [data-reveal],
  .line > span {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .marquee__track {
    animation: none;
  }

  .grain {
    animation: none;
  }

  html.pt-leave .pt__bars span,
  html.pt-reveal .pt__bars span {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  html.pt-leave .pt,
  html.pt-reveal .pt {
    transition: opacity 0.3s;
  }
}
