/* ==============================================
   CASE STUDY — shared component styles
   Consumed by work/*.html case study pages.
   Requires ./style.css for tokens + base.
============================================== */

/* --- Header -------------------------------- */
.case-header {
  margin-bottom: 2.5rem;
}

.case-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--size-display);
  line-height: 1.02;
  letter-spacing: var(--track-display);
  margin-bottom: 0.5rem;
}

/* --- Page header --------------------------- */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--size-display);
  line-height: 1.02;
  letter-spacing: var(--track-display);
  margin-bottom: 0.5rem;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* --- Music widget -------------------------- */
.music-widget {
  display: none;
  /* hidden for now; restore to flex */
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 1.5rem;
}

.music-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.music-btn svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

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

.music-widget.is-playing .music-btn {
  border-color: var(--accent);
  color: var(--accent);
}

.music-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.music-widget.is-playing .music-label {
  color: var(--accent);
}

/* --- Meta block ---------------------------- */
.case-meta,
.page-meta {
  list-style: none;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 1rem 0;
  margin: 1.5rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  letter-spacing: 0.02em;
  color: var(--text-muted);
  line-height: 1.9;
}

.case-meta strong,
.page-meta strong {
  color: var(--accent);
  font-weight: 400;
}

/* --- Body typography ----------------------- */
.case-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: var(--size-xl);
  color: var(--text);
  margin: 3rem 0 1rem;
}

.case-body ul {
  padding-left: 1.1rem;
  margin: 1rem 0;
}

.case-body li {
  font-family: var(--font-prose);
  color: var(--prose-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0.6rem 0;
}

@media (min-width: 48em) {
  .case-body li {
    font-size: 1rem;
  }
}

.case-body strong {
  color: var(--text);
  font-weight: 700;
}

/* --- Figures & captions -------------------- */
.case-body figure {
  margin: 1.8rem 0;
}

.case-body img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
}

.case-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --- Blockquote ---------------------------- */
.case-body blockquote {
  margin: 2.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.case-body blockquote p {
  font-family: var(--font-prose);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
}

/* --- Hero placeholder ---------------------- */
.hero-placeholder {
  width: 100%;
  min-height: 360px;
  border: 1px dashed var(--divider);
  border-radius: var(--radius-md);
  margin: 2rem 0;
  display: none;
  /* hidden until real hero media lands; restore to flex */
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-placeholder::after {
  content: "Hero";
}

/* --- Rule ---------------------------------- */
.rule {
  height: 1px;
  background: var(--divider);
  border: 0;
  margin: 2.5rem 0;
}

/* --- Callout ------------------------------- */
.callout {
  background: var(--bg-tint);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.8rem 0;
  font-family: var(--font-ui);
}

.callout .ct {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.callout p {
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.3rem 0;
}

.callout a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Video embed (16:9) -------------------- */
.video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.8rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--divider);
}

.video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* --- Passphrase gate ----------------------- */
.gate {
  background: var(--bg-tint);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2.5rem 0;
  font-family: var(--font-ui);
}

.gate h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 0.3rem;
}

.gate p {
  font-family: var(--font-ui);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.3rem 0 1rem;
}

.gate label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.gate-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.gate input {
  flex: 1;
  min-width: 200px;
  font-family: var(--font-ui);
  font-size: 1rem;
  padding: 0.6rem 0.875rem;
  background: var(--surface-soft);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  color: var(--text);
}

.gate input:focus {
  outline: none;
  border-color: var(--text-muted);
}

.gate button {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--text);
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  transition: opacity 0.2s;
}

.gate button:hover {
  opacity: 0.85;
}

.gate .msg {
  min-height: 1.2em;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  color: var(--text-muted);
}

.gate .msg[data-state="error"] {
  color: var(--feedback-error);
}

/* --- Case footer --------------------------- */
.case-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.case-footer a {
  color: var(--text-muted);
}

.case-footer a:hover {
  color: var(--text);
}