/* =========================================================
   Sasiya Tassin — portfolio, redesign
   Everything is sized in rem, and 1rem scales with the
   viewport (10px at a 1500px-wide screen), so the whole
   layout keeps its proportions from laptop to big display.
   ========================================================= */

html { font-size: calc(100vw / 150); }
@media (min-width: 1800px) { html { font-size: 12px; } }
@media (max-width: 767px)  { html { font-size: calc(100vw / 39); } }

:root {
  --dark: #000;
  --light: #fff;
  --media: #eeeeee;
  --muted: #6b6e70;               /* 5:1 on white — passes WCAG AA for body text */
  --line: rgba(0, 0, 0, 0.15);
  --pad: 5.8rem;
  --gap: 2.4rem;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-io: cubic-bezier(0.785, 0.135, 0.15, 0.86);
}
html.is-dark {
  --dark: #fff;
  --light: #000;
  --media: #161616;
  --muted: #9a9da0;
  --line: rgba(255, 255, 255, 0.18);
}
@media (max-width: 767px) { :root { --pad: 2rem; --gap: 1.2rem; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--light);
  color: var(--dark);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: max(1.8rem, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
@media (max-width: 767px) { body { font-size: max(1.6rem, 15px); } }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, figure, dl, dd, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
::selection { background: var(--dark); color: var(--light); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 1rem; z-index: 100; background: var(--dark); color: var(--light); padding: 1rem 1.6rem; }
.skip:focus { left: 1rem; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 0 var(--pad);
}
.wrap { padding: 0 var(--pad); }
.sub9 { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); }
@media (max-width: 767px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid > *, .sub9 > * { grid-column: 1 / -1 !important; }
  .sub9 { grid-template-columns: 1fr; }
  .desk { display: none !important; }
}
@media (min-width: 768px) { .mob { display: none !important; } }

/* ---------- Type ---------- */
.display {
  font-size: 14rem; line-height: 1.025; letter-spacing: -0.02em;
  font-weight: 700; text-transform: uppercase;
}
.h3 { font-size: 5.75rem; line-height: 1.13; letter-spacing: -0.02em; font-weight: 400; }
.h4 { font-size: 4.5rem; line-height: 1.17; letter-spacing: -0.01em; font-weight: 400; }
.muted { color: var(--muted); }
.lbl { font-size: max(1.8rem, 15px); }              /* the (Parenthesised) labels */
@media (max-width: 767px) {
  .display { font-size: 4.8rem; }
  .h3 { font-size: 3rem; }
  .h4 { font-size: 2.6rem; }
  .lbl { font-size: 1.5rem; }
}

/* ---------- Line-by-line reveal (JS splits text into lines) ---------- */
.js [data-split] .ln { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js [data-split] .ln-i {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.25s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-split].is-in .ln-i { transform: none; }
.js [data-split]:not(.is-split) { visibility: hidden; }
.js [data-split] .w, .js [data-split] .ln-i { white-space: nowrap; }

.js [data-fade] {
  opacity: 0; transform: translateY(3rem);
  transition: opacity 1.1s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-fade].is-in { opacity: 1; transform: none; }

/* ---------- Links ---------- */
/* Double underline: the resting line retracts right, a new one draws in from the left */
.uline {
  position: relative; display: inline-flex; white-space: nowrap; --b: -0.2em;
  width: fit-content; align-self: flex-start;   /* never stretch inside flex columns */
}
.uline::before, .uline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: var(--b);
  height: 0.05em; min-height: 1px; background: currentColor;
}
.uline::before { transform: scaleX(1); transform-origin: left; transition: transform 0.55s var(--ease-io) 0.45s; }
.uline::after  { transform: scaleX(0); transform-origin: right; transition: transform 0.55s var(--ease-io); }
@media (hover: hover) and (pointer: fine) {
  .uline:hover::before { transform: scaleX(0); transform-origin: right; transition-delay: 0s; }
  .uline:hover::after  { transform: scaleX(1); transform-origin: left; transition-delay: 0.2s; }
}
/* Single underline that draws in on hover */
.hline { position: relative; }
.hline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.15em; height: 0.05em; min-height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.75s var(--ease);
}
.hline:hover::after { transform: scaleX(1); transform-origin: left; }
.status.hline::after { left: 1.6rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  mix-blend-mode: difference; color: #fff;   /* reads on light, dark and image backgrounds */
  padding-top: 3.5rem;
}
.site-header .grid { align-items: center; }
/* Once the page scrolls, the header sits on frosted glass instead of blending with what's under it */
.site-header { transition: background-color .4s ease, padding .4s var(--ease), box-shadow .4s ease; }
.site-header.is-scrolled {
  mix-blend-mode: normal; color: var(--dark);
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  padding-top: 1.6rem; padding-bottom: 1.6rem; box-shadow: 0 1px 0 var(--line);
}
html.is-dark .site-header.is-scrolled { background: rgba(0, 0, 0, .62); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
/* Three equal thirds: brand, clock and nav each start a 4-column third, so the gaps between them match */
.brand { grid-column: 1 / span 4; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap; }
.clock { grid-column: 5 / span 4; }
.clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav { grid-column: 9 / span 4; display: flex; align-items: center; gap: 0.6rem; }
.nav a { white-space: nowrap; }
/* Theme switch: an always-visible track so it reads as a switch, knob left = light, right = dark */
.theme-toggle {
  --s: max(1.8rem, 16px);
  margin-left: auto; position: relative; flex-shrink: 0;
  width: calc(var(--s) * 2 + 8px); height: calc(var(--s) + 8px);
  border: 1px solid currentColor; border-radius: 999px;
}
.theme-toggle .ball {
  position: absolute; top: 3px; left: 3px; width: var(--s); height: var(--s);
  border-radius: 50%; background: currentColor; transition: transform 0.6s var(--ease);
}
html.is-dark .theme-toggle .ball { transform: translateX(var(--s)); }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover .ball { transform: translateX(calc(var(--s) * 0.25)); }            /* a nudge hints it moves */
  html.is-dark .theme-toggle:hover .ball { transform: translateX(calc(var(--s) * 0.75)); }
}
.menu-btn { grid-column: 4 / -1; justify-self: end; font-size: 1.8rem; }
@media (max-width: 767px) {
  .site-header { padding-top: 2.4rem; }
  .site-header.is-scrolled { padding-top: 1.2rem; padding-bottom: 1.2rem; }
  .site-header .grid { display: flex; justify-content: space-between; align-items: center; }
}

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--dark); color: var(--light);
  padding: 2.4rem var(--pad); display: flex; flex-direction: column;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.9s var(--ease); visibility: hidden;
}
.menu.is-open { clip-path: inset(0); visibility: visible; }
.menu-top { display: flex; justify-content: space-between; align-items: center; }
.menu-links { margin-top: auto; display: flex; flex-direction: column; }
.menu-links a { font-size: 5.6rem; line-height: 1.05; font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; }
.menu-foot { margin-top: 4rem; display: flex; justify-content: space-between; align-items: center; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 12rem var(--pad) 5.8rem; }
.hero-title { position: relative; --indent: 19.5rem; text-indent: var(--indent); }
.hero-title .ht { display: block; }
.hero-title .ln { text-indent: 0; }
.hero-title .ln:first-child { text-indent: var(--indent); }
.hero-title .ln-i { text-indent: 0; }   /* inline-blocks inherit text-indent; indent once, on the line */
.title-box {
  position: absolute; left: 0; top: 0.25em; width: 17.5rem; height: 10rem;
  border-radius: 0.8rem; overflow: hidden; background: #000;
  clip-path: inset(0 100% 0 0 round 0.8rem); transition: clip-path 1.2s var(--ease) 0.3s;
}
.is-in > .title-box, .title-box.is-in { clip-path: inset(0 0 0 0 round 0.8rem); }
.title-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.title-box img.is-on { opacity: 1; }
/* Home hero: her line illustration, static, in the same slot as the case marks */
.title-box.title-illus { background: transparent; }
.title-illus img { object-fit: contain; object-position: left center; transition: none; }
html.is-dark .title-illus img { filter: invert(1); }   /* black line art stays visible on black */
.title-illus .lottie-holder { position: absolute; inset: 0; }
.title-illus .lottie-holder svg { display: block; }
.title-illus.has-lottie img.is-on { opacity: 0; }   /* the PNG shows until the animation is ready */
html.is-dark .title-illus .lottie-holder { filter: invert(1); }
/* Illustration box: 1.2x the case-mark box, at the drawing's own 3:2 ratio */
.hero-title.has-illus { --indent: 20rem; }
.has-illus .title-box { width: 18rem; height: 12rem; top: 0.08em; }
@media (max-width: 767px) {
  .hero-title.has-illus { --indent: 0; padding-top: 13.5rem; }
  .has-illus .title-box { width: 18.5rem; height: 12.3rem; }
}
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 4rem; }
.hero-foot .h4 { max-width: 75rem; }
@media (max-width: 767px) {
  .hero { padding-top: 9rem; padding-bottom: 3rem; }
  .hero-title { --indent: 0; text-indent: 0; padding-top: 11rem; }
  .title-box { top: 0; width: 15.4rem; height: 8.8rem; }
}

