/* ==========================================================================
   KLIB — Short-form content & distribution
   v2 design system: clean, premium, comfortable. Moderate type scale.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  --ink:        #0A0A0B;   /* page background */
  --surface:    #131315;   /* cards */
  --surface-2:  #17171A;   /* nested / inset panels */
  --surface-hi: #1C1C20;   /* hovered / raised cards */
  --paper:      #F5F5F3;   /* primary text */
  --muted:      #9C9C9E;   /* secondary text */
  --muted-dim:  #6F6F72;   /* tertiary / labels */
  --red:        #E63946;
  --red-hi:     #EF4F5B;
  --red-dim:    rgba(230, 57, 70, 0.12);

  --line:       rgba(255, 255, 255, 0.08);
  --line-hi:    rgba(255, 255, 255, 0.16);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Moderate, comfortable type scale */
  --t-h1:   clamp(2.1rem, 1.35rem + 2.4vw, 3.4rem);
  --t-h2:   clamp(1.65rem, 1.25rem + 1.3vw, 2.3rem);
  --t-h3:   clamp(1.125rem, 1.02rem + 0.35vw, 1.3rem);
  --t-lead: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --t-body: 1rem;
  --t-sm:   0.9375rem;
  --t-xs:   0.8125rem;
  --t-xxs:  0.75rem;

  --r:      16px;
  --r-sm:   10px;
  --r-pill: 999px;

  --gut:  clamp(1.25rem, 4vw, 2.5rem);
  --band: clamp(4rem, 6.5vw, 7rem);
  --maxw: 1200px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 72px;
}

/* ---------- 2. Reset ----------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, figure, ul, ol, dl, dd, dt { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: 10px; left: 10px; z-index: 300;
  padding: 10px 18px; border-radius: var(--r-sm);
  background: var(--red); color: #fff; font-size: var(--t-sm); font-weight: 500;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 3. Layout ---------------------------------------------------- */

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.band { padding-block: var(--band); }
.band--tight { padding-block: calc(var(--band) * 0.7); }

/* Section header */
.head { max-width: 40rem; }
.head--center { margin-inline: auto; text-align: center; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.02);
  font-size: var(--t-xs); font-weight: 500; color: var(--muted);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

h1, .h1 {
  font-size: var(--t-h1);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2, .h2 {
  font-size: var(--t-h2);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h3, .h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.head .tag + h2 { margin-top: 1.125rem; }
.lead {
  margin-top: 1rem;
  font-size: var(--t-lead);
  color: var(--muted);
  line-height: 1.6;
  max-width: 34rem;
}
.head--center .lead { margin-inline: auto; }

/* ---------- 4. Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.8rem 1.4rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: var(--t-sm); font-weight: 500; white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hi); }

.btn--ghost { border-color: var(--line-hi); color: var(--paper); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-hi); }

.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; }

.btn--lg { padding: 0.95rem 1.75rem; font-size: var(--t-body); }
.btn--block { width: 100%; }

.btn .arw { transition: transform 0.25s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.head--center .actions { justify-content: center; }

/* ---------- 5. Navigation ------------------------------------------------ */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
}
.nav.is-stuck {
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 28px; height: 28px; border-radius: 7px; }
.brand__word { font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.08em; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: var(--t-sm); color: var(--muted);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav__links a:hover { color: var(--paper); background: rgba(255, 255, 255, 0.05); }

.burger {
  display: none; position: relative;
  width: 42px; height: 42px; margin-right: -9px;
  border-radius: var(--r-sm);
}
.burger span {
  position: absolute; left: 11px; top: 50%;
  width: 20px; height: 1.5px; border-radius: 2px; background: var(--paper);
  transition: transform 0.3s var(--ease);
}
.burger span:first-child { transform: translateY(-4px); }
.burger span:last-child  { transform: translateY(4px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 110;
  background: var(--ink);
  padding: 1.5rem var(--gut) 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__item {
  display: block; padding: 1rem 0;
  font-size: 1.25rem; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.drawer__foot { display: grid; gap: 1rem; }
.drawer__social { display: flex; gap: 20px; font-size: var(--t-sm); color: var(--muted); }

/* ---------- 6. Hero ------------------------------------------------------ */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  text-align: center;
  overflow: hidden;
}
/* one soft, static red glow — no gradient wash across the page */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -22%; left: 50%; transform: translateX(-50%);
  width: min(900px, 120%); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.13) 0%, rgba(230, 57, 70, 0) 62%);
  pointer-events: none;
}
.hero h1 { margin-top: 1.5rem; }
.hero .lead { margin-inline: auto; max-width: 36rem; }
.hero .actions { margin-top: 2rem; justify-content: center; }

.head h2 span[data-count] { color: var(--red); }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(3rem, 5vw, 4.5rem);
}
.stat {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
}
.stat b { display: block; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; letter-spacing: -0.02em; }
.stat b span { display: inline; }
.stat > span { display: block; margin-top: 6px; font-size: var(--t-sm); color: var(--muted); }

