/* =========================================================
   Juliano Toazza — Self-contained Portfolio Stylesheet
   Includes Root Design System Tokens + Portfolio Components
   Works on FTP, Subdomain, Subfolder or Root
   ========================================================= */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #17171c;
  --text-soft: #55555e;
  --border: #e6e4de;
  --accent: #2563eb;
  --accent-soft: #e8effd;
  --accent-contrast: #ffffff;
  --shadow: 0 1px 3px rgba(20,20,40,.06), 0 8px 30px rgba(20,20,40,.06);
  --radius: 16px;
}
[data-theme="dark"] {
  --bg: #0e0f13;
  --surface: #171922;
  --text: #f2f2f5;
  --text-soft: #a7a8b3;
  --border: #2a2d38;
  /* --accent: #6ea8fe; */
  --accent: #1783FF;
  --accent-soft: #1a2438;
  --accent-contrast: #0e0f13;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .3s ease, color .3s ease;
}
h1, h2, h3, .nav__logo { font-family: 'Space Grotesk', 'Inter', sans-serif; }
a { color: inherit; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5vw;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__logo { font-weight: 700; font-size: 1.05rem; text-decoration: none; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { text-decoration: none; font-size: .92rem; color: var(--text-soft); transition: color .2s; }
.nav__links a:hover { color: var(--accent); }
.nav__controls { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--text); cursor: pointer; transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--accent); }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  background: none; border: none; padding: 6px 10px; font-size: .78rem; font-weight: 600;
  color: var(--text-soft); cursor: pointer; transition: all .2s;
}
.lang-switch button.active { background: var(--accent); color: var(--accent-contrast); }
.nav__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 4px; padding: 6px; }
.nav__burger span { display: block; width: 20px; height: 2px; background: var(--text); }

