@import url('/fonts/fonts.css');

/* ==========================================================================
   FANTASIST
   The mark is four check marks nested five deep, and its four colours are the
   four disciplines. That mapping runs the whole page: a section's colour tells
   you which arm of the studio it belongs to. Nothing here is decorative.
   ========================================================================== */

:root {
  /* Ink — the studio is a screening room, not a gallery */
  --ink-900: #050c12;
  --ink-850: #070f16;
  --ink-800: #0a141d;
  --ink-750: #0e1c27;
  --ink-700: #132532;
  --line: #1b3040;
  --line-soft: #12222e;

  /* Light band */
  --porcelain: #ecefed;
  --paper: #f7f9f8;
  --paper-line: #d8dedb;

  --text: #f2f6f5;
  --haze: #93a8b6;
  --haze-dim: #6b8090;
  --ink-text: #0a141d;
  --ink-haze: #566672;

  /* The four arms */
  --azure: #0e90da;
  --flare: #fb6a05;
  --aqua: #06b6b3;
  --jade: #35c21c;
  --amber: #fcae04;

  --arm: var(--azure);

  --font-display: 'Bricolage Grotesque', 'Readex Pro', system-ui, sans-serif;
  --font-body: 'Figtree', 'Readex Pro', system-ui, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, monospace;

  --tracking-mono: 0.14em;
  --lede-leading: 1.72;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 1320px;
  --radius: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --prism: linear-gradient(90deg, var(--azure), var(--flare) 34%, var(--aqua) 67%, var(--jade));
}

[dir='rtl'] {
  --font-display: 'Readex Pro', system-ui, sans-serif;
  --font-body: 'Readex Pro', system-ui, sans-serif;
  --font-mono: 'Readex Pro', system-ui, sans-serif;
  /* Arabic letterforms must never be tracked apart */
  --tracking-mono: 0;
  --lede-leading: 1.95;
  --prism: linear-gradient(-90deg, var(--azure), var(--flare) 34%, var(--aqua) 67%, var(--jade));
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 6rem;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir='rtl'] body {
  font-size: 1.075rem;
  line-height: 1.9;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--aqua);
  color: var(--ink-900);
}

/* --------------------------------------------------------------- helpers */

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

.skip {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 1rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--text);
  color: var(--ink-900);
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus {
  inset-block-start: 1rem;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------- type */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
  margin: 0;
  text-wrap: balance;
}

[dir='rtl'] h1,
[dir='rtl'] h2,
[dir='rtl'] h3,
[dir='rtl'] h4 {
  letter-spacing: 0;
  line-height: 1.32;
  font-weight: 600;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--haze);
}

[dir='rtl'] .eyebrow {
  font-size: 0.8125rem;
  text-transform: none;
}

.eyebrow::before {
  content: '';
  width: 1.35rem;
  height: 0.6rem;
  flex: none;
  background: var(--arm);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
}

.lede {
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  line-height: var(--lede-leading);
  color: var(--haze);
  max-width: 56ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

[dir='rtl'] .mono {
  font-size: 0.8125rem;
  text-transform: none;
}

/* --------------------------------------------------------------- sections */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 8.5rem);
}

.section--light {
  background: var(--porcelain);
  color: var(--ink-text);
}

.section--light .lede,
.section--light .eyebrow {
  color: var(--ink-haze);
}

.section--tight {
  padding-block: clamp(3rem, 5vw, 5rem);
}

.section-head {
  display: grid;
  gap: 1.25rem;
  max-width: 68ch;
  margin-block-end: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
  position: relative;
}

.rule::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 5rem;
  height: 1px;
  background: var(--arm);
}

.section--light .rule {
  background: var(--paper-line);
}

