/* zulfiqarali.tech — The Index.
   Tokens first; everything below references them. One grotesque family
   (Barlow), two cuts. Paper, ink, one amber in three roles only:
   the active index state, link hovers, the enquiry button. */

@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/Barlow-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/Barlow-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/Barlow-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../assets/fonts/Barlow-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #FAFAF8;
  --ink: #141414;
  --ink-soft: #3D3B36;
  --muted: #5A574F;
  --line: #E2E0D8;
  --line-strong: #C9C6BC;
  --amber: #E2A63D;
  --amber-dark: #96690D;
  --error: #B3261E;
  --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);
  --pad: clamp(20px, 4.5vw, 60px);
  --topbar-h: 58px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--amber-dark); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber-dark);
  outline-offset: 2px;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-name {
  font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap;
}
.topbar-role {
  color: var(--muted); font-size: 15px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.topbar .btn { margin-left: auto; }

.btn {
  display: inline-block;
  background: var(--amber-dark); color: var(--paper);
  font-family: var(--font); font-weight: 600; font-size: 15px;
  padding: 9px 18px; border: 0; border-radius: 6px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 180ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: scale(0.97); }
.btn-large { font-size: 17px; padding: 13px 26px; }

/* ---------- Intro ---------- */

.intro { padding: clamp(56px, 11vh, 120px) var(--pad) clamp(48px, 9vh, 96px); }
.intro-statement {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.3rem, 5.2vw, 4.3rem);
  line-height: 1.02; letter-spacing: -0.01em;
  max-width: 16em; margin: 0 0 36px;
  text-wrap: balance;
}
.intro-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 56px;
  max-width: 1080px;
}
.intro-cols p { margin: 0; color: var(--ink-soft); max-width: 52ch; }
.intro-prices {
  margin: 40px 0 0; font-weight: 500; font-size: 18px;
}
.intro-prices .num { font-weight: 600; }

/* ---------- Section heads ---------- */

.section-head, .index-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--ink);
  padding-top: 18px; margin-bottom: clamp(36px, 6vh, 64px);
}
.section-head h2, .index-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1; margin: 0; letter-spacing: 0.005em;
}
.section-head span, .index-head span { color: var(--muted); font-size: 15px; text-align: right; }

/* ---------- The Index ---------- */

.index-section { padding: 0 var(--pad) clamp(64px, 10vh, 120px); }

.index-grid {
  display: grid;
  grid-template-columns: minmax(330px, 40%) 1fr;
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

/* Stage — sticky on desktop */
.stage {
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
  display: flex; flex-direction: column; gap: 22px;
}
.stage-number-mask {
  height: 1em;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(6.5rem, 11.5vw, 11rem);
  line-height: 1; overflow: hidden;
  color: var(--amber-dark);
}
.stage-number-col { transition: transform 650ms var(--ease-inout); will-change: transform; }
.stage-number-col span {
  display: block; height: 1em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stage-film {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.stage-film video, .stage-film img.poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 450ms var(--ease-out);
  pointer-events: none;
}
.stage-film video.is-on, .stage-film img.poster.is-on { opacity: 1; }
.stage-foot { display: flex; align-items: center; gap: 20px; }
.stage-count { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage-progress { flex: 1; height: 2px; background: var(--line); overflow: hidden; }
.stage-progress-fill {
  height: 100%; width: 100%;
  background: var(--amber);
  transform: scaleX(0); transform-origin: left center;
}

/* Entries */
.entries { min-width: 0; }
.entry {
  min-height: 96vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6vh 0;
}
.entry-inner { transition: opacity 450ms var(--ease-out); }
.index-grid.has-active .entry-inner { opacity: 0.22; }
.index-grid.has-active .entry.is-active .entry-inner { opacity: 1; }

.entry-num {
  display: none; /* desktop reads the number from the stage */
  font-family: var(--font-display); font-weight: 600;
  color: var(--amber-dark); font-variant-numeric: tabular-nums;
}
.entry-meta { color: var(--muted); font-size: 15.5px; margin: 0 0 10px; }
.entry-meta strong { color: var(--ink-soft); font-weight: 500; }
.entry-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.2rem, 7.6vw, 7.2rem);
  line-height: 0.96; letter-spacing: -0.01em;
  margin: 0 0 18px; text-wrap: balance;
}
.entry-claim { font-size: 21px; font-weight: 500; line-height: 1.4; max-width: 44ch; margin: 0 0 14px; }
.entry-story { color: var(--ink-soft); max-width: 57ch; margin: 0 0 26px; }
.entry-links { display: flex; gap: 30px; flex-wrap: wrap; }
.entry-links a { font-weight: 600; font-size: 16.5px; }
.entry-links a.secondary { color: var(--muted); font-weight: 500; }
.entry-links a.secondary:hover { color: var(--amber-dark); }

.entry-media { display: none; margin: 0 0 26px; }
.entry-media video, .entry-media img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line-strong); background: var(--ink);
}
.entry-media video { display: none; }        /* revealed once it can play */
.entry-media video.ready { display: block; }

