/* Case Study Pages — shared styles */

html {
  scroll-behavior: smooth;
}

.container {
  height: auto;
  min-height: 100%;
}

/* ---------- Hero ---------- */
.cs-hero {
  position: relative;
  padding: 12em 8em 5em;
  overflow: hidden;
}

.cs-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 120%;
  background: radial-gradient(
    ellipse at center,
    rgba(252, 0, 45, 0.18) 0%,
    rgba(255, 107, 0, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.cs-breadcrumb {
  position: relative;
  margin-bottom: 3em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.cs-breadcrumb a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}

.cs-breadcrumb a:hover {
  color: #ff6b00;
}

.cs-chip {
  position: relative;
  width: max-content;
  padding: 0.5em 1em;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.125);
  border-radius: 12px;
  margin-bottom: 2em;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.cs-hero h1 {
  position: relative;
  font-family: "Druk Wide Bold";
  font-size: clamp(28px, 3.6vw, 60px);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--color-text);
  max-width: 20ch;
  margin-bottom: 0.6em;
}

.cs-dek {
  position: relative;
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 60ch;
}

/* ---------- Hero stats bar ---------- */
.cs-stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 4em;
}

.cs-stat {
  flex: 1;
  min-width: 200px;
  padding: 1.5em;
  background: var(--color-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.cs-stat-number {
  display: block;
  font-family: "AE Cond Semibold";
  font-size: clamp(22px, 2.2vw, 38px);
  color: #ff6b00;
  margin-bottom: 0.3em;
  line-height: 1.1;
}

.cs-stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ---------- Sections ---------- */
.cs-section {
  padding: 5em 8em;
}

.cs-section.dark {
  background: var(--color-bg-secondary);
}

.cs-section > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.cs-section h2 {
  font-family: "Druk Wide Bold";
  font-size: clamp(22px, 2.4vw, 40px);
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 1em;
}

.cs-section p {
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 1.25em;
}

.cs-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5em;
}

.cs-section ul li {
  position: relative;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.7;
  color: var(--color-text-secondary);
  padding: 0.5em 0 0.5em 1.8em;
}

.cs-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #ff6b00;
  font-weight: bold;
}

/* ---------- Architecture flow diagram ---------- */
.arch-flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 2.5em auto;
}

.arch-node {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25em 1em;
  background: var(--color-bg);
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: 12px;
  text-align: center;
}

.cs-section:not(.dark) .arch-node {
  background: var(--color-bg-secondary);
}

.arch-node strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: 0.4em;
}

.arch-node span {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6b00;
  font-size: 20px;
  flex: 0 0 auto;
}

/* ---------- Results grid ---------- */
.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1em;
  margin: 2.5em auto;
}

.cs-result {
  padding: 2em 1.5em;
  background: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.cs-section:not(.dark) .cs-result {
  background: var(--color-bg-secondary);
}

.cs-app-title {
  display: block;
  font-family: "AE Cond Semibold";
  font-size: clamp(14px, 1.3vw, 19px);
  color: #ff6b00;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 0.6em;
}

.cs-result-number {
  display: block;
  font-family: "AE Cond Semibold";
  font-size: clamp(20px, 2vw, 34px);
  color: #ff6b00;
  margin-bottom: 0.4em;
  line-height: 1.15;
}

.cs-result-label {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ---------- Tech stack chips ---------- */
.cs-stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin: 2em auto;
}

.stack-chip {
  padding: 0.7em 1.3em;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text);
}

/* ---------- Placeholder markers ---------- */
.ph {
  color: #ffb380;
  background: rgba(255, 107, 0, 0.08);
  border-bottom: 1px dashed rgba(255, 107, 0, 0.6);
  padding: 0 0.2em;
  font-size: inherit;
}

/* ---------- Final CTA ---------- */
.cs-cta {
  padding: 6em 8em;
  text-align: center;
}

.cs-cta h2 {
  font-family: "Druk Wide Bold";
  font-size: clamp(24px, 3vw, 48px);
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 0.75em;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.cs-cta p {
  font-size: clamp(15px, 1.1vw, 18px);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 55ch;
  margin: 0 auto 2.5em;
}

.cs-cta-buttons {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.cs-btn-primary {
  display: inline-block;
  padding: 1.1em 2.4em;
  background: linear-gradient(to right, #fc002d, #ff6b00);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cs-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
}

.cs-btn-secondary {
  display: inline-block;
  padding: 1.1em 2.4em;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  transition: border-color 0.3s, background 0.3s;
}

.cs-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- Compact footer ---------- */
.cs-footer {
  padding: 2em 8em 3em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-footer p,
.cs-footer a {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cs-footer a:hover {
  color: #ff6b00;
}

/* ---------- Case studies hub ---------- */
.cs-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5em;
  padding: 0 8em 6em;
  max-width: 1400px;
  margin: 0 auto;
}

.cs-card {
  display: flex;
  flex-direction: column;
  padding: 2.5em;
  background: var(--color-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: transform 0.3s, border-color 0.3s;
}

.cs-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 0, 0.5);
}

.cs-card .cs-chip {
  margin-bottom: 1.5em;
}

.cs-card h3 {
  font-family: "AE Cond Semibold";
  font-size: clamp(18px, 1.5vw, 24px);
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: 0.75em;
}

.cs-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 2em;
  flex: 1;
}

.cs-card-link {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ff6b00;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cs-hero {
    padding: 8em 1.5em 3em;
  }

  .cs-section {
    padding: 3em 1.5em;
  }

  .cs-cta {
    padding: 4em 1.5em;
  }

  .cs-hub-grid {
    padding: 0 1.5em 4em;
    grid-template-columns: 1fr;
  }

  .cs-stats {
    flex-direction: column;
    margin-top: 3em;
  }

  .arch-flow {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
    padding: 0.25em 0;
  }

  .cs-cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cs-btn-primary,
  .cs-btn-secondary {
    text-align: center;
  }

  /* fixed bottom nav ctas bar overlays content on mobile */
  .cs-footer {
    padding: 2em 1.5em 9em;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Process steps (programmatic pages) ---------- */
.cs-process {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25em;
}

.cs-process li {
  counter-increment: step;
  padding: 1.5em;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
}

.cs-process li::before {
  content: "0" counter(step);
  display: block;
  font-family: "AE Cond Semibold";
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #ff6b00;
  margin-bottom: 0.75em;
}

.cs-process li strong {
  display: block;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5em;
  color: var(--color-text);
}

.cs-process li span {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ---------- Pricing signal ---------- */
.cs-pricing {
  margin: 2em 0 0;
  padding: 1.5em 2em;
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-left: 4px solid #ff6b00;
  border-radius: 12px;
}

.cs-pricing p {
  margin: 0;
}

.cs-pricing strong {
  color: var(--color-text);
}

/* ---------- FAQ ---------- */
.cs-faq details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cs-faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1.1em 2.2em 1.1em 0;
  font-weight: 700;
  font-size: clamp(15px, 1.15vw, 18px);
  color: var(--color-text);
}

.cs-faq summary::-webkit-details-marker {
  display: none;
}

.cs-faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25em;
  top: 50%;
  transform: translateY(-50%);
  color: #ff6b00;
  font-size: 1.4em;
  line-height: 1;
}

.cs-faq details[open] summary::after {
  content: "\2013";
}

.cs-faq details > p {
  padding: 0 0 1.4em;
  margin: 0;
}

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

  .cs-pricing {
    padding: 1.25em 1.25em;
  }
}