/* ---------- 7. Cards & grids --------------------------------------------- */

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--top { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

.card {
  padding: 1.6rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { background: var(--surface-hi); border-color: var(--line-hi); }
.card p { margin-top: 8px; color: var(--muted); font-size: var(--t-sm); }

.card__icon {
  width: 36px; height: 36px; margin-bottom: 1.1rem;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--red-dim); color: var(--red);
}
.card__icon svg { width: 18px; height: 18px; }

.num {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.06em;
  color: var(--red);
}

/* ---------- 8. Compare (KLIB vs alternative) ----------------------------- */

.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.compare > div {
  padding: 1.75rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
}
.compare > div.is-klib { border-color: rgba(230, 57, 70, 0.35); background: linear-gradient(180deg, rgba(230,57,70,0.06), rgba(230,57,70,0) 45%), var(--surface); }
.compare h3 { display: flex; align-items: center; gap: 10px; }
.compare ul { margin-top: 1.25rem; display: grid; gap: 12px; }
.compare li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); color: var(--muted); }
.compare li svg { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.is-klib li { color: var(--paper); }
.is-klib li svg { color: var(--red); }
.is-other li svg { color: var(--muted-dim); }

/* ---------- 9. Work ------------------------------------------------------ */

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: clamp(2.5rem, 4vw, 3.5rem); }

.case {
  position: relative; display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease-out);
}
.case:hover { border-color: var(--line-hi); transform: translateY(-3px); }

.case__media { position: relative; aspect-ratio: 16 / 9; background: #0E0E10; overflow: hidden; }
.case__media img, .case__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out), opacity 0.35s var(--ease);
}
.case__media video { position: absolute; inset: 0; opacity: 0; }
.case.is-previewing .case__media video { opacity: 1; }
.case:hover .case__media img { transform: scale(1.03); }

.case__play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.3s var(--ease);
  background: rgba(10, 10, 11, 0.32);
}
.case:hover .case__play, .case:focus-visible .case__play { opacity: 1; }
.case__play i {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(245, 245, 243, 0.95);
  display: grid; place-items: center;
}
.case__play svg { width: 15px; height: 15px; color: var(--ink); margin-left: 2px; }