/* --------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--text);
  --btn-fg: var(--ink-900);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

[dir='rtl'] .btn {
  font-weight: 500;
  letter-spacing: 0;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn__tick {
  width: 1.1rem;
  height: 0.55rem;
  flex: none;
  background: currentColor;
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
  transition: transform 0.35s var(--ease);
}

.btn:hover .btn__tick {
  transform: translateX(3px);
}

[dir='rtl'] .btn:hover .btn__tick {
  transform: translateX(-3px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--arm);
  color: var(--arm);
}

.section--light .btn--ghost {
  --btn-fg: var(--ink-text);
  border-color: var(--paper-line);
}

.btn--arm {
  --btn-bg: var(--arm);
  --btn-fg: var(--ink-900);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--text);
  padding-block-end: 0.35rem;
  border-block-end: 1px solid var(--line);
  transition: border-color 0.25s, color 0.25s;
}

[dir='rtl'] .link {
  font-size: 0.8125rem;
  text-transform: none;
}

.link:hover {
  color: var(--arm);
  border-color: var(--arm);
}

.section--light .link {
  color: var(--ink-text);
  border-color: var(--paper-line);
}

/* --------------------------------------------------------------- header */

.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background 0.35s, backdrop-filter 0.35s;
}

.header::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  height: 1px;
  background: var(--prism);
  opacity: 0;
  transition: opacity 0.35s;
}

.header.is-stuck {
  background: color-mix(in srgb, var(--ink-900) 82%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
}

.header.is-stuck::after {
  opacity: 0.55;
}

.header__bar {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
}

.brand__mark {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(90deg);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

[dir='rtl'] .brand__name {
  letter-spacing: 0.08em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  margin-inline-start: auto;
}

.header__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--haze);
  padding-block: 0.4rem;
  transition: color 0.25s;
}

.header__link:hover,
.header__link.is-active {
  color: var(--text);
}

.header__link::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--arm);
  transition: width 0.3s var(--ease);
}

.header__link:hover::after,
.header__link.is-active::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.35rem;
  padding-inline: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--haze);
  transition: color 0.25s, border-color 0.25s;
}

[dir='rtl'] .lang {
  font-family: 'Figtree', system-ui, sans-serif;
}

.lang:hover {
  color: var(--text);
  border-color: var(--aqua);
}

.header__cta {
  padding: 0.62rem 1.15rem;
  font-size: 0.9rem;
}

.burger {
  display: none;
  width: 2.6rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  align-content: center;
  gap: 0.25rem;
  padding: 6rem var(--gutter) 3rem;
  background: var(--ink-850);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease), visibility 0.5s;
}

.drawer.is-open {
  transform: translateY(0);
  visibility: visible;
}

.drawer a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding-block: 0.5rem;
  border-block-end: 1px solid var(--line-soft);
}

[dir='rtl'] .drawer a {
  letter-spacing: 0;
  font-weight: 600;
}

/* --------------------------------------------------------------- the mark */

/* The three rings of the real logo, stacked. Each layer is the same square
   canvas centred on the star, so they register exactly and share one rotation
   origin. Stacked and unrotated they are the original file, pixel for pixel. */
