/* ============================================================
   KLETA — Ember on Obsidian
   Design system · v2 ground-up rebuild
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --obsidian: #0a0a0b;
  --obsidian-2: #0e0e10;
  --raised: #131315;
  --raised-2: #18181b;
  --line: rgba(234, 230, 223, 0.08);
  --line-strong: rgba(234, 230, 223, 0.16);
  --bone: #eae6df;
  --bone-dim: #c9c4bb;
  --muted: #938e86;
  --faint: #5d5952;
  --ember: #ff4d00;
  --ember-soft: #ff7a3d;
  --ember-dim: rgba(255, 77, 0, 0.14);

  /* type */
  --f-display: "Clash Display", "Helvetica Neue", sans-serif;
  --f-body: "General Sans", "Helvetica Neue", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", "SF Mono", monospace;

  /* fluid scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.9rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.6vw, 5.2rem);
  --step-hero: clamp(2.9rem, 1.4rem + 7.4vw, 8.2rem);
  --step-giant: clamp(2.6rem, 1.2rem + 7vw, 7.4rem);

  /* rhythm */
  --space-section: clamp(6rem, 14vh, 11rem);
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --container: 1520px;

  /* motion */
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto; /* lenis owns scrolling */
}

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--ember);
  color: var(--obsidian);
}

/* themed scrollbar */
html {
  scrollbar-color: var(--raised-2) var(--obsidian);
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--obsidian);
}
::-webkit-scrollbar-thumb {
  background: var(--raised-2);
  border-radius: 5px;
  border: 2px solid var(--obsidian);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

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

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

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

ul,
ol {
  list-style: none;
}

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

/* accessible skip link */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--ember);
  color: var(--obsidian);
  font-family: var(--f-mono);
  font-size: var(--step--1);
  border-radius: 999px;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 250;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--ember);
}
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(234, 230, 223, 0.35);
  display: grid;
  place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.cursor-ring .cursor-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--obsidian);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  border-color: rgba(255, 77, 0, 0.5);
}
.cursor-ring.is-view {
  width: 88px;
  height: 88px;
  background: var(--ember);
  border-color: var(--ember);
}
.cursor-ring.is-view .cursor-label {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button {
    cursor: none;
  }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--obsidian);
  display: grid;
  place-items: center;
}
.preloader__mark {
  width: clamp(72px, 10vw, 120px);
  overflow: visible;
}
.preloader__mark path {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.preloader__mark .stroke-spine {
  stroke: var(--bone);
}
.preloader__mark .stroke-arm {
  stroke: var(--ember);
}
.preloader__meta {
  position: absolute;
  left: var(--gutter);
  bottom: 2rem;
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.preloader__count {
  font-size: var(--step-2);
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: transform 0.5s var(--ease-out), background-color 0.4s ease,
    backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav.is-hidden {
  transform: translateY(-100%);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.brand__mark {
  width: 26px;
  height: 26px;
}
.brand__word {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1;
  transform: translateY(-1px);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
.nav__link {
  position: relative;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 0.4rem;
  transition: color 0.3s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav__link:hover {
  color: var(--bone);
}
.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease-out);
}
.btn--primary {
  background: var(--bone);
  color: var(--obsidian);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ember);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-out);
}
.btn--primary:hover::before {
  transform: translateY(0);
}
.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--bone);
}
.btn--ghost:hover {
  border-color: var(--ember);
  color: var(--ember-soft);
}
.btn .btn__arrow {
  transition: transform 0.4s var(--ease-out);
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}
.btn--lg {
  padding: 1.25rem 2.4rem;
  font-size: 0.9rem;
}
.nav .btn {
  padding: 0.7rem 1.3rem;
}