/* ---------- Hero divider ---------- */
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Sections ---------- */
.sec { margin-top: 30rem; }
.sec-tight { margin-top: 16rem; }
@media (max-width: 767px) { .sec { margin-top: 12rem; } .sec-tight { margin-top: 8rem; } }

.arrow-col { grid-column: 1 / span 3; font-size: 5.75rem; line-height: 1.13; }
.arrow-col span { display: inline-block; }
.js .arrow-col span { transform: translateX(-120%); transition: transform 1.4s var(--ease); }
.js .arrow-col.is-in span { transform: none; }
.statement { grid-column: 4 / span 9; }
.statement .sub9 { margin-top: 10rem; }
.statement .lbl { grid-column: span 3; }
.statement .body { grid-column: span 6; max-width: 50rem; }
.lead { color: var(--dark); }
.body p + p { margin-top: 2.6rem; }
@media (max-width: 767px) { .statement .sub9 { margin-top: 4rem; } .statement .lbl { margin-bottom: 2rem; } }

/* Big-title header with a side note (e.g. "Selected, work") */
.big-head { align-items: end; }
.big-head .display { grid-column: 1 / span 8; }
.big-head .note { grid-column: 9 / span 4; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-bottom: 1.2rem; }
.big-head .note p { max-width: 30rem; white-space: pre-line; }
@media (max-width: 767px) { .big-head .note { margin-top: 3rem; } }

