/*
  Power-BI Tool case study — PUBLIC page only. A condensed teaser
  (hook headline, one image, a 3-item summary strip, an honesty line,
  and a contact CTA instead of the full write-up) — its own bespoke
  visual system, carried over from a design handoff, not built on
  css/tokens.css. The full write-up lives on the private
  study/power-bi/raw/ page instead, which keeps the site's homepage
  visual style (see css/power-bi-raw.css). Edit text in
  js/power-bi-data.js and the photo in images/power-bi/, not here.

  TO CHANGE THE ACCENT COLOR: edit --accent below — that's the only
  value that needs to change. --accent-12/--accent-30 (the translucent
  fills used for the caveat's left border, etc.) derive their color
  from --accent automatically via CSS relative-color syntax
  (`rgb(from var(--accent) ...)`), instead of hardcoding their own RGB
  numbers — so they can never drift out of sync with it.
*/

:root {
  --ink: #1C2321;
  --ink-soft: #4A524E;
  --paper: #EDEAE3;
  --paper-raised: #F5F3EE;
  --accent: #3B6E5E;
  --accent-12: rgb(from var(--accent) r g b / 0.12);
  --accent-30: rgb(from var(--accent) r g b / 0.3);
  --line: #C9C3B8;
  --max: 840px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

header { padding: 32px 0 0; }
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.back {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.back:hover { border-color: var(--ink-soft); }
.header-right { display: flex; align-items: center; gap: 14px; }
.role-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ---- hero ---- */
.hero {
  padding: 48px 0 40px;
  animation: rise 0.6s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 14ch;
}
.hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* ---- image ---- */
figure {
  margin: 0 0 40px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}
figure img {
  display: block;
  width: 100%;
  height: auto;
}
figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 12px 16px;
  max-width: 56ch;
}

/* ---- compressed narrative strip ---- */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 40px;
}
.strip div {
  padding: 24px 20px;
  border-left: 1px solid var(--line);
}
.strip div:first-child { border-left: none; padding-left: 0; }
.strip div:last-child { padding-right: 0; }
.strip .k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 10px;
}
.strip p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

@media (max-width: 640px) {
  .strip { grid-template-columns: 1fr; }
  .strip div { border-left: none; border-top: 1px solid var(--line); padding: 20px 0; }
  .strip div:first-child { border-top: none; padding-top: 0; }
}

/* ---- honesty line ---- */
.caveat {
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-left: 14px;
  border-left: 2px solid var(--accent-30);
  margin: 0 0 64px;
}
.caveat strong { color: var(--ink); font-weight: 500; }

/* ---- CTA ---- */
.cta {
  background: var(--accent);
  color: var(--paper);
  padding: 48px 0;
}
.cta h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 12px;
}
.cta p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(237, 234, 227, 0.82);
  max-width: 52ch;
  margin: 0 0 26px;
}
.cta-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cta-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--paper);
  text-decoration: none;
  padding: 11px 18px;
  border: 1px solid rgba(237, 234, 227, 0.4);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cta-links a.primary {
  background: var(--paper);
  color: var(--accent);
  border-color: var(--paper);
  font-weight: 500;
}
.cta-links a.primary:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.cta-links a:not(.primary):hover { border-color: var(--paper); }

footer { padding: 26px 0 40px; }
footer p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
}