/* mobile menu trigger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--bone);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

/* mobile overlay menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--obsidian-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-inout), visibility 0s 0.7s;
}
.menu.is-open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-inout), visibility 0s;
}
/* lock page scroll behind the open menu */
html:has(body.menu-open) {
  overflow: hidden;
}
.menu__link {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 9vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  padding-block: 0.35rem;
  color: var(--bone);
  overflow: hidden;
}
.menu__link em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--ember);
}
.menu__link > span {
  display: inline-block;
  transform: translateY(120%);
  transition: transform 0.8s var(--ease-out);
}
.menu.is-open .menu__link > span {
  transform: translateY(0);
}
.menu__meta {
  margin-top: 3rem;
  font-family: var(--f-mono);
  font-size: var(--step--1);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 860px) {
  .nav__links,
  .nav .btn {
    display: none;
  }
  .nav__burger {
    display: flex;
  }
  body.menu-open .nav__burger span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  body.menu-open .nav__burger span:nth-child(2) {
    opacity: 0;
  }
  body.menu-open .nav__burger span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 6.5rem; /* clearance under the fixed nav on short viewports */
  padding-bottom: clamp(2.5rem, 6vh, 5rem);
  overflow: clip;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__canvas canvas {
  width: 100%;
  height: 100%;
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
      120% 90% at 50% 110%,
      rgba(10, 10, 11, 0.92) 0%,
      rgba(10, 10, 11, 0.35) 45%,
      transparent 75%
    );
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
}
.overline {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--f-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.overline::before {
  content: "";
  width: 2.6rem;
  height: 1px;
  background: var(--ember);
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-hero);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 1.4rem;
  max-width: 12ch;
}
.hero__title em,
.title-accent {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
  letter-spacing: -0.01em;
}
.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  margin-top: clamp(2rem, 4.5vh, 3.5rem);
}
.hero__lede {
  max-width: 42ch;
  color: var(--bone-dim);
  font-size: var(--step-1);
  line-height: 1.55;
  font-weight: 400;
}
.hero__ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: clamp(2.6rem, 6vh, 4.5rem);
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.stat__num {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__num sup {
  color: var(--ember);
  font-size: 0.55em;
}
.stat__label {
  margin-top: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__scrollhint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(2.5rem, 6vh, 5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
}
.hero__scrollhint::after {
  content: "";
  width: 1px;
  height: 3.4rem;
  background: linear-gradient(var(--ember), transparent);
  animation: scroll-pulse 2s var(--ease-inout) infinite;
}
@keyframes scroll-pulse {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 700px) {
  .hero__scrollhint { display: none; }
  .hero__stats { flex-wrap: wrap; gap: 1.6rem 2.4rem; }
}

/* split-text line masking */
.split-lines .line {
  overflow: clip;
  padding-block: 0.06em;
  margin-block: -0.06em;
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 1.15rem;
  overflow: clip;
  background: var(--obsidian-2);
}
.marquee__track {
  display: flex;
  gap: 3.2rem;
  width: max-content;
  will-change: transform;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 3.2rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  color: var(--bone-dim);
  white-space: nowrap;
}
.marquee__item::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  flex: none;
}

/* ---------- Section scaffolding ---------- */
.section {
  padding-block: var(--space-section);
  position: relative;
}
.section--tint {
  background: var(--obsidian-2);
  border-block: 1px solid var(--line);
}
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem clamp(2rem, 6vw, 7rem);
  align-items: end;
  margin-bottom: clamp(3rem, 8vh, 5.5rem);
}
.section__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.section__lede {
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 46ch;
}
@media (max-width: 860px) {
  .section__head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ---------- Services ---------- */
.services {
  border-top: 1px solid var(--line);
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: clamp(1.2rem, 3.5vw, 3.5rem);
  padding-block: clamp(1.8rem, 4vh, 2.8rem);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--raised);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease-out);
}
.service:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}
.service__index {
  font-family: var(--f-mono);
  font-size: var(--step--1);
  color: var(--ember);
  letter-spacing: 0.08em;
}
.service__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: transform 0.55s var(--ease-out);
}
.service:hover .service__name {
  transform: translateX(0.6rem);
}
.service__desc {
  color: var(--muted);
  font-size: var(--step-0);
  max-width: 52ch;
}
.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  max-width: 240px;
}
.tag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  transition: color 0.3s, border-color 0.3s;
}
.service:hover .tag {
  border-color: var(--line-strong);
  color: var(--bone-dim);
}
@media (max-width: 900px) {
  .service {
    grid-template-columns: auto 1fr;
    grid-template-areas: "idx name" ". desc" ". tags";
    align-items: start;
  }
  .service__index { grid-area: idx; padding-top: 0.5rem; }
  .service__name { grid-area: name; }
  .service__desc { grid-area: desc; }
  .service__tags { grid-area: tags; justify-content: flex-start; max-width: none; }
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vh, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}
.work-card--wide {
  grid-column: 1 / -1;
}
@media (max-width: 860px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}
.work-card {
  display: block;
  position: relative;
}
.work-card__media {
  position: relative;
  aspect-ratio: 16 / 8.5;
  border-radius: 14px;
  overflow: clip;
  border: 1px solid var(--line);
  background: var(--raised);
}
.work-card__art {
  position: absolute;
  inset: -6%;
  transition: transform 1s var(--ease-out);
  will-change: transform;
}
.work-card:hover .work-card__art {
  transform: scale(1.045);
}
/* generated artworks */
.art--whetstone {
  background:
    radial-gradient(70% 90% at 82% 12%, rgba(255, 77, 0, 0.32), transparent 60%),
    radial-gradient(50% 70% at 12% 88%, rgba(255, 122, 61, 0.12), transparent 65%),
    repeating-linear-gradient(
      112deg,
      transparent 0 54px,
      rgba(234, 230, 223, 0.045) 54px 55px
    ),
    linear-gradient(160deg, #141416 0%, #0b0b0d 70%);
}
.art--whetstone::after {
  content: "";
  position: absolute;
  left: 12%;
  top: 18%;
  width: 54%;
  height: 64%;
  border: 1px solid rgba(234, 230, 223, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.9), rgba(14, 14, 16, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.art--whetstone::before {
  content: "";
  position: absolute;
  left: 17%;
  top: 27%;
  width: 34%;
  height: 5px;
  border-radius: 3px;
  background: var(--ember);
  box-shadow:
    0 22px 0 -1px rgba(234, 230, 223, 0.22),
    0 40px 0 -1px rgba(234, 230, 223, 0.12),
    0 58px 0 -1px rgba(234, 230, 223, 0.12),
    0 76px 0 -1px rgba(234, 230, 223, 0.07);
  z-index: 1;
}
.art--ustadh {
  background:
    radial-gradient(55% 80% at 18% 10%, rgba(255, 77, 0, 0.2), transparent 60%),
    radial-gradient(40% 60% at 88% 85%, rgba(234, 230, 223, 0.06), transparent 60%),
    linear-gradient(200deg, #121415 0%, #0a0b0b 70%);
}
.art--ustadh::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 24%;
  width: 46%;
  aspect-ratio: 1 / 1.55;
  transform: translateX(-50%);
  border: 1px solid rgba(234, 230, 223, 0.22);
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
  background: linear-gradient(180deg, rgba(255, 77, 0, 0.12), transparent 70%);
}
.art--ustadh::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 30%;
  aspect-ratio: 1 / 1.6;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 77, 0, 0.45);
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
}
.art--meridian {
  background:
    radial-gradient(60% 80% at 78% 22%, rgba(129, 140, 248, 0.28), transparent 60%),
    radial-gradient(45% 60% at 15% 85%, rgba(199, 210, 254, 0.08), transparent 65%),
    linear-gradient(170deg, #191734 0%, #0d0c1e 75%);
}
.art--meridian::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(165, 180, 252, 0.4);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(129, 140, 248, 0.1),
    0 0 0 68px rgba(129, 140, 248, 0.05),
    inset 0 0 40px rgba(129, 140, 248, 0.12);
}
.art--meridian::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #c7d2fe;
  box-shadow: 0 0 22px 6px rgba(165, 180, 252, 0.55);
}
.art--axiom {
  background:
    radial-gradient(55% 75% at 20% 15%, rgba(14, 117, 105, 0.4), transparent 62%),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(234, 230, 223, 0.04) 46px 47px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(234, 230, 223, 0.04) 46px 47px),
    linear-gradient(160deg, #101b18 0%, #0a0f0d 70%);
}
.art--axiom::before {
  content: "";
  position: absolute;
  left: 14%;
  top: 30%;
  right: 14%;
  height: 40%;
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 117, 105, 0.16), transparent);
}
.art--axiom::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 34px;
  transform: translateY(-50%);
  background: #34d399;
  clip-path: polygon(0 55%, 26% 55%, 34% 12%, 42% 90%, 50% 30%, 57% 55%, 100% 55%, 100% 61%, 57% 61%, 49% 42%, 42% 100%, 33% 26%, 27% 61%, 0 61%);
  opacity: 0.85;
}
.art--stackline {
  background:
    radial-gradient(60% 80% at 82% 80%, rgba(74, 222, 128, 0.16), transparent 60%),
    linear-gradient(200deg, #101613 0%, #0a0d0b 70%);
}
.art--stackline::before {
  content: "";
  position: absolute;
  left: 24%;
  top: 34%;
  width: 52%;
  height: 8px;
  border-radius: 4px;
  background: rgba(74, 222, 128, 0.9);
  box-shadow:
    0 26px 0 -1px rgba(74, 222, 128, 0.55),
    0 52px 0 -2px rgba(74, 222, 128, 0.3),
    0 78px 0 -3px rgba(74, 222, 128, 0.15);
}
.art--stackline::after {
  content: "";
  position: absolute;
  left: 16%;
  top: 30%;
  bottom: 22%;
  width: 1px;
  background: rgba(234, 230, 223, 0.18);
  box-shadow: 40vw 0 0 rgba(234, 230, 223, 0);
}
.work-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
}
.work-card__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}
.work-card__title span {
  color: var(--muted);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 0.6em;
  margin-left: 1rem;
  letter-spacing: 0;
}
.work-card__tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.work-card__cta {
  position: absolute;
  right: 1.4rem;
  top: 1.4rem;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--obsidian);
  background: var(--bone);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.work-card:hover .work-card__cta {
  opacity: 1;
  transform: translateY(0);
}
/* touch devices: no hover, keep the affordance visible */
@media (hover: none) {
  .work-card__cta {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 700px) {
  .work-card__media {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Process (pinned horizontal) ---------- */
.process {
  overflow: clip;
}
.process__track {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-inline: var(--gutter);
  width: max-content;
  align-items: stretch;
}
.process-step {
  width: clamp(300px, 34vw, 500px);
  padding: clamp(1.8rem, 3vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: clamp(320px, 46vh, 430px);
}
.process-step__index {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-3);
  color: transparent;
  -webkit-text-stroke: 1px var(--ember);
  line-height: 1;
}
.process-step__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}
.process-step__body {
  color: var(--muted);
  margin-top: auto;
}
@media (max-width: 860px) {
  .process__track {
    width: auto;
    flex-direction: column;
    padding-inline: var(--gutter);
  }
  .process-step {
    width: 100%;
    min-height: 0;
  }
}

/* ---------- Studio / principles ---------- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem clamp(2.5rem, 7vw, 8rem);
  align-items: start;
}
.studio__body p + p {
  margin-top: 1.2rem;
}
.studio__body {
  color: var(--bone-dim);
  font-size: var(--step-1);
  line-height: 1.6;
}
.principles li {
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
  color: var(--bone-dim);
}
.principles li::before {
  content: "—";
  color: var(--ember);
  font-family: var(--f-mono);
  flex: none;
}
.studio__stats {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.6rem;
}
@media (max-width: 860px) {
  .studio {
    grid-template-columns: 1fr;
  }
}

/* ---------- Stack ---------- */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.stack-grid .tag {
  font-size: 0.78rem;
  padding: 0.55rem 1.05rem;
}
.stack-grid .tag:hover {
  border-color: var(--ember);
  color: var(--ember-soft);
}

/* ---------- Quotes ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.quote {
  padding: clamp(1.6rem, 2.5vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  transition: border-color 0.4s, transform 0.5s var(--ease-out);
}
.quote:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.quote__text {
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--bone-dim);
}
.quote__text::before {
  content: "“";
  display: block;
  font-family: var(--f-serif);
  font-size: 2.6rem;
  line-height: 0.6;
  color: var(--ember);
  margin-bottom: 0.8rem;
}
.quote__who {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.quote__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ember-dim);
  color: var(--ember-soft);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  flex: none;
}
.quote__name {
  font-weight: 500;
  font-size: var(--step--1);
}
.quote__role {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.quote__link {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember-soft);
  white-space: nowrap;
}
.quote__link:hover {
  color: var(--ember);
}
@media (max-width: 960px) {
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* ---------- Final CTA ---------- */
.cta-final {
  text-align: center;
  padding-block: calc(var(--space-section) * 1.15);
  position: relative;
  overflow: clip;
}
.cta-final::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 90vw;
  height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 100%, rgba(255, 77, 0, 0.16), transparent 70%);
  pointer-events: none;
}
.cta-final__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-giant);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 17ch;
  margin-inline: auto;
}
.cta-final__lede {
  max-width: 46ch;
  margin: 1.8rem auto 2.6rem;
  color: var(--muted);
  font-size: var(--step-1);
}
.cta-final__assure {
  margin-top: 1.6rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2rem;
  background: var(--obsidian-2);
}
.footer__grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__tag {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 34ch;
  font-size: var(--step--1);
}
.footer__links {
  display: flex;
  gap: 2rem;
}
.footer__links a {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.footer__links a:hover {
  color: var(--ember-soft);
}
.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Case study & inner pages ---------- */
.page-hero {
  padding-top: clamp(9rem, 22vh, 14rem);
  padding-bottom: clamp(3rem, 7vh, 5rem);
}
.page-hero__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-giant);
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-top: 1.4rem;
}
.page-hero__lede {
  margin-top: 1.6rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: var(--step-1);
}
.page-hero__ctas {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.backlink {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.backlink:hover {
  color: var(--ember-soft);
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: clip;
  margin-top: clamp(2.5rem, 6vh, 4rem);
}
.fact {
  background: var(--obsidian-2);
  padding: 1.4rem 1.5rem;
}
.fact__label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.fact__value {
  margin-top: 0.5rem;
  font-weight: 500;
  font-size: var(--step-0);
}
.fact__value a {
  color: var(--ember-soft);
}
.prose {
  max-width: 68ch;
  color: var(--bone-dim);
  font-size: var(--step-1);
  line-height: 1.7;
}
.prose p + p {
  margin-top: 1.4rem;
}
.deliverables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.2rem;
}
.deliverable {
  padding: clamp(1.6rem, 2.5vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  transition: border-color 0.4s, transform 0.5s var(--ease-out);
}
.deliverable:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.deliverable__index {
  font-family: var(--f-mono);
  font-size: var(--step--1);
  color: var(--ember);
}
.deliverable__name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  margin-block: 0.9rem 0.7rem;
}
.deliverable__body {
  color: var(--muted);
  font-size: var(--step-0);
}
.impact {
  display: flex;
  gap: clamp(2.5rem, 7vw, 6rem);
  flex-wrap: wrap;
}
.impact .stat__num {
  font-size: var(--step-4);
}

/* ---------- Reveal defaults ----------
   Hidden ONLY once JS confirms the motion stack loaded (html.motion),
   so a failed CDN or disabled JS never hides content. */
html.motion [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
}
html.motion [data-hero-fade] {
  opacity: 0;
}
html.motion [data-hero-title] {
  visibility: hidden;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html.motion [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