.noscript-index { max-width: 65ch; }
.noscript-index li { margin-bottom: 18px; }

/* ---------- How I work ---------- */

.process, .about, .enquire { padding: clamp(56px, 9vh, 104px) var(--pad); }
.process-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 6vw, 96px); align-items: start;
}
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { border-top: 1px solid var(--line); padding: 22px 0 26px; }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; margin: 0 0 8px; display: flex; gap: 16px; align-items: baseline;
}
.step-num { color: var(--amber-dark); font-size: 19px; font-variant-numeric: tabular-nums; }
.steps p { margin: 0; color: var(--ink-soft); max-width: 56ch; }

.prices h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; margin: 0 0 14px;
}
.prices table { width: 100%; border-collapse: collapse; }
.prices td {
  padding: 13px 0; border-top: 1px solid var(--line);
  vertical-align: top;
}
.prices tr:last-child td { border-bottom: 1px solid var(--line); }
.prices td.num { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 20px; }
.prices-note { color: var(--muted); font-size: 15px; margin-top: 16px; max-width: 46ch; }

/* ---------- About ---------- */

.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 56px; max-width: 1080px; }
.about-cols p { margin: 0; color: var(--ink-soft); max-width: 52ch; font-size: 18px; }

/* ---------- Enquire ---------- */

.enquire { border-top: 1px solid var(--ink); }
.enquire h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.98;
  margin: 0 0 16px;
}
.enquire-line { font-size: 19px; max-width: 52ch; margin: 0 0 40px; color: var(--ink-soft); }
#enquiryForm {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px;
  max-width: 880px;
}
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }
.field-action { justify-content: end; }
.field label { font-weight: 500; font-size: 15px; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  font-family: var(--font); font-size: 16.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 11px 14px; width: 100%;
  transition: border-color 150ms var(--ease-out);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--amber-dark); outline: 2px solid var(--amber-dark); outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14.5px; margin: 7px 0 0; }
.enquire-note { color: var(--muted); font-size: 15px; margin-top: 30px; max-width: 62ch; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px var(--pad) 34px;
  display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: baseline;
  color: var(--muted); font-size: 15px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-right: auto; }
.footer-links a { color: var(--ink-soft); }

/* ---------- Narrow screens: the stage dissolves ---------- */

@media (max-width: 1023px) {
  .stage { display: none; }
  .index-grid { display: block; }
  .entry {
    min-height: 0;
    padding: 44px 0 52px;
    border-top: 1px solid var(--line);
  }
  .entry:first-child { border-top: 0; }
  .index-grid.has-active .entry-inner { opacity: 1; }
  .entry-num { display: block; font-size: 30px; margin-bottom: 8px; }
  .entry-media { display: block; }
  .entry-name { font-size: clamp(3rem, 13.5vw, 5.2rem); }
  .process-grid, .about-cols, .intro-cols { grid-template-columns: 1fr; }
  #enquiryForm { grid-template-columns: 1fr; }
  .field-action { justify-content: start; }
  .topbar-role { display: none; }
}

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