/* ============================================================
   allyhwang.com — Case Study Pages
   Layered on tokens.css + styles.css (reset, nav, focus, footer,
   .linklist, .btn). Full-bleed yellow/black bands on a 1200px,
   12-column grid with one vertical rhythm (--pad-y / --gap).
   ============================================================ */

:root {
  --ink-2: #141414;      /* exec summary panels */
  --navy: #020a6b;       /* quote band gradient */
  --rule-dark: #2c2c2c;  /* dividers on black */
}

@media (max-width: 900px) {
  :root { --gap: 28px; }
}

img { height: auto; }

/* ── Bands & container ───────────────────────────────────── */
.band { padding-block: var(--pad-y); }
.band--black { background: var(--black); color: var(--white); }
.band--yellow { background: var(--yellow); color: var(--black); }
.band--navy { background: linear-gradient(180deg, var(--navy), var(--black)); color: var(--white); }
.band--photo { background: linear-gradient(135deg, #3b3a33, #1b1b18); color: var(--white); }

/* Bluemine quote banner: workshop photo under a left-weighted dark overlay
   so the white quote stays legible while the subject on the right shows through */
.band--workshop {
  display: flex;
  align-items: center;
  min-height: clamp(360px, 45vw, 560px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .7) 50%, rgba(0, 0, 0, .35) 100%),
    url('/work/ibm-bluemine/img/workshop-banner.webp') 65% 0% / cover no-repeat,
    #1b1b18;
}

.band--workshop .wrap { width: 100%; }

@media (max-width: 600px) {
  .band--workshop {
    background:
      linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)),
      url('/work/ibm-bluemine/img/workshop-banner-sm.webp') 88% center / cover no-repeat,
      #1b1b18;
  }
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.band--black :focus-visible,
.band--navy :focus-visible,
.band--photo :focus-visible { outline-color: var(--yellow); }

.band--black ::selection,
.band--navy ::selection,
.band--photo ::selection { background: var(--yellow); color: var(--black); }

/* ── Type ────────────────────────────────────────────────── */
.display {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 10.5vw, 8.25rem);
  line-height: .9;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.band--black .display { color: var(--yellow); }

.h2 { font-size: clamp(1.9rem, 4vw, 3.25rem); line-height: .95; margin: 0; text-wrap: balance; }
.h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 0; }
.label { font-size: 1.2rem; letter-spacing: .01em; line-height: 1.1; margin: 0; }

.band--black .label,
.band--black .lead { color: var(--yellow); }

.lead {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 .9rem var(--font-body);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}

.eyebrow svg { width: 16px; height: 16px; }

.prose { max-width: 64ch; display: flex; flex-direction: column; gap: 14px; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 1.2em; display: grid; gap: 4px; }

.small { font-size: .88rem; }
.fine { font-size: .8rem; font-style: italic; }

/* ── 12-column grid ──────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid > * { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.c12 { grid-column: 1 / -1; }
.center { align-items: center; }

/* ── Exec summary panels ─────────────────────────────────── */
.panels { display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--ink-2); color: var(--white); padding: 18px 20px; border-radius: 6px; }

.panel h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--yellow);
  font-size: 1.15rem;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #3a3a3a;
}

.panel ul { margin: 0; padding-left: 1.1em; font-size: .86rem; line-height: 1.5; display: grid; gap: 3px; }
.panel p { margin: 0 0 8px; font-size: .86rem; }
.panel b { font-weight: 700; }
.panel :focus-visible { outline-color: var(--yellow); }

/* ── Intro (chunked) & method ────────────────────────────── */
.intro { display: flex; flex-direction: column; gap: 22px; max-width: 64ch; }
.intro p { margin: 0; }
.intro__lead { font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.35; }
.intro__block { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, .25); }
.intro__block .label { font-size: 1rem; }

.method { display: flex; flex-direction: column; gap: 12px; }