.case__label {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(6px);
  font-size: var(--t-xxs); font-weight: 500; color: var(--paper);
}
.case__body { padding: 1.4rem 1.5rem 1.6rem; }
.case__body h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.case__body h3 .arw { color: var(--muted-dim); transition: color 0.25s var(--ease), transform 0.25s var(--ease); }
.case:hover h3 .arw { color: var(--red); transform: translateX(3px); }
.case__body p { margin-top: 6px; color: var(--muted); font-size: var(--t-sm); }
.case__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.case__tags li {
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: var(--t-xxs); color: var(--muted-dim);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: var(--gut);
  background: rgba(6, 6, 7, 0.9);
  backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__frame { width: min(100%, 960px); }
.lightbox video {
  width: 100%; max-height: 74svh; object-fit: contain;
  background: #000; border-radius: var(--r); border: 1px solid var(--line);
}
.lightbox__bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px; padding-top: 14px;
  font-size: var(--t-sm); color: var(--muted);
}
.lightbox__bar strong { color: var(--paper); font-weight: 500; }
.lightbox__close {
  position: absolute; top: var(--gut); right: var(--gut);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-hi); color: var(--paper);
  transition: background-color 0.25s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- 10. Proof ---------------------------------------------------- */

.proof {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem); align-items: center;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}
.proof__media {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; background: var(--surface);
  aspect-ratio: 16 / 10;
}
.proof__media video, .proof__media img { width: 100%; height: 100%; object-fit: cover; }
.proof__list { display: grid; gap: 12px; margin-top: 1.75rem; }
.proof__list li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-sm); color: var(--muted); }
.proof__list svg { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--red); }
.note { margin-top: 1.5rem; font-size: var(--t-xs); color: var(--muted-dim); }

/* ---------- 11. Services ------------------------------------------------- */

.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.tier {
  display: flex; flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.tier:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.tier.is-featured { border-color: rgba(230, 57, 70, 0.4); }
.tier__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill {
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--red-dim); color: var(--red);
  font-size: var(--t-xxs); font-weight: 500;
}
.tier h3 { margin-top: 1.1rem; }
.tier > p { margin-top: 8px; color: var(--muted); font-size: var(--t-sm); }
.tier ul { margin-top: 1.5rem; display: grid; gap: 10px; }
.tier li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); color: var(--muted); }
.tier li svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--red); }
.tier ul { margin-bottom: 1.75rem; }
.tier .btn { margin-top: auto; }

.tier--wide {
  grid-column: 1 / -1;
  flex-direction: row; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1.25rem 2rem;
}
.tier--wide > div { flex: 1 1 24rem; }
.tier--wide .btn { margin-top: 0; flex: none; }
.tier--wide h3 { margin-top: 0.75rem; }
.tier--wide p { margin-top: 0.5rem; color: var(--muted); font-size: var(--t-sm); max-width: 44rem; }

/* ---------- 12. Process -------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.step {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.step:hover { background: var(--surface-hi); border-color: var(--line-hi); }
.step h3 { margin-top: 0.9rem; font-size: var(--t-body); }
.step p { margin-top: 6px; font-size: var(--t-sm); color: var(--muted); }

/* ---------- 13. FAQ ------------------------------------------------------ */

.faq { max-width: 46rem; margin-top: clamp(2.5rem, 4vw, 3.5rem); margin-inline: auto; display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.25s var(--ease);
}
.faq details[open] { border-color: var(--line-hi); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 1.15rem 1.4rem;
  font-size: var(--t-body); font-weight: 500;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex: none; width: 18px; height: 18px; color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.25s var(--ease);
}
.faq details[open] summary .chev { transform: rotate(180deg); color: var(--red); }
.faq .answer { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: var(--t-sm); max-width: 40rem; }

/* ---------- 14. Final CTA ------------------------------------------------ */

.cta {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.08), rgba(230, 57, 70, 0) 55%), var(--surface);
  text-align: center;
}
.cta .lead { margin-inline: auto; }
.cta .actions { margin-top: 2rem; justify-content: center; }
.cta__meta { margin-top: 1.75rem; font-size: var(--t-xs); color: var(--muted-dim); }

/* ---------- 15. Footer --------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 2.25rem; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot__links a { font-size: var(--t-sm); color: var(--muted); transition: color 0.25s var(--ease); }
.foot__links a:hover { color: var(--paper); }
.foot small { font-size: var(--t-xs); color: var(--muted-dim); }

/* ---------- 16. Motion (restrained) -------------------------------------- */

