/* ==================================================================
   WORK — /work (the index) and /case-studies/* (one page per project).
   After Slope's work section: one sentence that says what we do, a
   calm grid of covers, and case studies that alternate large images
   with short, titled paragraphs. Corvo's own tokens, header, contact
   and footer come from index.css + intro.css; everything new is set in
   the logo face. Greek copy falls back to Helvetica Neue, the closest
   grotesk with Greek glyphs.
   ================================================================== */

.work-page {
  --gr: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gap: clamp(14px, 1.6vw, 26px);
  background: var(--ink);
}

.work-page main { background: var(--paper); color: var(--ink); }

/* Small uppercase label, the logo spec at label scale. */
.wk-label {
  margin: 0;
  font: 700 11px/1.3 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.wk-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px 5px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font: 700 9.5px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.wk-pill.is-blue { background: var(--blue); color: var(--white); box-shadow: none; }

/* ==================================================================
   /work — the index
   ================================================================== */

.wk-intro {
  padding: clamp(130px, 15vw, 210px) var(--pad) clamp(60px, 7vw, 110px);
}

.wk-intro h1 {
  margin: 0;
  font: 700 clamp(56px, 8vw, 136px)/.95 var(--sans);
  letter-spacing: -.05em;
}

.wk-intro h1 span { color: var(--blue); }

.wk-intro p {
  max-width: 34em;
  margin: clamp(22px, 2.4vw, 34px) 0 0;
  font: 400 clamp(16px, 1.25vw, 19px)/1.55 var(--gr);
  color: #38352f;
}

.wk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 4.4vw, 70px) var(--gap);
  margin: 0;
  padding: 0 var(--pad) clamp(100px, 12vw, 180px);
  list-style: none;
}

.wk-card { display: block; }

.wk-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-deep);
}

.wk-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.001);
  transition: transform 1.1s var(--ease);
}

.wk-card:hover .wk-cover img { transform: scale(1.045); }

/* "+ View work" — a small chip that rises in on hover, as on Slope. */
.wk-cover::after {
  content: "+ View work";
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 9px 13px 8px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 700 10px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s, transform .5s var(--ease);
}

.wk-card[target="_blank"] .wk-cover::after { content: "+ Visit site ↗︎"; }
.wk-card:hover .wk-cover::after { opacity: 1; transform: none; }

.wk-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
}

.wk-meta strong {
  font: 700 15px/1.2 var(--sans);
  letter-spacing: -.01em;
}

.wk-meta div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.wk-note {
  margin: 6px 0 0;
  font: 400 14px/1.45 var(--gr);
  color: var(--muted);
}

/* ==================================================================
   /case-studies/* — one project
   ================================================================== */

/* Hero: the project's own world, full screen, one line on top. */
.cs-hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #111;
  color: var(--white);
}

.cs-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
}

/* The lamp in the photo switches on and off, as it does on her site. */
.cs-hero img.is-on { animation: cs-lamp 9s ease-in-out infinite; }

@keyframes cs-lamp {
  0%, 22% { opacity: 0; }
  42%, 74% { opacity: 1; }
  94%, 100% { opacity: 0; }
}

.cs-hero-copy {
  position: absolute;
  inset: auto var(--pad) clamp(34px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}

.cs-hero h1 {
  margin: 0;
  font: 700 clamp(44px, 7.4vw, 128px)/.92 var(--sans);
  letter-spacing: -.045em;
  opacity: 0;
  transform: translateY(40px);
  animation: cs-in 1.2s var(--ease) .25s forwards;
}

.cs-hero .wk-label {
  opacity: 0;
  animation: cs-in 1s var(--ease) .6s forwards;
}

@keyframes cs-in { to { opacity: 1; transform: none; } }

/* Info: title and the story on the left, the facts on the right. */
.cs-info {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 140px);
  padding: clamp(70px, 9vw, 140px) var(--pad) clamp(60px, 8vw, 120px);
}

.cs-info .wk-label { color: var(--muted); margin-bottom: 18px; }

.cs-info h2 {
  max-width: 13em;
  margin: 0 0 clamp(26px, 3vw, 42px);
  font: 700 clamp(34px, 3.8vw, 62px)/1 var(--sans);
  letter-spacing: -.04em;
}

.cs-copy p {
  max-width: 34em;
  margin: 0 0 1.1em;
  font: 400 clamp(16px, 1.2vw, 18.5px)/1.62 var(--gr);
  color: #38352f;
}

.cs-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 30px;
  align-content: start;
  margin: 0;
  padding-top: 6px;
}