/* ---------- Work: stacked sticky panels ---------- */
.stack { margin-top: 12rem; }
.panel {
  position: sticky; top: var(--stick, 0px);
  background: var(--light); border-top: 1px solid var(--line);
  padding: 6rem 0 7rem;
}
.panel-shade { position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; z-index: 2; }
html.is-dark .panel-shade { background: #fff; opacity: calc(var(--shade, 0) * 0.35); }
.panel .grid { position: relative; }
.panel-side { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 2rem; align-self: start; }
.panel-name { font-size: 9rem; line-height: 0.95; letter-spacing: -0.03em; font-weight: 700; text-transform: uppercase; }
.panel-meta { display: flex; flex-direction: column; gap: 0.6rem; }
.panel-main { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 4rem; }
.panel-main .h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 0.05em no-repeat; transition: background-size 0.8s var(--ease); }
.panel-main .h3 a:hover { background-size: 100% 0.05em; }
.panel-media { display: block; width: 100%; max-width: 62rem; aspect-ratio: 2280 / 1000; border-radius: 1rem; overflow: hidden; background: #000; }
.panel-media img, .panel-media video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.panel-media:hover img, .panel-media:hover video { transform: scale(1.04); }
.panel-text { max-width: 62rem; }
.panel-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 5rem; }
.panel-stats > div, .outcome-nums > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.panel-stats dd { font-size: 4.5rem; line-height: 1; letter-spacing: -0.02em; }
.panel-stats dt { margin-top: 0.8rem; font-size: max(1.5rem, 13px); color: var(--muted); max-width: 18rem; }
.status { display: inline-flex; align-items: center; gap: 0.8rem; }
.status::before { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: currentColor; }
@media (max-width: 767px) {
  .panel { padding: 4rem 0 5rem; }
  .panel-name { font-size: 5.2rem; }
  .panel-main { margin-top: 3rem; gap: 2.8rem; }
  .panel-stats { grid-template-columns: 1fr; row-gap: 2rem; }
  .panel-stats dd { font-size: 3.6rem; }
}

