/* ═══════════════════════════════════════════════════════════════
   CASE-03 — URBS Card Recharge Totem
   Case-specific styles. Base tokens live in case-study.css.
   Shared: .image-placeholder, .is-classified, classifiedPulse,
           .media-frame img, .media-frame.is-wide — all in case-study.css
   ═══════════════════════════════════════════════════════════════ */

/* Case-03-specific URBS tokens */
:root {
  --urbs-teal:  #00C9A7;
  --urbs-amber: #FFB547;
}

/* Override accent for URBS identity within this case */
.case-study { --accent: var(--urbs-teal); position: relative; z-index: 1; }

/* ═══ BACK LINK ═══
   nav is sticky; no need to offset by its height (caused ~80px of empty space on mobile). */
.back-link {
  max-width: var(--cs-content-max); margin: 0 auto;
  padding: 1.25rem var(--cs-gutter) 0;
  font-family: var(--f-mono); font-size: 0.68rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.back-link a { color: var(--accent-on-light); text-decoration: none; transition: color 0.2s; }
.back-link a:hover { color: var(--ink); }

/* ═══ HERO ═══ */
.cs-hero {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 5rem;
  align-items: start;
  padding: 2.5rem var(--cs-gutter) var(--cs-section-gap);
  max-width: var(--cs-content-max); margin: 0 auto;
  position: relative; overflow: hidden;
}
.cs-hero-content { display: flex; flex-direction: column; }

/* Totem device mockup — vertical silhouette */
.cs-hero-visual {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
}
.totem-device {
  --tw: min(340px, 100%);
  width: var(--tw);
  position: relative;
  padding-bottom: 0.5rem;
  opacity: 0;
  animation: totemRise 1s var(--ease) 0.3s forwards;
}
.totem-device img {
  width: 100%; height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}
@keyframes totemRise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ledPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.cs-mockup-label {
  position: absolute; bottom: -1.75rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 0.6rem;
  color: var(--ink-mid); letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cs-hero-number {
  font-family: var(--f-mono); font-size: 0.68rem; color: var(--accent-on-light);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: var(--cs-element-gap); opacity: 0; animation: slideUp 0.8s var(--ease) 0.1s forwards;
}
.cs-hero-title {
  font-family: var(--f-display); font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 700; line-height: 1.05; margin-bottom: var(--cs-element-gap); letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0; animation: slideUp 0.8s var(--ease) 0.2s forwards;
}
.cs-tags {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: var(--cs-inner-gap);
  opacity: 0; animation: slideUp 0.8s var(--ease) 0.3s forwards;
}
.cs-tag {
  font-family: var(--f-mono); font-size: 0.62rem; padding: 0.5rem 1rem;
  border: 1px solid var(--ink); border-radius: 0;
  text-transform: uppercase; letter-spacing: 0.18em; transition: all 0.3s var(--ease);
}
.cs-tag:hover { background: var(--ink); color: var(--bg); }
.cs-hero-description {
  font-family: var(--f-body); font-size: 1rem; line-height: 1.8;
  font-weight: 300;
  margin-bottom: var(--cs-inner-gap); max-width: 600px;
  opacity: 0; animation: slideUp 0.8s var(--ease) 0.4s forwards;
}
.cs-hero-meta {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 0.5rem 2.5rem;
  opacity: 0; animation: slideUp 0.8s var(--ease) 0.5s forwards;
}
.cs-meta-item { font-family: var(--f-mono); }
.cs-meta-label {
  color: var(--accent-on-light); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.58rem; margin-bottom: 0.35rem; display: block;
}
.cs-meta-value {
  color: var(--ink); font-size: 0.75rem; letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ═══ TEAM ═══ */
.cs-hero-team {
  margin-top: var(--cs-inner-gap);
  opacity: 0; animation: slideUp 0.8s var(--ease) 0.6s forwards;
}
.team-members {
  display: flex; gap: 0.75rem;
  margin-top: 0.5rem;
}
.team-card {
  border: 1px solid var(--ink);
  padding: 0.65rem 1rem;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.team-card:hover {
  border-color: var(--accent);
  background: rgba(0, 201, 167, 0.04);
}
.team-name {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.team-card:hover .team-name { color: var(--accent); }
.team-role {
  font-family: var(--f-mono);
  font-size: 0.55rem;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ SECTIONS ═══ */
.cs-section {
  max-width: var(--cs-content-max); margin: 0 auto;
  padding: var(--cs-section-gap) var(--cs-gutter);
  position: relative;
}
.cs-section-label {
  position: absolute; left: 16px; top: 50%;
  translate: 0 -50%;
  font-family: var(--f-mono); font-size: 0.58rem;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--ink-dim);
  writing-mode: vertical-rl; transform: rotate(180deg);
  pointer-events: none;
}

/* overview: uses shared case-study.css dark component */

/* ═══ STRATEGIC IMPACT — DARK PANEL ═══
   Generous vertical padding — dark sections need breathing room around the colour-shift transition.
   position: relative so .cs-section-label inside anchors to the panel (not the case-study root). */
.scale-panel {
  background: var(--dark); color: var(--bg);
  margin: 0; padding: calc(var(--cs-section-gap) * 2) var(--cs-gutter);
  position: relative;
}
.scale-inner { max-width: var(--cs-content-max); margin: 0 auto; }
.scale-title {
  font-family: var(--f-display); font-size: 2rem; font-weight: 700;
  color: var(--bg); margin-bottom: 0.5rem;
}
.scale-subtitle {
  font-family: var(--f-body); font-size: 1rem; line-height: 1.8;
  color: var(--ink-on-dark); margin-bottom: var(--cs-section-gap);
}

/* Metrics table (Legacy vs New Totem) */
.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-body);
  margin-bottom: var(--cs-inner-gap);
}
.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(240, 237, 232, 0.08);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--bg);
}
.metrics-table th {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 400;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 201, 167, 0.3);
}
.metrics-table th:first-child { color: var(--ink-dim); }
.metrics-table td:first-child {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--bg);
}
.metrics-table td.legacy { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: rgba(240,237,232,0.25); }
.metrics-table td.new { color: var(--accent); font-weight: 500; }
.metrics-table td.win {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
}
.metrics-table tr:last-child td { border-bottom: none; }

