/* =========================================================
   More case study pieces (Arborloop + Opal Aura pages).
   Loaded after case.css + case-components.css. The locked
   Oracle and Deloitte pages don't load this file.
   ========================================================= */

/* ---------- Colour themes ---------- */
.case-page--arborloop { --tint: var(--tint-arbor); --tag: var(--tag-arbor); }
.case-page--opal { --tint: var(--tint-opal); --tag: var(--tag-opal); }
.case-page--arborloop .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%231F7A5C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-theme="dark"] .case-page--arborloop .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%236FE0B5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.case-page--opal .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%237A5A00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-theme="dark"] .case-page--opal .ticks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%23FFD45E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Longer titles: a little more room for the text column so titles stay on 3 lines */
@media (min-width: 961px) {
  .case-page--arborloop .cs-hero__grid,
  .case-page--opal .cs-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* ---------- Contents list with groups, nested items and "Soon" placeholders ---------- */
.toc { max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
/* "Design process" reads like any other item (same style as "Measuring success");
   its phases sit indented underneath as a sub-menu */
.toc__label { display: block; padding: 7px 0 7px 16px; font-size: 14px; color: var(--muted); }
.toc .toc__group > ol { border-left: 0; padding-left: 14px; }
/* Sub-section anchors land below the fixed header */
.cs-content h2[id], .cs-content h3[id], .cs-content article[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.toc__sub { margin: 0 0 4px 16px !important; border-left: 1px dashed var(--line) !important; }
.toc__sub a { font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
/* A phase lights up while you're reading any of its sub-sections */
.toc__phase:has(.toc__sub a.is-active) .toc__phase-row a { color: var(--ink); font-weight: 500; }

/* Phase accordion: chevron toggle + smooth open/close (collapsed by default) */
.toc__phase-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.toc__phase-row a { flex: 1; }
.toc__toggle {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted);
  transition: color .3s, border-color .3s, background-color .3s;
}
.toc__toggle:hover { color: var(--ink); border-color: color-mix(in srgb, var(--tag) 40%, transparent); }
.toc__toggle svg { transition: transform .4s var(--ease); }
.toc__phase.is-open .toc__toggle svg { transform: rotate(180deg); }
.toc__collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.toc__collapse > .toc__sub { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .35s var(--ease); }
.toc__phase.is-open .toc__collapse { grid-template-rows: 1fr; }
.toc__phase.is-open .toc__collapse > .toc__sub { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toc__collapse, .toc__collapse > .toc__sub, .toc__toggle svg { transition: none; } }
.toc__soon {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 0 7px 16px; font-size: 14px; color: var(--muted); opacity: .6; cursor: default;
}
.toc__soon em { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- Hero buttons (prototype / live site) ---------- */
.cs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cs-actions .btn { --pad: 13px 20px; font-size: 14px; }

/* ---------- Big principle statement ---------- */
.statement {
  position: relative; overflow: hidden; margin: 32px 0 8px; padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg); background: var(--ink); color: var(--bg);
}
.statement::after { content: ""; position: absolute; left: -10%; bottom: -70%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tag) 75%, transparent), transparent); opacity: .5; pointer-events: none; }
.statement small { display: block; position: relative; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.statement p { position: relative; margin: 0 !important; max-width: 24ch !important; color: inherit !important; font-size: clamp(26px, 3.4vw, 44px) !important; line-height: 1.15 !important; font-weight: 600; letter-spacing: -.03em; }

/* ---------- Sticky-note takeaways (images with no frame, slightly tilted) ---------- */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); margin: 28px 0; }
.notes .fig { margin: 0; }
.notes .fig__frame { border: 0; background: transparent; filter: drop-shadow(0 18px 24px rgba(0,0,0,.14)); transform: rotate(-1.2deg); transition: transform .6s var(--ease); }
.notes .fig:nth-child(2) .fig__frame { transform: rotate(1.4deg); }
.notes .fig__frame:hover { transform: rotate(0) scale(1.02); }
.notes .fig--single { grid-column: 1 / -1; max-width: 520px; justify-self: center; }
/* A pair of sticky notes: smaller, always side by side (also on tablet and phone) */
.notes--pair { grid-template-columns: repeat(2, minmax(0, 300px)) !important; justify-content: center; gap: clamp(14px, 3vw, 32px); }