.cs-facts dt {
  margin-bottom: 12px;
  font: 700 10.5px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.cs-facts dd {
  margin: 0;
  font: 700 15px/1.55 var(--gr);
}

.cs-facts dd a { border-bottom: 1px solid; transition: color .25s; }
.cs-facts dd a:hover { color: var(--blue); }

/* Media blocks. Every image wipes up into place once, the first time
   it scrolls into view. */
.cs-media {
  margin: 0;
  overflow: hidden;
  background: var(--paper-deep);
}

.cs-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js .cs-reveal {
  clip-path: inset(14% 0 0 0);
  transition: clip-path 1.3s var(--ease);
}

.js .cs-reveal img {
  transform: scale(1.08);
  transition: transform 1.6s var(--ease);
}

.js .cs-reveal.is-in { clip-path: inset(0 0 0 0); }
.js .cs-reveal.is-in img { transform: none; }

.cs-full {
  padding: 0 var(--pad) var(--gap);
}

.cs-full .cs-media { aspect-ratio: 16 / 10; }

.cs-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--pad) var(--gap);
}

.cs-pair .cs-media { aspect-ratio: 16 / 10; }

/* Split: one image, one short titled paragraph. */
.cs-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
  padding: 0 var(--pad) var(--gap);
}

.cs-split .cs-media { aspect-ratio: 4 / 5; }

.cs-split-copy {
  padding: clamp(10px, 3vw, 54px) clamp(0px, 4vw, 70px) 40px clamp(10px, 3vw, 54px);
}

.cs-split-copy h3 {
  margin: 0 0 22px;
  font: 700 clamp(28px, 2.7vw, 44px)/1 var(--sans);
  letter-spacing: -.035em;
}

.cs-split-copy p {
  max-width: 30em;
  margin: 0 0 1em;
  font: 400 clamp(16px, 1.15vw, 18px)/1.62 var(--gr);
  color: #38352f;
}

.cs-split.is-reverse .cs-media { order: 2; }

/* The lamp, larger: off and on crossfading in a slow loop. */
.cs-lamp { position: relative; background: #111; }
.cs-lamp img { position: absolute; inset: 0; object-position: 60% 45%; }
.cs-lamp img.is-on { animation: cs-lamp 7s ease-in-out infinite; }

/* Phones on a quiet ground, each scrolling its own page. */
.cs-phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 3.5vw, 60px);
  aspect-ratio: 16 / 9;
  padding: 4% 4%;
}

.cs-phone {
  flex: 0 0 auto;
  height: 86%;
  aspect-ratio: 393 / 852;
  padding: .9%;
  border-radius: 13% / 6%;
  background: #0c0c0c;
  box-shadow: inset 0 0 0 1.5px #3a3a3a, 0 30px 70px rgba(12, 12, 12, .22);
}

.cs-phone > div {
  position: relative;
  height: 100%;
  border-radius: 11% / 5%;
  overflow: hidden;
  background: #fff;
}

.cs-phone > div::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 2.2%;
  left: 50%;
  width: 30%;
  height: 3.5%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0c0c0c;
}

.cs-phone img {
  height: auto;
  animation: cs-scroll var(--dur, 30s) cubic-bezier(.65, 0, .35, 1) infinite alternate;
  animation-play-state: paused;
}

.cs-phones.is-in .cs-phone img { animation-play-state: running; }
.cs-phone:nth-child(2) img { animation-delay: -6s; }
.cs-phone:nth-child(3) img { animation-delay: -12s; }

@keyframes cs-scroll {
  0%, 8% { transform: translateY(0); }
  92%, 100% { transform: translateY(var(--end, -70%)); }
}

/* Her own sentence, set large on Corvo blue. */
.cs-statement {
  margin: 0 var(--pad) var(--gap);
  padding: clamp(50px, 8vw, 130px) clamp(26px, 6vw, 100px);
  background: var(--blue);
  color: var(--white);
}

.cs-statement blockquote {
  max-width: 15em;
  margin: 0;
  font: 700 clamp(34px, 5.4vw, 92px)/1.02 var(--gr);
  letter-spacing: -.04em;
}

.cs-statement figcaption {
  margin-top: clamp(26px, 3.4vw, 50px);
  font: 700 11px/1.6 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, .72);
}

/* Next project + back to all work. */
.cs-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  padding: clamp(80px, 10vw, 150px) var(--pad) clamp(90px, 11vw, 160px);
  border-top: 1px solid var(--line);
  margin-top: clamp(60px, 8vw, 120px);
}

.cs-next h2 {
  margin: 14px 0 26px;
  font: 700 clamp(36px, 4.6vw, 76px)/.95 var(--sans);
  letter-spacing: -.045em;
}

.cs-next .wk-label { color: var(--muted); }

.cs-next-links { display: flex; gap: 10px; flex-wrap: wrap; }

.wk-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font: 700 11px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: background .25s, color .25s, box-shadow .25s;
}

.wk-btn-ink { background: var(--ink); color: var(--white); }
.wk-btn-ink:hover { background: var(--blue); }
.wk-btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.wk-btn-line:hover { background: var(--ink); color: var(--white); }