/* ROI highlight */
.roi-callout {
  display: flex; align-items: center; gap: 2rem;
  margin-top: var(--cs-inner-gap);
  padding: 1.75rem 2rem;
  border: 1px solid var(--accent);
  background: rgba(0, 201, 167, 0.04);
}
.roi-number {
  font-family: var(--f-display);
  font-size: 3.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
  letter-spacing: 0.02em;
}
.roi-copy {
  font-family: var(--f-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-dim);
  font-weight: 300;
}
.roi-copy strong { color: var(--bg); font-weight: 500; }

/* ═══ MY ROLE — DISCIPLINE CARDS ═══
   Default: dark-panel variant (cards on dark bg, light text).
   .on-light modifier: when grid sits on the light page bg, invert card styles.
   padding-left: 3rem reserves space for the vertical cs-section-label on desktop. */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding-left: 3rem;
}
.discipline-card {
  border: 1px solid rgba(240, 237, 232, 0.1);
  padding: 1.5rem; position: relative;
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.discipline-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.discipline-card:hover::before { transform: scaleY(1); }
.discipline-card:hover { border-color: rgba(0, 201, 167, 0.35); }
.discipline-icon {
  font-family: var(--f-mono); font-size: 0.6rem;
  color: var(--accent); letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 0.75rem;
}
.discipline-name {
  font-family: var(--f-display); font-size: 1.1rem;
  font-weight: 600; color: var(--bg); margin-bottom: 0.5rem;
}
.discipline-desc {
  font-family: var(--f-body); font-size: 0.8rem;
  color: var(--ink-dim); line-height: 1.6;
}

/* Modifier: discipline grid rendered on light bg (My Role — non-dark-panel variant) */
.discipline-grid.on-light .discipline-card {
  border-color: var(--ink);
}
.discipline-grid.on-light .discipline-name {
  color: var(--ink);
}
.discipline-grid.on-light .discipline-desc {
  color: var(--ink-mid);
}

/* ═══ FLOW MAP — 11 STEP CARDS (dark cards, light bg) ═══ */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-left: 3rem;
}
.flow-card {
  background: var(--dark);
  border: 1px solid rgba(240, 237, 232, 0.06);
  padding: 1.25rem;
  position: relative;
  transition: all 0.3s var(--ease);
  opacity: 0;
  transform: translateY(12px);
  overflow: hidden;
}
.flow-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.flow-card:hover::before { transform: scaleY(1); }
.flow-card.in { opacity: 1; transform: translateY(0); }
.flow-card:hover {
  border-color: rgba(0, 201, 167, 0.3);
}
.flow-num {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  display: block;
}
.flow-name {
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.flow-desc {
  font-family: var(--f-body);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-dim);
  font-weight: 300;
}