/* ---------- Source links row ---------- */
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.sources a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .3s, color .3s, background-color .3s;
}
.sources a:hover { color: var(--tag); border-color: color-mix(in srgb, var(--tag) 40%, transparent); }
/* Takeaway sticky note (smaller) beside its list of sources */
.note-sources { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; margin-top: 28px; }
.note-sources__title { margin: 0 0 10px !important; font-size: 12px !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) !important; }
.sources--stack { flex-direction: column; align-items: flex-start; margin: 0; }
.sources--stack a { white-space: normal; }
@media (max-width: 560px) { .note-sources { grid-template-columns: 1fr; justify-items: center; } .note-sources .notes { width: 100%; max-width: 280px; } .note-sources__list { justify-self: stretch; } }
.source-note { margin-top: 12px !important; font-size: 13.5px !important; color: var(--muted) !important; }

/* ---------- Quote links (public discussions) ---------- */
.quote-links { display: grid; gap: 12px; margin: 20px 0; }
.quote-link {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .3s;
}
.quote-link:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--tag) 35%, transparent); }
.quote-link i { align-self: stretch; border-radius: 4px; background: var(--c, var(--tag)); }
.quote-link strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; }
.quote-link span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Insight list with numbers ---------- */
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: i; }
.insights li { counter-increment: i; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.insights li::before { content: counter(i); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--tag); font-weight: 600; }
.insights strong { color: var(--ink); }
.split-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.split-media .browser { margin: 0; }

/* ---------- Closing card: see the product ---------- */
.product-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg); background: var(--tint); border: 1px solid color-mix(in srgb, var(--tag) 20%, transparent);
}
.product-cta h3 { margin: 0 0 10px; font-size: clamp(24px, 2.8vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.product-cta p { font-size: 16px !important; }
.product-cta img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.18)); }

/* ---------- Logo chips (products studied) ---------- */
.logo-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 4px; }
.logo-row figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.logo-row img { height: 72px; width: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.logo-row figcaption { font-size: 12.5px; color: var(--muted); }

/* ---------- Double-diamond map: Discover / Define / Develop / Deliver ---------- */
.fourd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 24px 0 8px; }
.fourd a { display: grid; align-content: start; gap: 10px; padding: 20px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .3s, background-color .3s; }
.fourd a:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tag) 40%, transparent); background: var(--tint); }
.fourd strong { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tag); }
.fourd span { font-size: 14px; line-height: 1.5; color: var(--ink-2); padding-left: 14px; position: relative; }
.fourd span::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--tag) 60%, transparent); }

/* ---------- Illustration accents (people doodles) ---------- */
.with-doodle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(16px, 3vw, 40px); align-items: center; }
.doodle { width: clamp(110px, 14vw, 180px); height: auto; pointer-events: none; animation: bob 6s ease-in-out infinite; }
.doodle--tall { width: clamp(70px, 8vw, 100px); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
/* Dark mode: a soft light disc behind the line drawings so their black outlines stay visible */
[data-theme="dark"] .doodle { padding: 12px; border-radius: 28px; background: #EDE9E1; }
@media (prefers-reduced-motion: reduce) { .doodle { animation: none; } }

/* ---------- Stat-style findings (5/5 users …) ---------- */
.findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.finding { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.finding b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; color: var(--tag); line-height: 1; }
.finding span { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .fourd { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .notes, .split-media, .product-cta, .findings { grid-template-columns: 1fr; }
  .with-doodle { grid-template-columns: 1fr; }
  .with-doodle .doodle { justify-self: start; width: 110px; }
  .with-doodle .doodle--tall { width: 70px; }
  .quote-link { grid-template-columns: 4px 1fr; }
  .quote-link > svg { display: none; }
}
