/* Case-study page for "IEMedia".
   Reuses the main site's design tokens, fonts and section/card
   conventions (style.css) — this file only adds the page-specific
   layout: hero mockup, split sections and the case-study components
   (cards, steps, metrics, brand grid, chips) used throughout. */

/* ---------- HERO ---------- */
.iem-hero {
  background: var(--bg-dark);
  padding: 140px 0 100px;
  text-align: center;
}
.iem-eyebrow {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(17px, 1.8vw, 22px);
  color: var(--mint);
  transform: rotate(-3deg);
  display: inline-block;
  margin: 0 0 20px;
}
.iem-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 85%;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-dark-1);
  margin: 0 0 24px;
}
.iem-desc {
  max-width: 960px;
  margin: 0 auto 32px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
  color: var(--text-dark-2);
}
.iem-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 32px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--mint);
  color: #04263a;
  font-size: 15px;
  font-weight: 600;
  transition: transform .25s ease, background .25s ease;
}
.iem-cta-button:hover { transform: translateY(-2px); background: var(--mint-2); }
.iem-hero-mockup {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}

/* ---------- COPY (used across every plain text section) ---------- */
.iem-copy {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-light-2);
  margin: 0 0 28px;
}
.iem-copy:last-child { margin-bottom: 0; }
.section--dark .iem-copy { color: var(--text-dark-2); }
.iem-role {
  font-size: 16px;
  margin: 24px 0 24px;
}
.iem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.iem-tag {
  padding: 8px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-1);
  white-space: nowrap;
}
.iem-subhead {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 20px;
}
.section--dark .iem-subhead { color: var(--text-dark-1); }

/* ---------- ABOUT: text + small side image ---------- */
.iem-about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: center;
}
.iem-about-image {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  box-shadow: none;
}

/* ---------- DEEP DIVE SECTIONS ---------- */
.iem-deepdive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.iem-deepdive-text p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-light-2);
  margin: 0 0 32px;
}
.iem-deepdive-text p:last-child { margin-bottom: 0; }
.section--dark .iem-deepdive-text p { color: var(--text-dark-2); }
.iem-deepdive-image {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}
.iem-deepdive--stretch { align-items: stretch; }
.iem-aboutus-image {
  height: 0;
  min-height: 100%;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.iem-phone-image {
  width: auto;
  height: 480px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
  box-shadow: none;
  border-radius: 0;
}
.iem-deepdive--reverse .iem-deepdive-text { order: 2; }
.iem-deepdive--reverse .iem-deepdive-image,
.iem-deepdive--reverse .iem-phone-image { order: 1; }

/* ---------- CARD GRIDS (reused for "What I Did", info Q&A, UX Decision, Visual Language) ---------- */
.iem-cardgrid {
  display: grid;
  gap: 20px;
}
.iem-cardgrid--2 { grid-template-columns: repeat(2, 1fr); }
.iem-cardgrid--3 { grid-template-columns: repeat(3, 1fr); }
.iem-cardgrid--4 { grid-template-columns: repeat(4, 1fr); }
.iem-cardgrid--5 { grid-template-columns: repeat(6, 1fr); }
.iem-cardgrid--5 .iem-card { grid-column: span 2; }
.iem-cardgrid--5 .iem-card:nth-child(4) { grid-column: 2 / span 2; }
.iem-cardgrid--5 .iem-card:nth-child(5) { grid-column: 4 / span 2; }
.iem-card {
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
}
.section--dark .iem-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
}
.iem-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin: 0 0 14px;
}
.iem-card h3,
.iem-card h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.section--dark .iem-card h3,
.section--dark .iem-card h4 { color: var(--text-dark-1); }
.iem-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-light-2);
  margin: 0;
}
.section--dark .iem-card p { color: var(--text-dark-2); }

/* ---------- NUMBERED STEPS (horizontal) ---------- */
.iem-steps {
  display: grid;
  gap: 24px;
  margin: 40px 0;
}
.iem-steps--3 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 720px;
}
.iem-steps--3 .iem-step { flex: 0 1 auto; }
.iem-steps--3 .iem-step p:not(.iem-step-num) { white-space: nowrap; }
.iem-steps--5 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.iem-steps--5 .iem-step { flex: 0 1 auto; }
.iem-steps--5 .iem-step p { font-size: 13px; letter-spacing: -0.01em; }
.iem-steps--5 .iem-step p:not(.iem-step-num) { white-space: nowrap; }
.iem-step-num {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 144px);
  font-weight: 700;
  color: var(--mint);
  line-height: 1;
  margin: 0 0 12px;
}
.iem-step p {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.iem-step .iem-step-num { margin: 0 0 12px; }
.section--dark .iem-step p { color: var(--text-dark-1); }

/* ---------- FLOW (arrows) ---------- */
.iem-flow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}
.iem-flow-step {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 26px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}
.section--dark .iem-flow-step { border-color: rgba(255,255,255,.2); color: var(--text-dark-1); }
.iem-flow-arrow {
  font-size: 16px;
  color: var(--text-light-2);
  line-height: 1;
}
.section--dark .iem-flow-arrow { color: var(--text-dark-2); }