.cs-next .wk-card { max-width: 420px; justify-self: end; width: 100%; }

/* ---------- Smaller screens ---------- */

@media (width <= 1000px) {
  .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-info { grid-template-columns: 1fr; }
}

@media (width <= 700px) {
  .wk-grid { grid-template-columns: 1fr; }
  .cs-hero-copy { flex-direction: column; align-items: start; }
  .cs-pair,
  .cs-split,
  .cs-next { grid-template-columns: 1fr; }
  .cs-split.is-reverse .cs-media { order: 0; }
  .cs-split-copy { padding: 18px 0 44px; }
  .cs-full .cs-media,
  .cs-pair .cs-media { aspect-ratio: 4 / 3; }
  .cs-phones { aspect-ratio: 4 / 5; }
  .cs-phone:nth-child(3) { display: none; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-next .wk-card { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-hero h1, .cs-hero .wk-label { animation: none; opacity: 1; transform: none; }
  .cs-hero img.is-on, .cs-lamp img.is-on { animation: none; opacity: 1; }
  .js .cs-reveal { clip-path: none; }
  .js .cs-reveal img { transform: none; }
  .cs-phone img { animation: none; }
}

/* Phones inside a split: they fill the 4:5 frame instead of 16:9. */
.cs-split .cs-phones { aspect-ratio: auto; height: 100%; padding: 8% 6%; }
.cs-split .cs-phone { height: 88%; }

/* Screenshots keep their own 16:10 shape inside a split, centred
   against the paragraph. */
.cs-split .cs-media.is-wide { aspect-ratio: 16 / 10; align-self: center; }
.cs-media.is-wide img { object-position: top center; }

/* Services: a numbered list, the numbers in Corvo blue. */
.cs-list { margin: 0; padding: 0; list-style: none; counter-reset: cs; }
.cs-list li { counter-increment: cs; display: flex; align-items: baseline; gap: 12px; }
.cs-list li::before {
  content: counter(cs, decimal-leading-zero);
  min-width: 1.6em;
  font: 700 10.5px/1 var(--sans);
  letter-spacing: .08em;
  color: var(--blue);
}

/* Handover guide: its own dark band, so the guide every client gets
   reads as part of what we deliver, not a footnote. */
.cs-guide {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 110px);
  align-items: center;
  margin: clamp(40px, 5vw, 80px) 0 0;
  padding: clamp(70px, 9vw, 150px) var(--pad);
  background: var(--ink);
  color: var(--white);
}

.cs-guide .wk-label { color: rgba(255, 253, 248, .55); margin-bottom: 20px; }

.cs-guide h3 {
  margin: 0 0 26px;
  font: 700 clamp(34px, 3.8vw, 64px)/1 var(--sans);
  letter-spacing: -.04em;
}

.cs-guide p {
  max-width: 30em;
  margin: 0 0 1em;
  font: 400 clamp(16px, 1.15vw, 18px)/1.62 var(--gr);
  color: rgba(255, 253, 248, .72);
}

.cs-guide .cs-guide-lead {
  font: 700 clamp(20px, 1.7vw, 27px)/1.35 var(--gr);
  letter-spacing: -.01em;
  color: var(--white);
}

.cs-guide-list {
  margin-top: clamp(26px, 3vw, 40px);
  border-top: 1px solid rgba(255, 253, 248, .14);
}

.cs-guide-list li {
  padding: 13px 0 12px;
  border-bottom: 1px solid rgba(255, 253, 248, .14);
  font: 700 15px/1.3 var(--gr);
}

.cs-guide-shots { display: grid; gap: var(--gap); }

.cs-guide .cs-media {
  background: #14120f;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .1), 0 30px 80px rgba(0, 0, 0, .45);
}

.cs-guide .cs-media img { height: auto; }

@media (width <= 900px) {
  .cs-guide { grid-template-columns: 1fr; }
}

/* Screenshots on phones: the desktop shot kept whole, in its own 16:10
   shape, inside a slim browser window so it reads as a screen. */
@media (width <= 700px) {
  .cs-media.is-shot {
    aspect-ratio: auto;
    padding-top: 22px;
    border-radius: 10px;
    background: #e4dfd6;
    box-shadow: 0 0 0 1px rgba(12, 12, 12, .06), 0 18px 40px rgba(12, 12, 12, .14);
    position: relative;
  }
  .cs-media.is-shot::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9b2a6;
    box-shadow: 10px 0 0 #b9b2a6, 20px 0 0 #b9b2a6;
  }
  .cs-media.is-shot img {
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top center;
  }
  .cs-split .cs-media.is-wide.is-shot { aspect-ratio: auto; }
  .cs-pair { row-gap: 18px; }
}