/* Flow sketch (wireframe media-frame wrapper, same left indent as flow-grid) */
.flow-sketch {
  padding-left: 3rem;
  margin-bottom: var(--cs-inner-gap);
}

/* ═══ DEEP DIVE ═══ */
.deep-dive {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--cs-inner-gap);
  margin-bottom: var(--cs-inner-gap);
  align-items: start;
  padding-left: 3rem;
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.deep-dive.in { opacity: 1; }
.deep-dive-phase {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--accent-on-light);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.deep-dive-number {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-on-light);
  line-height: 1;
  margin-top: 0.5rem;
}
.deep-dive-title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.deep-dive-law {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--ink-mid);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.deep-dive-body p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--cs-element-gap);
  font-weight: 300;
}
.deep-dive-body ul { list-style: none; margin-bottom: var(--cs-element-gap); }
.deep-dive-body ul li {
  font-size: 0.95rem; line-height: 1.8; padding-left: 1.5rem;
  position: relative; margin-bottom: 0.5rem;
}
.deep-dive-body ul li::before {
  content: '\2192'; position: absolute; left: 0;
  color: var(--accent-on-light); font-family: var(--f-mono);
}

.callout {
  background: var(--dark); color: var(--bg);
  padding: var(--cs-inner-gap); margin: var(--cs-element-gap) 0;
  border-left: 3px solid var(--accent);
}
.callout-label {
  font-family: var(--f-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 0.75rem; display: block;
}
.callout p { font-size: 1rem; line-height: 1.8; color: var(--bg); font-weight: 300; }

/* ═══ DELIVERABLES — CASE-03-SPECIFIC OVERRIDES ═══
   Base .deliverable-*, .btn-launch, .spec-pill, .media-frame,
   .classified-* live in case-study.css (shared).
   Below: only URBS-specific extensions. */

/* Launch button — desktop-only state.
   On desktop the btn works as usual; on mobile (<=768px) it's muted and the mobile
   label replaces the desktop label, while an explanatory hint appears underneath. */
.btn-launch-label { display: inline; }
.btn-launch-label[data-on="mobile"] { display: none; }
.btn-launch-hint {
  display: none;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  color: var(--ink-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.6;
  margin-top: 0.75rem;
  max-width: 32ch;
}

/* Media frame wide variant — URBS wireframe sketches (2:1 for horizontal flow diagrams) */
.media-frame.is-wide { aspect-ratio: 2 / 1; }
/* URBS-specific screen grid overlay (teal tint) inside media-frame */
.media-frame .screen-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,201,167,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,201,167,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ═══ FINAL THOUGHT — CLOSING QUOTE ═══
   Generous vertical padding — matches other section-level dark panels */
.final-thought {
  background: var(--dark); color: var(--bg);
  padding: calc(var(--cs-section-gap) * 2) var(--cs-gutter);
  position: relative; overflow: hidden;
}
.final-thought::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 201, 167, 0.02) 2px,
    rgba(0, 201, 167, 0.02) 4px
  );
  pointer-events: none;
}
.final-thought-inner {
  max-width: 900px; margin: 0 auto;
  text-align: center; position: relative;
}
.final-thought-label {
  font-family: var(--f-mono); font-size: 0.6rem;
  color: var(--accent); letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.final-thought-quote {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 500;
  color: var(--bg);
  line-height: 1.4;
  font-style: italic;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0 2rem;
}
.final-thought-quote::before,
.final-thought-quote::after {
  font-family: var(--f-display);
  color: var(--accent);
  font-size: 3rem;
  line-height: 0;
  position: relative;
  top: 0.5rem;
  opacity: 0.6;
}
.final-thought-quote::before { content: '\201C'; margin-right: 0.5rem; }
.final-thought-quote::after { content: '\201D'; margin-left: 0.5rem; }
.final-thought-attr {
  font-family: var(--f-mono); font-size: 0.65rem;
  color: var(--ink-dim); letter-spacing: 0.18em;
  text-transform: uppercase; margin-top: 2rem;
}

/* ═══ SECTION TITLE & INTRO ═══ */
.cs-section-title {
  font-family: var(--f-display); font-size: 2rem; font-weight: 700;
  margin-bottom: 0.5rem; padding-left: 3rem;
}
.cs-section-intro {
  font-family: var(--f-body); font-size: 1rem; line-height: 1.8;
  color: var(--ink-mid); margin-bottom: var(--cs-section-gap);
  padding-left: 3rem; font-weight: 300;
}

/* ═══ RESPONSIVE ═══
   Reset every 3rem left-indent for case-03-local containers.
   (.deliverable-block stack + padding reset lives in case-study.css shared.) */
@media (max-width: 1024px) {
  .cs-hero { grid-template-columns: 1fr; gap: 2rem; }
  .cs-hero-visual { max-width: 360px; margin: 0 auto; }
  .cs-hero-meta { grid-template-columns: repeat(2, auto); }
  .overview,
  .flow-grid,
  .flow-sketch,
  .deep-dive,
  .discipline-grid { padding-left: 0; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-section-label { display: none; }
  .cs-section-title, .cs-section-intro { padding-left: 0; }
}
@media (max-width: 768px) {
  :root { --cs-gutter: 1.25rem; }
  .cs-hero { padding: 1.5rem var(--cs-gutter) var(--cs-section-gap); }
  .cs-hero-visual { display: none; }
  .cs-hero-title { font-size: clamp(1.5rem, 7vw, 2rem); }
  .cs-hero-description { max-width: 100%; font-size: 0.9rem; }
  .cs-hero-meta { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .cs-meta-value { white-space: normal; font-size: 0.7rem; }
  .cs-tags { gap: 0.5rem; }
  .cs-tag { font-size: 0.55rem; padding: 0.4rem 0.75rem; letter-spacing: 0.12em; }
  .team-members { flex-direction: column; }
  .deep-dive { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .discipline-grid { grid-template-columns: 1fr; }
  .roi-callout { flex-direction: column; text-align: center; gap: 1rem; }
  .metrics-table { font-size: 0.8rem; }
  .metrics-table th, .metrics-table td { padding: 0.75rem 0.5rem; }
  .metrics-table th:nth-child(4), .metrics-table td:nth-child(4) { display: none; }

  /* Launch-Prototype CTA is desktop-only on mobile: mute + swap label + show hint */
  .btn-launch.is-desktop-only {
    background: transparent;
    color: var(--ink-mid);
    border-color: rgba(45, 41, 35, 0.25);
    pointer-events: none;
    cursor: not-allowed;
  }
  .btn-launch.is-desktop-only .arr { display: none; }
  .btn-launch.is-desktop-only .btn-launch-label[data-on="desktop"] { display: none; }
  .btn-launch.is-desktop-only .btn-launch-label[data-on="mobile"]  { display: inline; }
  .btn-launch.is-desktop-only + .btn-launch-hint { display: block; }
}

/* DS Decode & Glitch effect */
[data-decode] .char,
[data-glitch-only] .char {
  display: inline-block;
  transition: color 0.08s;
}
[data-decode] .char.glitch,
[data-glitch-only] .char.glitch {
  color: var(--accent);
}
[data-decode] .char.decoding,
[data-glitch-only] .char.decoding {
  color: var(--ink-mid, #4A4A4A);
}