.mark {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.mark__ring,
.mark__arm {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Counter-rotation, slow enough to read as drift rather than motion. */
.mark--spin .mark__ring {
  animation: turn var(--spin, 240s) linear infinite;
}

.mark--spin .mark__ring[data-ring='0'] {
  --spin: 260s;
}

.mark--spin .mark__ring[data-ring='1'] {
  --spin: 185s;
  animation-direction: reverse;
}

.mark--spin .mark__ring[data-ring='2'] {
  --spin: 130s;
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

/* On the compass the outer ring is split into its four arms, and it holds
   still — a control has to stay readable. */
.mark--dial .mark__ring {
  opacity: 0.22;
  filter: saturate(0.5);
}

/* Desaturating the resting arms keeps them reading as "off" rather than as a
   muddy version of the brand colour. */
.mark--dial .mark__arm {
  opacity: 0.26;
  filter: saturate(0.35);
  transition: opacity 0.45s var(--ease), filter 0.45s var(--ease);
}

.mark--dial .mark__arm.is-on {
  opacity: 1;
  filter: none;
}


/* --------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-block: clamp(8rem, 14vh, 11rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset-block-start: -18%;
  inset-inline-end: -12%;
  width: min(90vw, 900px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(6, 182, 179, 0.16), rgba(14, 144, 218, 0.09) 42%, transparent 68%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
}

.hero__copy {
  display: grid;
  gap: 1.75rem;
  justify-items: start;
}

.hero h1 {
  font-size: clamp(2.9rem, 7.3vw, 6.1rem);
  letter-spacing: -0.045em;
  font-weight: 800;
}

[dir='rtl'] .hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 5rem);
  letter-spacing: 0;
  font-weight: 600;
}

.hero h1 span {
  display: block;
}

.hero__line--2 {
  color: var(--aqua);
}

.hero__line--3 {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.1vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text);
  margin-block-start: clamp(0.9rem, 1.6vw, 1.4rem);
  display: flex !important;
  align-items: baseline;
  gap: 0.65rem;
}

[dir='rtl'] .hero__line--3 {
  letter-spacing: 0;
}

.hero__line--3::before {
  content: '';
  width: 1.5rem;
  height: 0.75rem;
  flex: none;
  align-self: center;
  background: var(--jade);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__star {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero__star .mark {
  max-width: min(27rem, 100%);
  filter: drop-shadow(0 0 70px rgba(6, 182, 179, 0.16));
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-block-start: clamp(3rem, 6vw, 5rem);
  border-block-start: 1px solid var(--line);
}

.stat {
  padding: 1.5rem 0.25rem 0;
  border-inline-end: 1px solid var(--line-soft);
  position: relative;
}

.stat:last-child {
  border-inline-end: 0;
}

.stat::before {
  content: '';
  position: absolute;
  inset-block-start: -1px;
  inset-inline-start: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--stat-color, var(--arm));
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

[dir='rtl'] .stat__value {
  letter-spacing: 0;
  font-weight: 600;
  /* Arabic-Indic digits carry below the baseline; line-height 1 clips them. */
  line-height: 1.24;
}

.stat__label {
  margin-block-start: 0.6rem;
  color: var(--haze-dim);
}

/* --------------------------------------------------------------- compass */

.compass {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

/* The dial follows you down the list — it is the index, so it stays in view. */
.compass__dial {
  position: sticky;
  inset-block-start: 7rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.compass__dial .mark {
  width: 74%;
}

.arm-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: color-mix(in srgb, var(--ink-800) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--haze);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

[dir='rtl'] .arm-btn {
  font-size: 0.8125rem;
  text-transform: none;
}

.arm-btn::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--dot);
  transition: box-shadow 0.3s;
}

.arm-btn[aria-pressed='true'] {
  color: var(--text);
  border-color: var(--dot);
}

.arm-btn[aria-pressed='true']::before {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 26%, transparent);
}

.arm-btn:hover {
  color: var(--text);
}

.arm-btn--n {
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
}
[dir='rtl'] .arm-btn--n {
  transform: translateX(50%);
}
.arm-btn--e {
  inset-block-start: 50%;
  inset-inline-end: 0;
  transform: translateY(-50%);
}
.arm-btn--s {
  inset-block-end: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
}
[dir='rtl'] .arm-btn--s {
  transform: translateX(50%);
}
.arm-btn--w {
  inset-block-start: 50%;
  inset-inline-start: 0;
  transform: translateY(-50%);
}

.compass__panel {
  min-height: 26rem;
}

.compass__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  color: var(--arm);
}

.compass__title {
  font-size: clamp(1.8rem, 3.4vw, 2.75rem);
  margin-block: 0.7rem 0.4rem;
}

.compass__tagline {
  color: var(--arm);
  font-size: 1rem;
}

.compass__intro {
  margin-block-start: 1.1rem;
  color: var(--haze);
  max-width: 52ch;
  line-height: var(--lede-leading);
}

.svc-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-block-start: 1px solid var(--line);
}

.svc {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.4rem 1rem;
  padding-block: 1rem;
  border-block-end: 1px solid var(--line-soft);
}

.svc__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--haze-dim);
  padding-block-start: 0.35rem;
}

[dir='rtl'] .svc__num {
  font-family: 'Figtree', system-ui, sans-serif;
}