/* ── Milestones (open list) ──────────────────────────────── */
.milestones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.milestones li { border-bottom: 1px solid #555; padding-block: 16px; display: grid; gap: 6px; }
.milestones .when { font: 500 .88rem var(--font-body); text-transform: uppercase; letter-spacing: .02em; }
.milestones p { margin: 0; font-size: .88rem; color: #d9d9d9; }

/* ── Insight boxes ───────────────────────────────────────── */
.insights { background: var(--black); color: var(--white); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.insights > .label { color: var(--yellow); }
.insights--yellow { background: var(--yellow); color: var(--black); }
.insights--yellow > .label { color: var(--black); }
.insights h4 { margin: 0; font: 700 1rem var(--font-body); line-height: 1.45; }
.insights ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .95rem; }

.icard { background: var(--white); color: var(--black); padding: 20px 22px; display: grid; gap: 8px; font-size: .88rem; }
.icard h4 { font: 500 1rem var(--font-body); text-transform: uppercase; letter-spacing: .01em; }
.icard p { margin: 0; }
.icard ul { padding-left: 1.1em; font-size: .86rem; }

/* ── Cards ───────────────────────────────────────────────── */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--white); color: var(--black); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card p { margin: 0; }
.card .h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); }

/* ── Before / after & screens ────────────────────────────── */
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.ba > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.ba .tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.75rem);
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}

.ba-group { display: flex; flex-direction: column; gap: 20px; }
.ba-group + .ba-group { padding-top: var(--gap); border-top: 1px solid var(--rule-dark); }

.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
.phones figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }

.callout {
  display: inline-block;
  align-self: flex-start;
  font: 700 .75rem var(--font-body);
  letter-spacing: .03em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--black);
  padding: 4px 9px;
}

.band--yellow .callout { background: var(--black); color: var(--yellow); }

/* Callouts that cross-link a screen and its retrospect note */
.callout a,
a.callout {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout a:hover,
a.callout:hover { opacity: .8; }

.band--black .callout a:focus-visible { outline-color: var(--yellow); }
.band--yellow a.callout:focus-visible { outline-color: var(--black); }

.xref-target { scroll-margin-top: 32px; }

/* Landing cue: briefly outline whichever note the reader jumped to */
@keyframes targetFade {
  from { outline-color: var(--cue); }
  to   { outline-color: transparent; }
}

.band--black .xref-target:target { --cue: var(--yellow); }
.band--yellow .xref-target:target { --cue: var(--black); }

.xref-target:target {
  outline: 3px solid transparent;
  outline-offset: 8px;
  animation: targetFade 2.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .xref-target:target { animation: none; outline-color: var(--cue); }
}

.device { margin: 0 auto; width: 100%; }
.device--md { max-width: 900px; }

.figcap { font-size: .86rem; max-width: 62ch; margin: 0; }
.band--black .figcap { color: #cfcfcf; }

/* ── Quote bands ─────────────────────────────────────────── */
.quote {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4.4vw, 3.4rem);
  line-height: .98;
  max-width: 22ch;
  text-wrap: balance;
}

.quote em { font-style: normal; color: var(--yellow); }
.cite { font-size: .95rem; margin: 0; }

/* ── Retrospect & next case study ────────────────────────── */
.retro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gap); }
.retro > div { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.retro .item p { margin: 0; }
.retro .item b { display: block; }

.next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid var(--black);
  text-decoration: none;
  color: var(--black);
}

.next__label { font: 500 .9rem var(--font-body); text-transform: uppercase; letter-spacing: .05em; }

.next__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.next:hover .next__name { text-decoration: underline; text-underline-offset: 5px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid > .c4, .grid > .c5, .grid > .c6, .grid > .c7, .grid > .c8 { grid-column: 1 / -1; }
  .cards3, .retro { grid-template-columns: minmax(0, 1fr); }
  .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights { padding: 22px; }
}

@media (max-width: 600px) {
  .ba { grid-template-columns: minmax(0, 1fr); }
}
