/* Case study pages — load after site.css + work-ui.css */

.project-page .site-header {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(12px);
}

.project-hero {
  padding: 8rem 0 3.5rem;
}

.project-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.project-breadcrumb a:hover {
  color: var(--accent);
}

.project-breadcrumb span[aria-hidden="true"] {
  opacity: 0.5;
}

.project-hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: rgba(0, 229, 199, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 199, 0.3);
}

.project-hero-badge--consumer {
  background: rgba(91, 156, 255, 0.12);
  color: #5b9cff;
  border-color: rgba(91, 156, 255, 0.3);
}

.project-hero-badge--health {
  background: rgba(100, 181, 246, 0.12);
  color: #64b5f6;
  border-color: rgba(100, 181, 246, 0.3);
}

.project-hero-badge--ai {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-2);
  border-color: rgba(124, 92, 255, 0.3);
}

.project-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.project-outcome {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 40rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.project-role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.project-role strong {
  color: var(--accent);
  font-weight: 500;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.project-stack span {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.project-gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  min-height: 0;
}

.project-gallery--duo {
  grid-template-columns: 1.35fr 0.85fr;
  align-items: stretch;
}

.project-gallery--single {
  grid-template-columns: 1fr;
  max-width: 920px;
}

.project-gallery--single .frame {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-gallery--duo .frame {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.project-gallery .frame--main,
.project-gallery--duo .frame {
  min-height: 360px;
}

.project-gallery-side .frame {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
}

.frame--browser .frame-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}

.frame-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.frame-chrome span:nth-child(1) { background: #ff5f57; }
.frame-chrome span:nth-child(2) { background: #febc2e; }
.frame-chrome span:nth-child(3) { background: #28c840; }

.frame-chrome code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.frame-body {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.5rem;
  position: relative;
}

.frame--main .frame-body {
  min-height: 320px;
}

.frame--phone {
  max-width: 220px;
  margin: 0 auto;
  border-radius: 22px;
  padding: 10px 10px 14px;
  background: rgba(0, 0, 0, 0.55);
}

.frame--phone .frame-body {
  min-height: 280px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.frame-placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
}

.frame-placeholder-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.75;
  text-align: center;
  max-width: 16rem;
}

.frame-body--shipsoft {
  background:
    linear-gradient(145deg, rgba(0, 229, 199, 0.12), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(0, 229, 199, 0.15), transparent 45%),
    #0a0a12;
}

.frame-body--freecoffee {
  background:
    linear-gradient(160deg, rgba(91, 156, 255, 0.18), transparent 60%),
    #0a0a14;
}

.frame-body--fusion {
  background:
    linear-gradient(145deg, rgba(255, 138, 92, 0.2), transparent 55%),
    linear-gradient(225deg, rgba(91, 156, 255, 0.1), transparent 45%),
    #120c0a;
}

.frame-body--photo {
  min-height: 0;
  padding: 0;
  display: block;
  flex: 1;
  background: #0a1016;
  overflow: hidden;
}

.frame-body--photo img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.frame--main .frame-body--photo img {
  min-height: 280px;
}

.project-gallery--duo .frame-body--photo img {
  min-height: 360px;
  max-height: 480px;
  object-position: center center;
}

.project-gallery--duo .frame:last-child .frame-body--photo img {
  object-position: center top;
}

.project-gallery--single .frame-body--photo img {
  min-height: 280px;
  max-height: 520px;
  object-position: center center;
}

.work-card--freecoffee .work-thumb-body--photo img {
  object-position: center top;
}

.frame-body--ai {
  background:
    linear-gradient(145deg, rgba(124, 92, 255, 0.18), transparent 55%),
    #0c0a14;
}

.frame-body--enquiry {
  background:
    linear-gradient(145deg, rgba(124, 92, 255, 0.2), transparent 50%),
    linear-gradient(225deg, rgba(0, 229, 199, 0.1), transparent 45%),
    #0c0a14;
}

.frame-body--ratesheet {
  background:
    linear-gradient(145deg, rgba(0, 229, 199, 0.16), transparent 50%),
    linear-gradient(225deg, rgba(124, 92, 255, 0.14), transparent 45%),
    #0a0c12;
}

.frame-api-stub {
  width: 100%;
  max-width: 28rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: left;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.frame-api-stub .t-ok { color: var(--accent); }
.frame-api-stub .t-key { color: var(--accent-2); }
.frame-api-stub .t-str { color: #f0c674; }

.frame-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 22rem;
}

.frame-diagram .diag-node {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.frame-diagram .diag-node--accent {
  border-color: var(--accent);
  color: var(--accent);
}

.frame-diagram .diag-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Case body */
.project-body {
  padding-bottom: 4rem;
}

.project-body-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.project-section {
  margin-bottom: 2.25rem;
}

.project-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.project-section p,
.project-section li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.project-section ul {
  list-style: none;
  padding: 0;
}

.project-section li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.65rem;
}

.project-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 5.5rem;
}

.project-metrics h2 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.project-metric {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.project-metric:last-of-type {
  border-bottom: none;
}

.project-metric strong {
  display: block;
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.project-metric span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.project-cta-box {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-cta-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

/* Nav between projects */
.project-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--border);
}

.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  min-width: min(100%, 240px);
  transition: border-color 0.3s;
}

.project-nav a:hover {
  border-color: rgba(0, 229, 199, 0.35);
}

.project-nav a span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-nav a strong {
  font-size: 1rem;
  color: var(--text);
}

.project-nav a.project-nav-next {
  text-align: right;
  margin-left: auto;
}

@media (max-width: 900px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-body-grid {
    grid-template-columns: 1fr;
  }

  .project-metrics {
    position: static;
  }

  .frame--main .frame-body {
    min-height: 240px;
  }
}