.svc__name {
  font-family: var(--font-display);
  font-size: 1.075rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

[dir='rtl'] .svc__name {
  letter-spacing: 0;
  font-weight: 500;
}

.svc__note {
  grid-column: 2;
  font-size: 0.9375rem;
  color: var(--haze-dim);
  line-height: 1.6;
}

[dir='rtl'] .svc__note {
  line-height: 1.85;
}

.is-swapping {
  animation: swap 0.45s var(--ease);
}

@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* --------------------------------------------------------------- work */

.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* Spans are declared per project in content/projects.js and always add up to
   six across a row, so the grid never leaves a stranded card. */
.work-card {
  grid-column: span var(--span, 3);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.work-card__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-750);
  aspect-ratio: 16 / 11;
}

.work-card[data-shape='wide'] .work-card__frame {
  aspect-ratio: 16 / 9;
}

.work-card[data-shape='tall'] .work-card__frame {
  aspect-ratio: 4 / 5;
}

.work-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s;
  filter: saturate(0.92);
}

.work-card:hover .work-card__frame img {
  transform: scale(1.045);
  filter: saturate(1.08);
}

.work-card__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  pointer-events: none;
}

.work-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--haze-dim);
}

.dots {
  display: inline-flex;
  gap: 0.28rem;
}

.dots i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--dot);
}

.work-card h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.6rem);
}

.work-card__kicker {
  color: var(--haze-dim);
  font-size: 0.9375rem;
}

.work-card:hover h3 {
  color: var(--arm);
}

/* --------------------------------------------------------------- process */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-block-start: 2px solid transparent;
  border-image: var(--prism) 1;
}

.step {
  padding: 1.9rem 1.4rem 0 0;
  border-inline-end: 1px solid var(--paper-line);
}

[dir='rtl'] .step {
  padding: 1.9rem 0 0 1.4rem;
}

.step:last-child {
  border-inline-end: 0;
}

.step__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--tracking-mono);
  color: var(--step-color);
}

[dir='rtl'] .step__num {
  font-family: 'Figtree', system-ui, sans-serif;
}

.step h3 {
  font-size: 1.3rem;
  margin-block: 0.65rem 0.7rem;
}

.step p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-haze);
}

[dir='rtl'] .step p {
  line-height: 1.9;
}

.step__out {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-block-start: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-text);
}

[dir='rtl'] .step__out {
  font-size: 0.8rem;
  text-transform: none;
}

.step__out::before {
  content: '';
  width: 0.9rem;
  height: 0.45rem;
  background: var(--step-color);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
}

/* --------------------------------------------------------------- services page */

.pillar {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-block-start: 1px solid var(--line);
}

.pillar__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
  margin-block-end: 2.75rem;
}

.pillar__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: var(--tracking-mono);
  color: var(--arm);
}

[dir='rtl'] .pillar__index {
  font-family: 'Figtree', system-ui, sans-serif;
}

.pillar__head h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  margin-block-start: 0.8rem;
}

.pillar__tagline {
  color: var(--arm);
  margin-block-start: 0.5rem;
}

/* Track counts divide the item count exactly, so no empty cell ever shows. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.card {
  background: var(--ink-850);
  padding: 1.6rem 1.5rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  transition: background 0.3s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: var(--arm);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.4s var(--ease);
}

.card:hover {
  background: var(--ink-800);
}

.card:hover::before {
  transform: scaleX(1);
}

.cards--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card__num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  color: var(--haze-dim);
}

[dir='rtl'] .card__num {
  font-family: 'Figtree', system-ui, sans-serif;
}

.card h3 {
  font-size: 1.075rem;
  letter-spacing: -0.015em;
}

[dir='rtl'] .card h3 {
  letter-spacing: 0;
}

.card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--haze-dim);
}

[dir='rtl'] .card p {
  line-height: 1.9;
}

/* --------------------------------------------------------------- page head */

.page-head {
  padding-block: clamp(8rem, 15vh, 11rem) clamp(2.5rem, 5vw, 4rem);
  position: relative;
}

.page-head__inner {
  display: grid;
  gap: 1.3rem;
  max-width: 62ch;
}

.page-head h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}

[dir='rtl'] .page-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