/* ---------- How I work: a sticky keyword follows the principle being read ---------- */
.principles { align-items: start; }
.pr-words {
  grid-column: 1 / span 6; position: sticky; top: calc(50vh - 5rem);
  height: 10rem; overflow: hidden;
}
.pr-word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-size: 8.6rem; line-height: 1.1; font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em;
  transform: translateY(110%); transition: transform 1.1s var(--ease);
}
.pr-word.is-active { transform: none; }
.pr-word.is-past { transform: translateY(-110%); }
.pr-list { grid-column: 7 / span 6; }
.pr-item {
  display: grid; grid-template-columns: 6rem 1fr; column-gap: 1.6rem; align-items: baseline;
  min-height: 45vh; align-content: center; border-top: 1px solid var(--line);
}
.pr-item .t { display: flex; flex-direction: column; gap: 1.4rem; }
.pr-title { font-size: 3.6rem; line-height: 1.15; letter-spacing: -0.02em; }
.pr-item .uline { margin-top: 1rem; }
.pr-key { grid-column: 1 / -1; font-size: 4.4rem; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em; margin-bottom: 1.6rem; }
@media (max-width: 767px) {
  .pr-item { min-height: 0; padding: 3.2rem 0 4rem; grid-template-columns: 4rem 1fr; }
  .pr-title { font-size: 2.4rem; }
}

/* ---------- Placeholders (swap for real images) ---------- */
.ph {
  position: relative; border-radius: 1rem; background: var(--media); overflow: hidden;
  display: flex; align-items: flex-end; padding: 2.4rem;
}
.ph figcaption { font-size: max(1.5rem, 13px); color: var(--muted); max-width: 34rem; }
.ph figcaption b { display: block; font-weight: 500; color: var(--dark); margin-bottom: 0.4rem; }
.ratio-45 { aspect-ratio: 4 / 5; }

/* ---------- Inline video (muted, looping) ---------- */
.media-video video { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 1rem; background: var(--media); }
.media-video figcaption { margin-top: 1.6rem; font-size: max(1.5rem, 13px); color: var(--muted); }

/* ---------- Media + text (collaboration) ---------- */
.mt-media { grid-column: 1 / span 6; }
.mt-text { grid-column: 8 / span 5; align-self: center; }
.mt-text .body { margin-top: 7rem; max-width: 41rem; }
@media (max-width: 767px) { .mt-text { margin-top: 4rem; } .mt-text .body { margin-top: 3rem; } }


/* ---------- Contact (home page) ---------- */
.contact .lbl { grid-column: 1 / span 2; }
.contact .c-main { grid-column: 3 / span 10; }
.contact .c-foot { margin-top: 6rem; display: flex; gap: 4rem; flex-wrap: wrap; align-items: baseline; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 16rem; padding-bottom: 3.5rem; }
.f-rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 5rem; }
.f-cols { display: flex; gap: 8rem; }
.f-cols h3 { font-size: max(1.8rem, 15px); font-weight: 400; margin-bottom: 1.6rem; }
.f-cols li + li { margin-top: 0.4rem; }
.f-cols a { color: var(--muted); transition: color 0.3s; }
.f-cols a:hover { color: var(--dark); }
.f-bottom { margin-top: 10rem; }
.f-meta { display: flex; justify-content: space-between; gap: 2rem; font-size: max(1.5rem, 13px); }
@media (max-width: 767px) {
  .site-footer { margin-top: 10rem; }
  .f-bottom { margin-top: 6rem; }
    .f-meta { flex-direction: column; gap: 0.6rem; }
}