[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.07s; }
[data-reveal][data-delay="2"] { transition-delay: 0.14s; }
[data-reveal][data-delay="3"] { transition-delay: 0.21s; }

/* ---------- 17. Responsive ----------------------------------------------- */

@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiers { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; }
  .proof__media { order: -1; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta .btn { padding: 0.7rem 1.1rem; }
  .burger { display: block; }
  .compare { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --nav-h: 64px; }
  .nav__cta { display: none; }   /* the CTA lives in the drawer at this width */
  .head h2 span[data-count] { color: var(--red); }

.hero__stats { grid-template-columns: 1fr; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero .actions .btn, .cta .actions .btn { flex: 1 1 100%; }
  .foot__inner { justify-content: flex-start; }
}

/* Touch devices: no hover previews, no lift */
@media (hover: none) {
  .case:hover { transform: none; }
  .case.is-previewing .case__media video { opacity: 0; }
  .case__play { opacity: 1; background: transparent; }
  .case__play i { width: 40px; height: 40px; }
}

/* ---------- 18. Reduced motion ------------------------------------------- */

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

/* ---------- 19. Work page: case-study rows ------------------------------ */

.hero--page { padding-bottom: clamp(2rem, 4vw, 3rem); }

.cs {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.cs:first-of-type { border-top: 0; padding-top: 0; }
.cs--flip .cs__media { order: 2; }

.cs__media { display: flex; justify-content: center; }
.cs__frame {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #0E0E10; overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease-out);
}
.cs__media--vertical .cs__frame { aspect-ratio: 9 / 16; max-width: 300px; }
.cs__frame:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.cs__frame img, .cs__frame video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out), opacity 0.35s var(--ease);
}
.cs__frame video { position: absolute; inset: 0; opacity: 0; }
.cs__frame.is-previewing video { opacity: 1; }
.cs__frame:hover img { transform: scale(1.03); }

.cs__play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: rgba(10, 10, 11, 0.3);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.cs__frame:hover .cs__play, .cs__frame:focus-visible .cs__play { opacity: 1; }
.cs__play i {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(245, 245, 243, 0.95);
  display: grid; place-items: center;
}
.cs__play svg { width: 17px; height: 17px; color: var(--ink); margin-left: 2px; }

.cs__idx { font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.04em; color: var(--red); }
.cs__body h2 { margin-top: 0.75rem; }
.cs__body > p { margin-top: 1rem; color: var(--muted); max-width: 40rem; }
.cs__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.cs__tags li {
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: var(--t-xs); color: var(--muted);
}
.cs__note { margin-top: 1.25rem; font-size: var(--t-xs); color: var(--muted-dim); }

/* Homepage work teaser */
.teaser { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.teaser a {
  position: relative; display: block;
  aspect-ratio: 4 / 5; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #0E0E10;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease-out);
}
.teaser a:hover { border-color: var(--line-hi); transform: translateY(-3px); }
.teaser img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
/* landscape frames need a crop point that keeps the subject, not the caption */
.teaser img[data-crop="right"] { object-position: 88% center; }
.teaser a:hover img { transform: scale(1.04); }
.teaser span {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(180deg, rgba(10,10,11,0), rgba(10,10,11,0.88));
  font-size: var(--t-sm); font-weight: 500;
}

/* Trial badge */
.note--trial {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
  margin-top: 1rem; padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--red-dim);
  font-size: var(--t-xs); font-weight: 500; color: var(--red);
}

@media (max-width: 1000px) {
  .teaser { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cs { grid-template-columns: 1fr; gap: 1.75rem; }
  .cs--flip .cs__media { order: 0; }
  .cs__media--vertical .cs__frame { max-width: 260px; }
}
@media (hover: none) {
  .cs__frame:hover { transform: none; }
  .cs__play { opacity: 1; background: transparent; }
}