/* --------------------------------------------------------------- project */

.project__hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--ink-750);
}

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

.project__body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
}

.project__body p + p {
  margin-block-start: 1.2rem;
}

.project__body p {
  color: var(--haze);
  line-height: var(--lede-leading);
}

.facts {
  display: grid;
  gap: 1.4rem;
  align-content: start;
  padding-inline-start: clamp(1.25rem, 3vw, 2.25rem);
  border-inline-start: 1px solid var(--line);
}

.fact__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--haze-dim);
  margin-block-end: 0.45rem;
}

[dir='rtl'] .fact__label {
  font-size: 0.8rem;
  text-transform: none;
}

.fact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.fact li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.9375rem;
}

.fact li::before {
  content: '';
  width: 0.8rem;
  height: 0.4rem;
  flex: none;
  background: var(--arm);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
}

.pagenav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block-start: 2rem;
  border-block-start: 1px solid var(--line);
  margin-block-start: clamp(3rem, 6vw, 5rem);
}

/* --------------------------------------------------------------- studio */

.prose {
  display: grid;
  gap: 1.35rem;
  max-width: 60ch;
}

.prose p {
  color: var(--ink-haze);
  line-height: var(--lede-leading);
  font-size: 1.075rem;
}

.studio__split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.studio__mark {
  display: grid;
  place-items: center;
}

.studio__mark .mark {
  width: min(21rem, 100%);
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
}

.principle {
  padding-block-start: 1.4rem;
  border-block-start: 2px solid var(--pr-color);
}

.principle h3 {
  font-size: 1.2rem;
  margin-block-end: 0.6rem;
}

.principle p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-haze);
}

[dir='rtl'] .principle p {
  line-height: 1.9;
}

/* --------------------------------------------------------------- cta */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--ink-850);
}

.cta::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--prism);
}

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

.cta h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  max-width: 18ch;
}

/* --------------------------------------------------------------- form */

.form {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  max-width: 46rem;
}

.fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.fieldset > legend {
  display: block;
  width: 100%;
  padding: 0 0 1.1rem;
  margin-block-end: 0.4rem;
  border-block-end: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--haze);
}

[dir='rtl'] .fieldset > legend {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: 0.85rem;
  text-transform: none;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.4rem;
}

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

.field > label,
.field__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.field__hint {
  font-size: 0.8125rem;
  color: var(--haze-dim);
  line-height: 1.6;
}

.req {
  color: var(--flare);
  margin-inline-start: 0.25rem;
}

.opt {
  color: var(--haze-dim);
  font-weight: 400;
  margin-inline-start: 0.35rem;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.25s, background 0.25s;
}

.textarea {
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.7;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2393a8b6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
  padding-inline-end: 2.6rem;
}

[dir='rtl'] .select {
  background-position: left 1rem center;
  padding-inline-end: 1rem;
  padding-inline-start: 2.6rem;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--arm);
  background: var(--ink-800);
}

.input[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--flare);
}

.error {
  font-size: 0.8125rem;
  color: var(--flare);
  min-height: 0;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.6rem;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: border-color 0.25s, background 0.25s;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__box {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.choice__box::after {
  content: '';
  width: 0.6rem;
  height: 0.32rem;
  background: var(--ink-900);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
  opacity: 0;
  transition: opacity 0.15s;
}

.choice:hover {
  border-color: var(--haze-dim);
}

.choice:has(input:checked) {
  border-color: var(--dot, var(--arm));
  background: color-mix(in srgb, var(--dot, var(--arm)) 9%, transparent);
}

.choice:has(input:checked) .choice__box {
  background: var(--dot, var(--arm));
  border-color: var(--dot, var(--arm));
}

.choice:has(input:checked) .choice__box::after {
  opacity: 1;
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--arm);
  outline-offset: 2px;
}

.choice--radio .choice__box {
  border-radius: 50%;
}

.detail {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.detail + .detail {
  margin-block-start: 0.6rem;
}

.detail > summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
}

.detail > summary::-webkit-details-marker {
  display: none;
}

.detail > summary::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--dot);
  flex: none;
}

