/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }

:root {
  --grey: #6f6e79;
  --ink: #262626;
  --divider: #e0e0e0;
  --onest: "Onest", system-ui, sans-serif;
  --inter: "Inter", system-ui, sans-serif;
  --container: 720px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 16px;
  background: #fff;
}
.site-header__inner {
  height: 46px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #000;
  padding-top: 2px;
}
.site-header__name {
  font-family: var(--onest);
  font-size: 16px;
  color: var(--ink);
}

/* ---------- Avatar ---------- */
.avatar {
  margin-top: 62px;
  width: 130px;
  height: 142px;
  object-fit: cover;
}

/* ---------- Intro ---------- */
.intro {
  padding-top: 35px;
  padding-bottom: 100px;
}
.intro__meta {
  display: flex;
  gap: 32px;
  font-family: var(--onest);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1.2px;
}
.intro__headline {
  margin-top: 24px;
  max-width: 820px;
  font-family: var(--onest);
  font-weight: 600;
  font-size: 37px;
  line-height: 1.1;
  letter-spacing: -1.11px;
}

/* ---------- Working with me ---------- */
.label {
  font-family: var(--onest);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1.2px;
}
.stats {
  display: flex;
  padding-bottom: 200px;
}
.stats > .label { flex: 1 1 0; max-width: 325px; }
.stats__list { flex: 1 1 0; display: flex; flex-direction: column; gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat__title {
  font-family: var(--onest);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.6px;
}
.stat__body {
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: -0.42px;
}
.stats__divider { border: 0; border-top: 1px solid var(--divider); margin: 0; }

/* ---------- My work ---------- */
.work { padding-bottom: 120px; }
.work > .label { padding-bottom: 42px; } /* 32 + 10 gap */

.card { display: block; padding-bottom: 80px; }
.card__media {
  position: relative;
  height: 320px;
  overflow: hidden;
}
.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__media--rounded { border-radius: 16px; background: #000; }

.card__desc {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.card__titles {
  max-width: 569px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--onest);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.48px;
}
.card__metric { color: var(--grey); }
.card__link {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.48px;
  color: var(--grey);
  white-space: nowrap;
  transition: color .15s ease;
}
.card:hover .card__link,
.card:focus-visible .card__link { color: #000; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px 24px;
  font-size: 16px;
  line-height: 1.21;
  letter-spacing: -0.8px;
}
.site-footer__cols {
  display: flex;
  justify-content: space-between;
  width: 616px;
  max-width: 100%;
}
.site-footer__col { display: flex; flex-direction: column; gap: 30px; }
.site-footer__col:first-child { width: 212px; }
.site-footer__col:last-child { width: 311px; }
.site-footer__links { display: flex; flex-direction: column; gap: 10px; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer a.underline { text-decoration: underline; }

/* ---------- Tablet (800 design) ---------- */
@media (max-width: 1023px) {
  :root { --container: 560px; }
  .intro__meta { flex-direction: column; gap: 16px; }
  .intro__headline { font-size: 30px; letter-spacing: -0.9px; }
  .stats { flex-direction: column; gap: 60px; }
  .stats > .label { max-width: none; }
  .stat__title { font-size: 28px; letter-spacing: -0.56px; }
}

/* ---------- Mobile (375 design) ---------- */
@media (max-width: 599px) {
  .avatar { display: none; }
  .intro { padding-top: 44px; padding-bottom: 88px; }
  .intro__meta {
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -0.45px;
  }
  .intro__headline { font-size: 24px; letter-spacing: -0.72px; }
  .stats { gap: 40px; padding-bottom: 175px; }
  .stat__title { font-size: 24px; letter-spacing: -0.48px; }
  .work { padding-bottom: 32px; }
  .work > .label { padding-bottom: 32px; }
  .card { padding-bottom: 64px; }
  .card__media { height: 310px; }
  .card__desc { flex-direction: column; gap: 32px; }
  .card__titles, .card__link { font-size: 15px; letter-spacing: -0.45px; }
  .site-footer { padding: 30px 16px; }
  .site-footer__cols { flex-direction: column; gap: 62px; }
}

/* =========================================================
   Case study pages
   ========================================================= */
:root { --accent: #5031ff; --panel: #ededed; --dark: #37363a; }

.cs-text {
  font-family: var(--inter);
  font-size: 16px;
  line-height: 1.21;
  letter-spacing: -0.8px;
  color: var(--grey);
}
.cs-prose > p + p { margin-top: 1.21em; }
.cs-text b, .cs-strong { color: #000; font-weight: 800; }
.cs-dark .cs-text, .cs-dark .cs-text b { color: #fff; }
.cs-label { color: #000; }
.cs-dark .cs-label { color: #fff; }

.cs-h1 {
  font-family: var(--onest);
  font-weight: 600;
  font-size: 37px;
  line-height: 1.1;
  letter-spacing: -1.11px;
}
.cs-h1 .accent { color: var(--accent); }
.cs-h2 {
  font-family: var(--onest);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.6px;
}

.cs-top { padding-top: 101px; padding-bottom: 60px; } /* 46 header + 15 + 20 + gap */
.cs-hero img { width: 100%; height: auto; }

.cs-meta { padding: 70px 0; }
.cs-meta__grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}
.cs-meta__item { display: flex; flex-direction: column; gap: 8px; }
.cs-meta__side { display: flex; flex-direction: column; gap: 20px; }

.cs-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0 100px;
}
.cs-section img { width: 100%; height: auto; }
.cs-section > a, .cs-col > a, .cs-pair > a { display: block; }
a.zoom { cursor: zoom-in; }

.cs-quote {
  font-family: var(--onest);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  padding-bottom: 80px;
  border-bottom: 1px solid #000;
}
.cs-section--quote { padding-bottom: 80px; }

.cs-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cs-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cs-col { display: flex; flex-direction: column; gap: 24px; }
.cs-item { display: flex; flex-direction: column; gap: 8px; }

.cs-box { background: var(--panel); padding: 8px; }
.cs-box .cs-small { font-size: 14px; line-height: 1.1; letter-spacing: -0.42px; margin-bottom: 8px; }
.cs-rule { border: 0; border-top: 1px solid var(--divider); margin: 0; }

.cs-problems { display: flex; flex-direction: column; gap: 52px; }
.cs-problem { display: flex; flex-direction: column; gap: 24px; }
.cs-problem__title { color: #000; margin-bottom: 4px; }

.cs-highlight {
  background: var(--panel);
  padding: 24px;
  font-family: var(--onest);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: var(--accent);
}

/* Dark solution band */
.cs-dark {
  background: var(--dark);
  color: #fff;
  padding: 80px 0;
}
.cs-dark .container { display: flex; flex-direction: column; gap: 32px; }
.cs-dark img { width: 100%; height: auto; }
.cs-dark__rule { border: 0; border-top: 1px solid #fff; margin: 15px 0; }
.cs-dark__rule--lg { margin: 31px 0; }
.cs-block { display: flex; flex-direction: column; gap: 42px; }
.cs-block--tight { gap: 24px; }
.cs-step { display: flex; flex-direction: column; gap: 20px; }
.cs-step--tight { gap: 10px; }
.cs-num {
  font-family: var(--onest);
  font-weight: 600;
  font-size: 37px;
  line-height: 1.1;
  letter-spacing: -1.11px;
  display: flex;
  gap: 0.35em;
}
.cs-num span:first-child { flex-shrink: 0; min-width: 1.15em; }
.cs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; align-items: start; }

.pill {
  align-self: flex-start;
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.21;
  letter-spacing: -0.8px;
  color: #fff;
  background: #000;
  white-space: nowrap;
}
.pill--new { background: var(--accent); }

.result {
  background: linear-gradient(90deg, #6f6e79, #37363a);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--onest);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  color: #fff;
}
.result ul { margin: 0; padding-left: 45px; }
.result__sub {
  font-family: var(--inter);
  font-size: 16px;
  line-height: 1.21;
  letter-spacing: -0.8px;
  color: #e0e0e0;
  padding: 0 16px;
}

/* Results table */
.cs-section--results { padding-top: 80px; }
.phase { display: flex; flex-direction: column; gap: 12px; }
.phase__rows {
  background: var(--panel);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #000;
}
.phase__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Other projects */
.others { padding: 15px 0 80px; }
.others__rule { border: 0; border-top: 1px solid #000; margin: 0 0 29px; }
.others__title {
  font-family: var(--onest);
  font-weight: 600;
  font-size: 37px;
  line-height: 1.1;
  letter-spacing: -1.11px;
  margin-bottom: 40px;
}
.others__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.others__card { display: flex; flex-direction: column; gap: 10px; }
.others__media { position: relative; aspect-ratio: 407 / 389; overflow: hidden; }
.others__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.others__name {
  font-family: var(--onest);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.48px;
}
.others__card:hover .card__link { color: #000; }

@media (max-width: 1023px) {
  .cs-h1 { font-size: 30px; letter-spacing: -0.9px; }
  .cs-h2, .cs-quote, .cs-highlight, .result { font-size: 28px; letter-spacing: -0.56px; }
  .cs-num { font-size: 30px; letter-spacing: -0.9px; }
  .cs-meta__grid { gap: 30px; }
  .others__title { font-size: 30px; letter-spacing: -0.9px; }
}
@media (max-width: 599px) {
  .cs-top { padding-top: 90px; }
  .cs-h1, .cs-h2, .cs-quote, .cs-highlight, .cs-num, .others__title { font-size: 24px; letter-spacing: -0.72px; }
  .result { font-size: 22px; letter-spacing: -0.44px; }
  .cs-hero { display: none; }
  .cs-meta { padding: 60px 0 40px; }
  .cs-meta__grid, .cs-grid3, .cs-grid2, .cs-two, .others__grid { grid-template-columns: 1fr; }
  .cs-grid3 { gap: 52px; }
  .cs-two { gap: 64px; }
  .cs-dark { padding: 60px 0; }
  .result ul { padding-left: 28px; }
}
@media (max-width: 599px) { .cs-grid3.cs-grid3--boxes { gap: 12px; } }

/* ---------- Case study: editorial variant (TikTok Shop, product card) ---------- */
.ed-meta { padding: 141px 0 70px; }
.ed-meta__list { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.ed-meta__row { display: flex; gap: 8px; }
.ed-meta__row .cs-label { width: 120px; flex-shrink: 0; }

.ed {
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.36;
  color: var(--ink);
}
.ed b { font-weight: 700; }
.ed-eyebrow {
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #b26ef5;
}
.ed-group { display: flex; flex-direction: column; gap: 12px; }
.ed-statement { font-family: var(--onest); font-size: 28px; line-height: 1.25; color: #000; }
.ed-h2 { font-family: var(--onest); font-weight: 800; font-size: 24px; line-height: 1.25; color: #404040; }

.ed-intro { display: flex; flex-direction: column; gap: 52px; padding: 20px 0 80px; }
.ed-intro img { width: 100%; height: auto; }

.ed-gmv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-family: var(--onest); color: var(--ink); }
.ed-gmv p:first-child { font-size: 28px; line-height: 1.25; }
.ed-gmv strong { display: block; font-weight: 600; font-size: 42px; line-height: 1.25; }

.ed-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ed-icon { display: flex; flex-direction: column; gap: 22px; }
.ed-icon__emoji { font-size: 64px; line-height: 1.1; }
.ed-icon__row { display: flex; gap: 12px; align-items: flex-start; color: #000; }
.ed-icon__num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid #000; display: grid; place-items: center; font-size: 16px;
}
.ed-icon__row p { padding-top: 3px; }

@media (max-width: 599px) {
  .ed-meta { padding-top: 110px; }
  .ed-statement { font-size: 22px; }
  .ed-gmv { grid-template-columns: 1fr; gap: 12px; }
  .ed-gmv p:first-child { font-size: 24px; }
  .ed-gmv strong { font-size: 36px; }
  .ed-intro { gap: 40px; }
  .ed-icons { grid-template-columns: 1fr; gap: 28px; }
  .ed-icon { flex-direction: row; align-items: center; gap: 16px; }
  .ed-icon__emoji { font-size: 44px; }
}
.ed-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ed-ba figure { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ed-ba figcaption { font-size: 15px; color: var(--ink); }
.ed-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-family: var(--onest); color: #000; }
.ed-stats strong { display: block; font-weight: 600; font-size: 48px; line-height: 1.25; color: var(--ink); }
.ed-stats span { display: block; font-size: 28px; line-height: 1.25; }
.ed ol { margin: 0; padding-left: 24px; }
.ed-lead { font-size: 24px; line-height: 1.36; color: #000; }
.ed-center { display: flex; flex-direction: column; gap: 52px; align-items: center; }
.ed-center img { width: 100%; max-width: 560px; }
.ed-split { display: grid; grid-template-columns: 414px minmax(0, 1fr); gap: 24px; align-items: start; }
.ed-checks { display: flex; flex-direction: column; gap: 12px; }
.ed-video { width: 100%; height: auto; display: block; }
.ed-saved { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; font-family: var(--onest); color: #000; line-height: 1; }
.ed-saved span { font-size: 28px; }
.ed-saved strong { font-weight: 600; font-size: 48px; }
.cs-section--tight { gap: 12px; }
@media (max-width: 1023px) { .ed-split { grid-template-columns: 1fr; } .ed-split img { max-width: 414px; } }
@media (max-width: 599px) {
  .ed-stats { grid-template-columns: 1fr; gap: 16px; }
  .ed-stats strong, .ed-saved strong { font-size: 36px; }
  .ed-stats span, .ed-saved span { font-size: 22px; }
  .ed-lead { font-size: 20px; }
  .ed-center { gap: 32px; }
}

/* ---------- Scroll motion (see js/reveal.js) ---------- */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .6s ease-out, transform .6s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.reveal-on [data-reveal].is-visible { opacity: 1; transform: none; }