/* ---------- METRIC GRID ---------- */
.iem-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0 16px;
}
.iem-metric-card {
  text-align: center;
  padding: 32px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.iem-metric-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-light-2);
  margin: 0 0 10px;
}
.iem-metric-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  margin: 0 0 6px;
}
.iem-metric-caption {
  font-size: 14px;
  color: var(--text-light-2);
  margin: 0;
}
.iem-metric-date {
  text-align: center;
  font-size: 13px;
  color: var(--text-light-2);
  margin: 0;
}

/* ---------- COLLAGE (Visual Design) ---------- */
.iem-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px 0;
}
.iem-collage img {
  width: 100%;
  aspect-ratio: 1441 / 660;
  object-fit: cover;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

/* ---------- DEVICE PAIR (Responsive Experience) ---------- */
.iem-devicepair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 40px;
  margin: 0 0 16px;
}
.iem-devicepair-desktop {
  width: 60%;
  max-width: 560px;
  box-shadow: none;
  border-radius: 0;
}
.iem-devicepair-mobile {
  width: auto;
  height: 320px;
  max-width: 160px;
  max-height: 100%;
  object-fit: contain;
  box-shadow: none;
  border-radius: 0;
}

/* ---------- COMPONENT CHIPS (Design System) ---------- */
.iem-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 40px 0;
}
.iem-chip {
  padding: 14px 22px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  background: #fafafa;
}

/* ---------- CLOSING STATEMENT ---------- */
.iem-closing-statement {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 900px;
  margin: 0 auto 40px;
  text-align: center;
}
.iem-closing-mockup {
  display: block;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
}

/* ---------- NEXT PROJECT ---------- */
.iem-next-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px);
  gap: 20px;
}
.iem-next-card {
  display: block;
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .3s ease, transform .3s ease;
}
.iem-next-card:hover { box-shadow: 0 16px 32px rgba(0,0,0,.1); transform: translateY(-4px); }
.iem-next-thumb { display: block; aspect-ratio: 4 / 3; background-size: cover; background-position: center; }
.iem-next-name { display: block; padding: 16px 20px 4px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.iem-next-link { display: block; padding: 0 20px 18px; font-size: 14px; color: var(--text-light-2); }

@media (max-width: 900px) {
  .iem-about-grid { grid-template-columns: 1fr; row-gap: 32px; }
  .iem-deepdive { grid-template-columns: 1fr; row-gap: 0; }
  .iem-deepdive-text p:last-child { margin-bottom: 32px; }
  .iem-deepdive--reverse .iem-deepdive-text { order: 1; }
  .iem-deepdive--reverse .iem-deepdive-image,
  .iem-deepdive--reverse .iem-phone-image { order: 2; }
  .iem-phone-image { height: 360px; margin: 0 auto; }
  .iem-aboutus-image { height: auto; min-height: 0; }
  .iem-cardgrid--2,
  .iem-cardgrid--3,
  .iem-cardgrid--4,
  .iem-cardgrid--5 { grid-template-columns: 1fr; }
  .iem-cardgrid--5 .iem-card,
  .iem-cardgrid--5 .iem-card:nth-child(4),
  .iem-cardgrid--5 .iem-card:nth-child(5) { grid-column: auto; }
  .iem-steps--3,
  .iem-steps--5 {
    flex-direction: column;
    gap: 24px;
  }
  .iem-steps--3 .iem-step p:not(.iem-step-num),
  .iem-steps--5 .iem-step p:not(.iem-step-num) { white-space: normal; }
  .iem-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .iem-devicepair { gap: 20px; }
  .iem-devicepair-desktop { width: 62%; }
  .iem-devicepair-mobile { height: 220px; max-width: 110px; }
}
@media (max-width: 680px) {
  .iem-tags { justify-content: center; }
  .iem-hero { padding: 110px 0 70px; }
  .iem-about-image { max-width: 180px; }
  .iem-chip-row {
    justify-content: center;
    gap: 8px;
  }
  .iem-chip {
    padding: 10px 16px;
    font-size: 13px;
  }
  .iem-collage { grid-template-columns: repeat(2, 1fr); }
  .iem-devicepair { flex-direction: column; align-items: center; }
  .iem-devicepair-desktop { width: 100%; }
}