.detail > summary::after {
  content: '+';
  margin-inline-start: auto;
  font-family: var(--font-mono);
  color: var(--haze-dim);
}

.detail[open] > summary::after {
  content: '–';
}

.detail__body {
  padding: 0 1rem 1rem;
  display: grid;
  gap: 0.5rem;
}

.consent {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: flex-start;
}

.form__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.form__status {
  font-size: 0.9375rem;
  color: var(--flare);
}

/* WhatsApp, kept separate from the form so it reads as its own route in. */
.wa {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.wa__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--jade);
  flex: none;
}

.btn--wa {
  --btn-bg: var(--jade);
  --btn-fg: #04240a;
}

.btn--wa .wa__dot {
  background: #04240a;
}

.direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 46rem;
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
}

.direct__title {
  font-size: 1.1rem;
}

.direct__text {
  margin-block-start: 0.4rem;
  color: var(--haze-dim);
  font-size: 0.9375rem;
}

.direct__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.form-done {
  display: grid;
  gap: 1.2rem;
  justify-items: start;
  max-width: 46rem;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-850);
}

.form-done h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.form-done__tick {
  width: 3rem;
  height: 1.5rem;
  background: var(--jade);
  clip-path: polygon(0 42%, 8% 32%, 36% 66%, 92% 0, 100% 12%, 36% 92%);
}

.is-hidden {
  display: none !important;
}

/* --------------------------------------------------------------- legal */

.legal {
  display: grid;
  gap: 2.25rem;
  max-width: 62ch;
}

.legal section {
  display: grid;
  gap: 0.7rem;
}

.legal h2 {
  font-size: 1.25rem;
}

.legal p {
  color: var(--haze);
  line-height: var(--lede-leading);
}

/* --------------------------------------------------------------- footer */

.footer {
  background: var(--ink-850);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  border-block-start: 1px solid var(--line);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}

.footer__brand {
  display: grid;
  gap: 1.1rem;
  align-content: start;
  justify-items: start;
}

.footer__brand img {
  width: 3.4rem;
}

.footer__tagline {
  color: var(--haze);
  max-width: 28ch;
}

.footer__col h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--haze-dim);
  margin-block-end: 1rem;
}

[dir='rtl'] .footer__col h3 {
  font-size: 0.85rem;
  text-transform: none;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer__col a {
  color: var(--haze);
  font-size: 0.9375rem;
  transition: color 0.25s;
}

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

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-block-start: clamp(2.5rem, 5vw, 4rem);
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line-soft);
  color: var(--haze-dim);
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
}

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

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__star {
    order: -1;
    max-width: 24rem;
    margin-inline: auto;
  }
  .compass {
    grid-template-columns: 1fr;
  }
  .compass__dial {
    position: static;
    max-width: 26rem;
    margin-inline: auto;
    width: 100%;
  }
  .project__body,
  .pillar__head,
  .studio__split {
    grid-template-columns: 1fr;
  }
  .studio__mark {
    display: none;
  }
  .facts {
    padding-inline-start: 0;
    border-inline-start: 0;
    padding-block-start: 1.75rem;
    border-block-start: 1px solid var(--line);
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .step {
    padding-block-end: 1.75rem;
    border-block-end: 1px solid var(--paper-line);
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .header__nav {
    display: none;
  }
  .burger {
    display: flex;
  }
  .header__cta {
    display: none;
  }
  .work-card {
    grid-column: span 6;
  }
  .work-card[data-shape='tall'] .work-card__frame {
    aspect-ratio: 16 / 11;
  }
  .cards,
  .cards--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding-block: 1.25rem;
    border-block-end: 1px solid var(--line-soft);
  }
  .stat:nth-child(2n) {
    border-inline-end: 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .step {
    border-inline-end: 0;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .arm-btn {
    font-size: 0.62rem;
    padding: 0.4rem 0.65rem;
  }
  [dir='rtl'] .arm-btn {
    font-size: 0.72rem;
  }
  .compass__panel {
    min-height: 0;
  }
  .cards,
  .cards--quad {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .footer,
  .cta,
  .drawer {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