/* ---------- Case pages ---------- */
.case-hero-media { margin-top: 2rem; }
.case-hero-media img, .case-hero-media video { display: block; width: 100%; height: auto; aspect-ratio: 2280 / 1000; object-fit: cover; border-radius: 1rem; background: #000; }
.facts { margin-top: 14rem; row-gap: 3rem; }
.fact { grid-column: span 3; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.fact dt { color: var(--muted); margin-bottom: 0.6rem; }
.fact dd { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }
@media (max-width: 767px) { .facts { margin-top: 6rem; } }

.c-label { grid-column: 1 / span 3; }
.c-body { grid-column: 4 / span 9; }
.c-body > .h3 { max-width: 95rem; }
.c-body .cols { margin-top: 7rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem var(--gap); max-width: 100rem; }
.c-body .text { margin-top: 5rem; max-width: 66rem; }
.c-body .text p + p { margin-top: 2rem; }
.dot-list li { display: flex; gap: 1.2rem; }
.dot-list li + li { margin-top: 1rem; }
.dot-list li::before { content: "—"; color: var(--muted); }
@media (max-width: 767px) {
  .c-label { margin-bottom: 2rem; }
  .c-body .cols { grid-template-columns: 1fr; margin-top: 4rem; }
  .c-body .text { margin-top: 3rem; }
}

.figure-full { margin-top: 8rem; }
/* Diagrams show at their own size at most — never stretched past their pixels, so labels stay crisp */
.figure-full img { width: auto; max-width: 100%; height: auto; border-radius: 1rem; background: var(--media); }
.figure-full figcaption { margin-top: 1.6rem; font-size: max(1.5rem, 13px); color: var(--muted); }

/* Decisions reuse the sticky panel stack, with a large figure on the left */
.panel-decision { min-height: 85vh; min-height: 85svh; }
.decision-n { grid-column: 1 / span 3; font-size: 22rem; line-height: 0.8; font-weight: 400; letter-spacing: -0.04em; }
.decision-lbl { grid-column: 4 / span 2; padding-top: 1rem; }
.decision-main { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 3rem; }
.decision-main .text p + p { margin-top: 2rem; }
@media (max-width: 767px) { .decision-n { font-size: 10rem; } .decision-main { margin-top: 2rem; } }

.outcome-nums { margin-top: 8rem; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4rem 6rem; }
.outcome-nums dd { font-size: 10rem; line-height: 0.9; letter-spacing: -0.03em; font-weight: 700; white-space: nowrap; }
.outcome-nums dt { margin-top: 1.6rem; color: var(--muted); max-width: 22rem; }
@media (max-width: 767px) { .outcome-nums { grid-template-columns: 1fr; } .outcome-nums dd { font-size: 5.6rem; white-space: normal; } }

.next-case { display: block; }
.next-case .lbl { display: block; margin-bottom: 3rem; }
.next-case .display { transition: opacity 0.4s; }
.next-case:hover .display { opacity: 0.55; }

/* ---------- Reading mode (case study pages) ----------
   Text is simply there: no fade-ins, no line reveals, no stacking panels.
   Only the hero title keeps its one-time entrance. */
html.js .calm [data-fade] { opacity: 1; transform: none; transition: none; }
html.js .calm [data-split]:not(.is-split) { visibility: visible; }
.calm .panel { position: static; }
.calm .panel-decision { min-height: 0; }
.calm .panel-shade { display: none; }

/* ---------- Reduced motion: show everything, move nothing ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js [data-split] .ln-i, .js [data-fade], .js .arrow-col span { transform: none !important; opacity: 1 !important; }
  .title-box { clip-path: none !important; }
}
