/* ==========================================================================
   CASE STUDY — styles/case-study.css
   Shared across all work/*.html pages
   Hero · Meta · Overview · Process · Stack · Results · Next
   ========================================================================== */

/* --------------------------------------------------------------------------
   CASE STUDY HERO
   -------------------------------------------------------------------------- */
.cs-hero {
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 5rem) 2rem 4rem;
}

.cs-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cs-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 48, 54, 0.3) 0%,
    rgba(44, 48, 54, 0.92) 60%,
    var(--background-primary) 100%
  );
}

.cs-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.cs-hero-orb--1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  opacity: 0.18;
}

.cs-hero-orb--2 {
  width: 400px; height: 400px;
  bottom: 0; left: -100px;
  opacity: 0.1;
}

.cs-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.cs-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-light-grey);
  opacity: 0.6;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cs-breadcrumb a {
  color: var(--color-light-grey);
  transition: color var(--transition-base);
}

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

.cs-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.cs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.05;
  margin-bottom: 1.2rem;
}

.cs-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cs-meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cs-meta-value {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-white);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   SHARED SECTION WRAPPER
   -------------------------------------------------------------------------- */
.cs-section {
  padding: 5rem 2rem;
}

.cs-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.cs-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   OVERVIEW — two-col: description + sidebar
   -------------------------------------------------------------------------- */
.cs-overview {
  background: linear-gradient(to bottom, var(--background-primary), var(--background-secondary));
}

.cs-overview-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 5rem;
  align-items: start;
}

.cs-overview-body h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.cs-overview-body p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

/* Sidebar details card */
.cs-details-card {
  background: var(--background-secondary);
  border: 1px solid rgba(95, 45, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.cs-details-card h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.cs-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cs-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(99, 108, 113, 0.12);
}

.cs-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cs-detail-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(171, 178, 191, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cs-detail-val {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-white);
  line-height: 1.5;
}

.cs-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   WHAT WAS BUILT — deliverables / sites
   -------------------------------------------------------------------------- */
.cs-built {
  background: var(--background-primary);
}

.cs-built-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.cs-built-card {
  background: var(--background-secondary);
  border: 1px solid rgba(95, 45, 241, 0.12);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.cs-built-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.cs-built-card:hover {
  border-color: rgba(95, 45, 241, 0.3);
  box-shadow: var(--shadow-strong);
}

.cs-built-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(95, 45, 241, 0.12);
  line-height: 1;
  margin-bottom: 1rem;
  user-select: none;
}

.cs-built-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.cs-built-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.cs-built-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid rgba(99, 108, 113, 0.12);
  padding-top: 1rem;
}

.cs-built-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-light-grey);
  padding-left: 1rem;
  position: relative;
}

.cs-built-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.cs-built-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-accent);
  margin-top: 1rem;
  text-decoration: none;
  transition: gap var(--transition-fast);
}

.cs-built-url:hover { gap: 0.65rem; }

/* --------------------------------------------------------------------------
   TECH STACK
   -------------------------------------------------------------------------- */
.cs-stack {
  background: linear-gradient(to bottom, var(--background-primary), var(--background-secondary));
}

.cs-stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.cs-stack-item {
  background: var(--background-secondary);
  border: 1px solid rgba(95, 45, 241, 0.1);
  border-radius: var(--radius-md);
  padding: 1.4rem 1rem;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.cs-stack-item:hover {
  transform: translateY(-4px);
  border-color: rgba(95, 45, 241, 0.3);
}

.cs-stack-icon {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
  line-height: 1;
}

.cs-stack-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-white);
  font-weight: 500;
  display: block;
}

.cs-stack-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(171, 178, 191, 0.45);
  display: block;
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   PROCESS
   -------------------------------------------------------------------------- */
.cs-process {
  background: var(--background-secondary);
}

.cs-process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2.5rem;
  position: relative;
}

.cs-process-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-purple), rgba(95,45,241,0.1));
}

.cs-process-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.cs-process-step:last-child { padding-bottom: 0; }

.cs-step-dot {
  width: 40px; height: 40px;
  background: var(--background-secondary);
  border: 2px solid var(--color-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-purple);
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.cs-step-content {
  padding-top: 0.5rem;
}

.cs-step-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.cs-step-content p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   RESULTS
   -------------------------------------------------------------------------- */
.cs-results {
  background: var(--background-primary);
}

.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.cs-result-card {
  background: linear-gradient(135deg, rgba(95,45,241,0.08) 0%, rgba(199,120,221,0.05) 100%);
  border: 1px solid rgba(95, 45, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition-base);
}

.cs-result-card:hover { transform: translateY(-4px); }

.cs-result-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.cs-result-label {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-light-grey);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   NEXT CASE STUDY
   -------------------------------------------------------------------------- */
.cs-next {
  background: var(--background-secondary);
  border-top: 1px solid rgba(95, 45, 241, 0.1);
  padding: 4rem 2rem;
}

.cs-next-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cs-next-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.cs-next-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-white);
}

.cs-next-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  white-space: nowrap;
}

.cs-next-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(95, 45, 241, 0.4);
}

.cs-next-link svg {
  width: 16px; height: 16px;
}

/* --------------------------------------------------------------------------
   DATA-REVEAL
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

[data-reveal="left"]  { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cs-overview-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .cs-details-card {
    position: static;
  }

  .cs-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cs-hero {
    min-height: 50vh;
    padding-top: calc(var(--nav-height) + 3rem);
  }

  .cs-hero h1 { font-size: 2.2rem; }

  .cs-built-grid {
    grid-template-columns: 1fr;
  }

  .cs-hero-meta {
    gap: 1.2rem;
  }

  .cs-next-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .cs-section { padding: 3rem 1rem; }

  .cs-hero h1 { font-size: 1.8rem; }

  .cs-results-grid {
    grid-template-columns: 1fr;
  }

  .cs-stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
