/* =====================================================
   ESC_ALA CASE STUDY
===================================================== */

.case-study-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2.2rem;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
}

/* PAGE LAYOUT */

.case-study-page main {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

/* HEADER */

.case-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  height: 72px;
  align-items: center;
  justify-content: space-between;
}

.case-logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.case-logo span {
  color: var(--accent);
}

.case-back {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.25s ease;
}

.case-back:hover {
  color: var(--accent);
}

/* HERO */

.case-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 75px 0 55px;
}

.case-hero-content {
  width: 100%;
  margin-bottom: 35px;
}

.case-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-eyebrow::before {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.case-hero h1 {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8vw, 7.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.case-hero h1 span {
  color: var(--accent);
}

.case-tagline {
  margin: 18px 0 12px;
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.case-intro {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.7;
}

/* PROJECT DETAILS */

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(25px, 5vw, 70px);
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.case-meta span {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-meta p {
  margin: 5px 0 0;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.8rem;
}

/* HERO IMAGE */

.case-hero-image {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.case-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.case-scroll {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

/* CONTENT SECTIONS */

.case-section {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.case-overview {
  display: block;
}

.case-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
}

.case-overview h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-overview h2 span {
  color: var(--accent);
}

.case-overview-grid > div > p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-overview-grid > div > .case-lead {
  margin-bottom: 20px;
  color: var(--paper);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}

/* FOOTER */

.case-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.case-footer a {
  color: var(--paper);
  transition: color 0.25s ease;
}

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

/* RESPONSIVE */
@media (max-width: 700px) {
  .case-hero {
    padding-top: 55px;
  }

  .case-meta {
    gap: 20px 30px;
  }

  .case-overview-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .case-section {
    padding: 70px 0;
  }

  .case-footer {
    flex-wrap: wrap;
  }
}
/* TABLET */
@media (min-width: 701px) and (max-width: 1000px) {
  .case-dev-grid {
    grid-template-columns: 1fr 1fr;
  }

  .case-dev-card:nth-child(2) {
    border-right: 0;
  }

  .case-dev-card:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .case-color-palette {
    gap: 10px;
  }
}

/* ACCESSIBILITY */
.case-study-page a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .case-study-page *,
  .case-study-page *::before,
  .case-study-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* VISUAL DIRECTION */

.case-visual-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
}

.case-visual-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-visual-heading h2 span {
  color: var(--accent);
}

.case-visual-heading > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-color-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-top: 65px;
}

.case-color {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
}

.case-color-swatch {
  width: 100%;
  aspect-ratio: 1.5 / 1;
  border: 1px solid var(--line);
}

.case-color small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 400;
}

@media (max-width: 700px) {
  .case-visual-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-color-palette {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 15px;
  }
}

/* =====================================================
   SHOPIFY EXPERIENCE SHOWCASE
===================================================== */

.case-experience-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
  margin-bottom: 65px;
}

.case-experience-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-experience-heading h2 span {
  color: var(--accent);
}

.case-experience-heading > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-showcase {
  min-width: 0;
}

.case-showcase-image {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.case-showcase-grid .case-showcase-image img {
  display: block;
  width: 100%;
  height: clamp(300px, 32vw, 500px);
  object-position: top center;
  transition: transform 0.6s ease;
}

.case-showcase:hover .case-showcase-image img {
  transform: scale(1.015);
}

.case-showcase-caption {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 25px;
  padding: 18px 0 45px;
}

.case-showcase-caption span {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-showcase-caption h3 {
  margin: 7px 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.case-showcase-caption > p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.case-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.case-showcase-grid .case-showcase-caption {
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 700px) {
  .case-experience-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .case-showcase-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .case-showcase-caption {
    flex-direction: column;
    gap: 10px;
    padding-bottom: 30px;
  }

  .case-showcase-caption > p {
    max-width: 100%;
  }
}

/* CUSTOM SHOPIFY DEVELOPMENT */

.case-development-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
  margin-bottom: 65px;
}

.case-development-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-development-heading h2 span {
  color: var(--accent);
}

.case-development-heading > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-dev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-dev-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 290px;
  padding: 25px;
  border-right: 1px solid var(--line);
}

.case-dev-card:first-child {
  padding-left: 0;
}

.case-dev-card:last-child {
  border-right: 0;
}

.case-dev-number {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-dev-card h3 {
  margin: 35px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.case-dev-card p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

.case-dev-tag {
  margin-top: 35px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.case-tech-stack {
  display: flex;
  align-items: flex-start;
  gap: 35px;
  padding-top: 30px;
}

.case-tech-stack > span {
  flex-shrink: 0;
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.case-tech-list span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .case-development-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .case-dev-grid {
    grid-template-columns: 1fr;
  }

  .case-dev-card,
  .case-dev-card:first-child {
    min-height: auto;
    padding: 25px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-dev-card:last-child {
    border-bottom: 0;
  }

  .case-dev-card h3 {
    margin-top: 25px;
  }

  .case-tech-stack {
    flex-direction: column;
    gap: 18px;
  }
}

/* MOTION & INTERACTION */

.case-motion-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
  margin-bottom: 55px;
}

.case-motion-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-motion-heading h2 span,
.case-motion-visual-center p span {
  color: var(--accent);
}

.case-motion-heading > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-motion-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(320px, 45vw, 570px);
  padding: 25px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}

.case-motion-visual::before,
.case-motion-visual::after {
  position: absolute;
  content: "";
  width: 280px;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.case-motion-visual::before {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.case-motion-visual::after {
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
}

.case-motion-visual-top,
.case-motion-visual-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-motion-visual-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.case-motion-index {
  margin-bottom: 15px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.7rem;
}

.case-motion-visual-center p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--accent);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.case-motion-line {
  width: 1px;
  height: 65px;
  margin: 25px 0 15px;
  background: var(--accent);
}

.case-motion-label {
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.case-motion-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 25px;
  padding: 20px 0 45px;
}

.case-motion-caption span,
.case-motion-details article > span {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-motion-caption h3,
.case-motion-details h3 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.case-motion-caption > p {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

.case-motion-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.case-motion-details article p {
  max-width: 440px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .case-motion-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
  }

  .case-motion-visual {
    min-height: 350px;
    padding: 18px;
  }

  .case-motion-caption {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 30px;
  }

  .case-motion-details {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* PROJECT OUTCOME */

.case-outcome {
  padding-bottom: clamp(80px, 12vw, 160px);
}

.case-outcome-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 100px);
  align-items: start;
  margin-bottom: 75px;
}

.case-outcome-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.case-outcome-heading h2 span {
  color: var(--accent);
}

.case-outcome-heading > p {
  max-width: 500px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.case-outcome-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-outcome-label > span,
.case-outcome-bottom > span {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-outcome-label h3 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.case-outcome-summary > p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.case-outcome-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  padding-top: 35px;
}

.case-outcome-links {
  display: flex;
  flex-direction: column;
  width: min(100%, 480px);
}

.case-outcome-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.case-outcome-links a:hover {
  color: var(--accent);
}

.case-outcome-arrow {
  font-size: 1.2rem;
  transition: transform 0.25s ease;
}

.case-outcome-links a:hover .case-outcome-arrow {
  transform: translate(4px, -4px);
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .case-outcome-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 45px;
  }

  .case-outcome-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .case-outcome-bottom {
    flex-direction: column;
    gap: 20px;
  }

  .case-outcome-links {
    width: 100%;
  }
}

/* NEXT PROJECT CTA */

.case-next {
  padding: clamp(70px, 10vw, 130px) 0;
  border-top: 1px solid var(--line);
}

.case-next h2 {
  margin: 25px 0 35px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.case-next h2 span {
  color: var(--accent);
}

.case-next > a {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent);
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.case-next > a:hover {
  color: var(--accent);
}

.case-next > a span {
  font-size: 1.1rem;
}

@media (max-width: 700px) {
  .case-next h2 {
    font-size: clamp(3rem, 12vw, 5rem);
  }
}
