/* Case study pages — same system as the home page:
   Inter, ink/paper, one blue accent, door letters that open. */

body.case { background: var(--paper); color: var(--ink); }

.c-wrap { max-width: 1120px; margin: 0 auto; padding: 0 6vw; box-sizing: content-box; }
.c-wrap-wide { max-width: 1320px; margin: 0 auto; padding: 0 4vw; box-sizing: content-box; }

/* nav */
.case-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 5%;
  color: var(--paper); mix-blend-mode: difference;
}
.case-brand { font-size: 24px; line-height: 1; }
.case-back { font-size: 14px; font-weight: 500; }
.case-back:hover { text-decoration: underline; text-underline-offset: 4px; }

/* hero */
.c-hero { background: var(--ink); color: var(--paper); padding: 150px 0 0; overflow: hidden; }
.c-eyebrow { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #a3a5a3; }
.c-title {
  margin: 18px 0 0; font-size: clamp(52px, 9vw, 132px); font-weight: 800;
  letter-spacing: -0.035em; line-height: .95;
}
.c-title-sub { display: block; color: #8a8c8a; font-size: .42em; letter-spacing: -0.02em; margin-top: .35em; }
.c-door { color: var(--paper); }                      /* light door on dark — opens on scroll */
.c-door .leaf::before { background: rgba(15,17,16,.4); }
.c-lead { max-width: 680px; margin: 28px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: #c9cac6; }
.c-meta {
  margin: 48px 0 0; display: grid; gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #2a2c2b; padding-top: 24px;
}
.c-meta dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8a8c8a; margin-bottom: 6px; }
.c-meta dd { margin: 0; font-size: 15px; line-height: 1.45; }
.c-cover { margin-top: 64px; padding-bottom: 0; }
.c-cover img { display: block; width: 100%; height: auto; border-radius: 16px 16px 0 0; }

/* sections */
.c-sec { padding: 112px 0; }
.c-sec + .c-sec { padding-top: 40px; }
.c-dark { background: var(--ink); color: var(--paper); padding: 112px 0 !important; }
.c-dark .label { color: #a3a5a3; }
.c-tint { background: #e9e9e5; padding: 112px 0 !important; }
.c-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.c-head h2, .c-h2-light {
  margin: 0; font-size: clamp(32px, 4vw, 56px); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.05;
}
.c-h2-light { margin: 14px 0 48px; }
.c-sub { margin: 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.c-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6vw; align-items: start; }
.c-split .c-head { margin-bottom: 0; }
.c-body p { margin: 0 0 18px; font-size: 19px; line-height: 1.65; color: #2c2e2d; }
.c-body b { color: var(--ink); }

/* at a glance */
.c-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.c-glance article {
  background: #ffffff; border: 1px solid var(--line); border-radius: 16px; padding: 28px;
}
.c-k { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.c-glance p { margin: 0; font-size: 16px; line-height: 1.6; }

/* figures */
.c-fig { margin: 56px auto 0; }
.c-fig img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  background: #ddddd8;
}
.c-dark .c-fig img { background: #1c1e1d; }
.c-fig figcaption { margin-top: 12px; font-size: 13px; color: var(--muted-2); }
.c-dark .c-fig figcaption { color: #8a8c8a; }

/* problem statement */
.c-statement {
  margin: 20px 0 0; max-width: 980px;
  font-size: clamp(32px, 4.6vw, 64px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
}
.c-statement em { font-style: normal; color: var(--paper); background: linear-gradient(transparent 62%, var(--accent) 62% 90%, transparent 90%); }

/* goals */
.c-goals {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.c-goals li {
  display: flex; gap: 14px; align-items: flex-start;
  background: #ffffff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; font-size: 17px; font-weight: 500; line-height: 1.4;
}
.c-goals li::before {                       /* a small door as the bullet */
  content: ""; flex: 0 0 auto; width: 14px; height: 17px; margin-top: 3px;
  border-radius: 7px 7px 0 0; background: var(--accent);
}
.c-note { margin: 28px 0 0; font-size: 16px; color: var(--muted); max-width: 640px; line-height: 1.6; }

/* trade-offs */
.c-trade { border-top: 1px solid var(--ink); }
.c-trade-row {
  display: grid; grid-template-columns: minmax(0, 5fr) 60px minmax(0, 6fr); align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 2vw, 26px); letter-spacing: -0.01em;
}
.c-trade-row b { font-weight: 700; }
.c-trade-row span[role="cell"] { color: var(--muted-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.c-over { color: var(--accent); font-weight: 600; }
.c-trade-headrow { font-size: 12px !important; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 14px 0 !important; }
.c-trade-headrow span { text-decoration: none !important; }

/* how it works */
.c-step { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 24px; margin-top: 72px; }
.c-step:first-of-type { margin-top: 0; }
.c-num { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.c-step h3 { margin: 4px 0 10px; font-size: 26px; letter-spacing: -0.015em; }
.c-step p { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.6; color: #2c2e2d; }
.c-legend { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.c-legend li { display: flex; align-items: center; gap: 8px; background: #ffffff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.sw-edit { background: #3b5bfd; }
.sw-protect { background: #e5484d; }
.sw-bg { background: #a3a5a3; }

/* roadmap */
.c-phases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.c-phase { background: #ffffff; border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.c-phase h3 { margin: 18px 0 14px; font-size: 24px; letter-spacing: -0.015em; }
.c-phase ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.5; color: #2c2e2d; }
.c-chip { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 6px 12px; background: #ececea; color: var(--muted); }
.c-chip-done { background: #e3f3e8; color: #1f7a3f; }

/* impact */
.c-impact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.c-impact article { border-top: 3px solid var(--ink); padding-top: 18px; }
.c-impact h3 { margin: 0 0 8px; font-size: 20px; }
.c-impact p { margin: 0; font-size: 16px; line-height: 1.55; color: #2c2e2d; }

/* learnings */
.c-learn {
  list-style: none; counter-reset: l; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px;
}
.c-learn li {
  counter-increment: l; display: grid; grid-template-columns: 52px 1fr; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid #cfcfca; font-size: 19px; font-weight: 500; line-height: 1.4;
}
.c-learn li::before { content: counter(l, decimal-leading-zero); font-size: 14px; font-weight: 600; color: var(--accent); }

/* end */
.c-end { background: var(--paper); border-top: 1px solid var(--line); padding: 112px 0 48px; }
.c-end-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 64px; }
.c-end-row .contact-big { display: block; margin-top: 12px; }
.c-end-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.c-link { font-size: 15px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* responsive */
@media (max-width: 900px) {
  .c-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-split { grid-template-columns: 1fr; gap: 24px; }
  .c-glance, .c-goals { grid-template-columns: 1fr; }
  .c-impact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-phases, .c-learn { grid-template-columns: 1fr; }
  .c-step { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 600px) {
  .c-sec, .c-dark, .c-tint { padding: 72px 0 !important; }
  .c-impact { grid-template-columns: 1fr; }
  .c-trade-row { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
  .case-brand { font-size: 20px; }
}