/* ---------- HERO ---------- */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
  padding: 96px 5vw 72px; max-width: 1240px; margin: 0 auto;
}
.badge {
  display: inline-block; font-size: .72rem; letter-spacing: .12em; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px;
  color: var(--text-soft); margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 700;
  margin-bottom: 24px;
}
.hero__identity { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.hero__identity .badge { margin-bottom: 0; }
.hero__photo {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); box-shadow: var(--shadow); flex-shrink: 0;
}
.hero__sub { font-size: 1.08rem; color: var(--text-soft); max-width: 52ch; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; transition: all .2s;
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero__note { font-size: .85rem; color: var(--text-soft); max-width: 42ch; }

.hero__stats {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.hero__stats h2 {
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.stat { display: flex; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.stat:last-child { border-bottom: none; }
.stat strong { font-family: 'Space Grotesk'; font-size: 1.8rem; color: var(--accent); min-width: 92px; letter-spacing: -.02em; }
.stat span { font-size: .9rem; color: var(--text-soft); }

/* ---------- SECTIONS ---------- */
.section { padding: 80px 5vw; max-width: 1240px; margin: 0 auto; }
.section__title { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.02em; margin-bottom: 16px; }
.section__lead { color: var(--text-soft); max-width: 60ch; margin-bottom: 40px; }
.about p { max-width: 70ch; color: var(--text-soft); margin-bottom: 18px; font-size: 1.02rem; }
.about__quote { font-family: 'Space Grotesk'; font-size: 1.3rem !important; color: var(--accent) !important; font-weight: 600; margin-top: 28px; }

/* ---------- CASES ---------- */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.case-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; color: inherit; cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.case-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.case-card__number {
  position: absolute; top: 24px; right: 26px;
  font-family: 'Space Grotesk'; font-size: 2rem; font-weight: 700;
  color: var(--accent); opacity: .9; letter-spacing: -.02em; line-height: 1;
}
.case-card__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .72rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag--alt { background: transparent; border: 1px solid var(--border); color: var(--text-soft); }
.case-card h3 { font-size: 1.18rem; line-height: 1.35; letter-spacing: -.01em; }
.case-card p { font-size: .92rem; color: var(--text-soft); flex: 1; }
.case-card__link { font-weight: 600; font-size: .92rem; color: var(--accent); text-decoration: none; }
.case-card__link:hover { text-decoration: underline; }

/* ---------- CONSULTORIA ---------- */
.consult { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.consult-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.consult-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.consult-card--green:hover { border-color: #1e9e6a; }
.consult-card--yellow:hover { border-color: #d9a514; }
.consult-card--red:hover { border-color: #d94848; }
.consult-card__top { padding: 34px 26px; display: flex; align-items: center; }
.consult-card--green .consult-card__top { background: linear-gradient(135deg, #1e9e6a, #157a51); }
.consult-card--yellow .consult-card__top { background: linear-gradient(135deg, #d9a514, #b3820d); }
.consult-card--red .consult-card__top { background: linear-gradient(135deg, #d94848, #b23232); }
.consult-card__icon {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); display: grid; place-items: center;
}
.consult-card h3 { font-size: 1.15rem; letter-spacing: -.01em; padding: 22px 26px 0; }
.consult-card p { font-size: .9rem; color: var(--text-soft); padding: 10px 26px 0; flex: 1; }
.consult-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px 26px; margin-top: 8px;
}
.consult-card__pricing { display: flex; flex-direction: column; gap: 2px; }
.consult-card__from { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.consult-card__price { font-family: 'Space Grotesk'; font-size: 1.35rem; font-weight: 700; }
.btn--book {
  background: var(--text); color: var(--bg); padding: 10px 20px;
  border-radius: 999px; font-weight: 600; font-size: .88rem; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn--book:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- METHODS ---------- */
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.method { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--surface); transition: transform .25s, border-color .25s, box-shadow .25s; }
.method:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.method h3 { font-size: 1rem; margin-bottom: 8px; color: var(--accent); }
.method p { font-size: .88rem; color: var(--text-soft); }

/* ---------- TIMELINE ---------- */
.timeline { border-left: 2px solid var(--border); margin-left: 6px; }
.timeline__item { position: relative; padding: 0 0 36px 28px; }
.timeline__item::before {
  content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.timeline__period { font-size: .78rem; font-weight: 600; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.timeline__item h3 { font-size: 1.1rem; margin: 4px 0 2px; }
.timeline__org { font-size: .88rem; color: var(--text-soft); display: block; margin-bottom: 8px; }
.timeline__item p { font-size: .92rem; color: var(--text-soft); max-width: 68ch; }

.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.extras__col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.extras__col:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.extras__col h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.extras__col p, .extras__col li { font-size: .88rem; color: var(--text-soft); margin-bottom: 12px; }
.extras__col p span { white-space: pre-line; }
.extras__col ul { list-style: none; }
.extras__col li::before { content: "— "; color: var(--accent); }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; text-decoration: none; transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 4px;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.contact-card span { font-size: .78rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .08em; }
.contact-card strong { font-size: .98rem; color: var(--text); word-break: break-all; }
.contact__loc { margin-top: 28px; color: var(--text-soft); font-size: .9rem; }

/* ---------- FOOTER ---------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 28px 5vw; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-soft);
}

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Hover precisa vencer o .reveal.visible (mesma especificidade) */
.case-card.visible:hover,
.consult-card.visible:hover,
.method.visible:hover,
.extras__col.visible:hover,
.contact-card.visible:hover { transform: translateY(-3px); }

/* Remove qualquer sublinhado herdado dentro dos cards-link */
.case-card, .case-card:hover, .case-card *,
.consult-card, .consult-card:hover, .consult-card * { text-decoration: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 64px; }
  .cases { grid-template-columns: 1fr; }
  .consult { grid-template-columns: 1fr; }
  .methods { grid-template-columns: 1fr 1fr; }
  .extras { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 8px 5vw 16px;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav__burger { display: flex; }
  .methods { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .lang-switch button { padding: 6px 8px; }
}


/* =========================================================
   PORTFOLIO & CASE STUDY COMPONENTS
   ========================================================= */
/* =========================================================
   Juliano Toazza — Portfolio & Case Studies Styles (v2)
   Design System tokens & components aligning with julianotoazza.com
   ========================================================= */

:root {
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#root {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Container wrapper */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 5vw;
  width: 100%;
}

/* Kicker & Monospace elements */
.kicker {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 12px;
}

/* Header adjustments */
.nav__logo sup {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--accent);
  margin-left: 4px;
  font-weight: 500;
}

/* Hero Section */
.portfolio-hero {
  padding: 80px 0 48px;
}

.portfolio-hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 900px;
}

.portfolio-hero__lead {
  color: var(--text-soft);
  font-size: 1.15rem;
  line-height: 1.65;
  max-width: 68ch;
  margin-bottom: 32px;
}

.portfolio-hero__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-top: 24px;
}

.count-badge {
  font-family: var(--font-mono);
  font-size: .8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--text-soft);
}

/* Case List (Home view) */
.cases-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 80px;
}

.case-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.case-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(0,0,0,.15);
}

.case-item__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}

.case-item__num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: -.02em;
}

.case-item__tags {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.case-item__tags .tag {
  max-width: 100%;
}

.case-item h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -.02em;
  line-height: 1.25;
}

.case-item__tagline {
  color: var(--text-soft);
  font-size: .98rem;
  line-height: 1.55;
}

.case-item__meta {
  font-size: .88rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.case-item__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 8px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.case-item:hover .case-item__cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  transform: translateX(2px);
}

.case-item__cover {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg);
  border: 1px solid var(--border);
}

.case-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.case-item:hover .case-item__cover img {
  transform: scale(1.02);
}

/* Single Case View (Detail) */
.case-detail {
  padding: 5vw;
}

.case-detail__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: color .2s;
}

.back-btn:hover {
  color: var(--accent);
}

.case-detail__title {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  margin-bottom: 20px;
}

.case-detail__tagline {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 65ch;
  margin-bottom: 40px;
}

/* Metagrid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow);
}

.meta-box p.kicker {
  margin-bottom: 6px;
}

.meta-box strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  color: var(--text);
  display: block;
}

/* Case Cover */
.case-detail__cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 64px;
  box-shadow: var(--shadow);
}

.case-detail__cover img {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: cover;
  display: block;
}

.lightbox-trigger {
  position: relative;
  cursor: zoom-in;
}

.lightbox-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lightbox-trigger img {
  transition: transform .3s ease, filter .2s ease;
}

.lightbox-trigger:hover img {
  filter: brightness(1.03);
}

/* Lightbox / Modal */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  background: rgba(10, 11, 16, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__toolbar {
  position: relative;
  flex-shrink: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(to bottom, rgba(10, 11, 16, .85), rgba(10, 11, 16, 0));
  pointer-events: none;
}

.lightbox__toolbar > * {
  pointer-events: auto;
}

.lightbox__counter {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: #f2f2f5;
  background: rgba(23, 25, 34, .85);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.lightbox__counter:empty {
  visibility: hidden;
}

.lightbox__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(23, 25, 34, .9);
  color: #f2f2f5;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.lightbox__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.lightbox__btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.lightbox__close {
  padding: 0;
  width: 44px;
  height: 44px;
}

.lightbox__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.lightbox__stage {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .3) transparent;
  display: flex;
  padding: 8px 72px 24px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0;
  width: 46px;
  height: 46px;
}

.lightbox__nav--prev {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

.lightbox__nav[hidden] {
  display: none;
}

.lightbox__img {
  display: block;
  flex: 0 0 auto;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  background: var(--surface);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.lightbox.is-original .lightbox__img,
.lightbox.is-expanded .lightbox__img {
  max-width: none;
  max-height: none;
}

.lightbox__caption {
  flex-shrink: 0;
  padding: 12px 24px 18px;
  text-align: center;
  font-size: .9rem;
  line-height: 1.45;
  color: #d6d7df;
  background: linear-gradient(to top, rgba(10, 11, 16, .9), rgba(10, 11, 16, 0));
}

.lightbox__caption:empty {
  display: none;
}

@media (max-width: 600px) {
  .lightbox__toolbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .lightbox__btn {
    font-size: .8rem;
    padding: 0 12px;
  }

  .lightbox__close {
    padding: 0;
  }

  .lightbox__stage {
    padding: 4px 12px 16px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(23, 25, 34, .78);
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }

  .lightbox__caption {
    padding: 8px 16px 14px;
    font-size: .82rem;
  }
}

@media (max-height: 500px) {
  .lightbox__toolbar {
    padding: 6px 14px;
  }

  .lightbox__stage {
    padding: 4px 64px 10px;
  }

  .lightbox__caption {
    padding: 6px 16px 8px;
    font-size: .8rem;
  }
}

/* Case Narrative Sections */
.case-section {
  margin-bottom: 64px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.case-section__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}

.case-section__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.case-section__body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 72ch;
}

/* Process Steps */
.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 20px;
  box-shadow: var(--shadow);
}

.step-card__num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card__content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.step-card__content p {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.metric-card__val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.metric-card__label {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.metric-card__desc {
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.5;
}

/* Gallery */
.gallery-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.gallery-fig {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-fig img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-fig figcaption {
  padding: 16px 24px;
  font-size: .9rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
}

/* Takeaways */
.takeaways-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.takeaway-item {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-soft);
  white-space: pre-line;
  box-shadow: var(--shadow);
}

/* Next / Prev Navigation */
.case-pagination {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.page-nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all .2s;
}

.page-nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.page-nav-card.right {
  text-align: right;
}

.page-nav-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in,
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .case-item {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .case-section__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-pagination {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-item {
    padding: 22px 20px;
  }

  .case-item__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .case-item__num {
    line-height: 1.2;
  }

  .case-item__tags {
    justify-content: flex-start;
    gap: 6px;
  }

  .case-item__tags .tag {
    font-size: .7rem;
    padding: 4px 10px;
  }
}

