/* Digital Interaction - projects section, extracted from desktop.css so it can be
   embedded on pages that do NOT load desktop.css (e.g. marketing-medical-redesign).
   Everything is scoped under .projects-section so it never touches the host page. */

.projects-section {
  --gutter: 56px;
  --col-max: 1440px;
  --content-max: 1320px;
  background: var(--bone);
  color: var(--ink);
}

/* container + type helpers (only consumed inside the projects section here) */
.projects-section .dx-wrap { max-width: var(--col-max); margin: 0 auto; padding: 0 var(--gutter); }
/* vertical only: keep the host page's .phone>section horizontal padding intact */
.projects-section.dx-section { padding-top: 120px; padding-bottom: 120px; }
.projects-section .dx-h2 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(44px, 4.2vw, 68px);
}
.projects-section .dx-it {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}

/* desktop chip bump, scoped so host-page chips are untouched */
.projects-section .chip { font-size: 12px; height: 34px; padding: 0 14px; }

.projects-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 80px;
  gap: 48px;
}
.projects-head h2 { margin: 24px 0 0; max-width: 920px; }
.projects-head .top-actions {
  display: flex; align-items: center; gap: 14px;
}
.projects-head .top-actions .btn { padding: 12px 18px; font-size: 13px; }
.project-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  padding: 56px 0;
  border-top: 1px solid var(--hair-l);
  align-items: center;
}
.project-row:last-child { border-bottom: 1px solid var(--hair-l); }
.project-row.flipped { grid-template-columns: 1.5fr 1fr; }
.project-row .info .idx-row {
  display: flex; justify-content: space-between; align-items: baseline;
}
.project-row .info h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.0;
  font-size: 56px;
}
.project-row .info .num {
  font-family: var(--f-mono);
  font-size: 13px;
  opacity: 0.5;
  letter-spacing: 0.06em;
}
.project-row .info .desc {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.55;
  opacity: 0.72;
  max-width: 480px;
}
.project-row .info .chips { margin-top: 28px; }
.project-cover {
  height: clamp(360px, 32vw, 480px);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      rgba(10,10,10,0.06) 0 8px,
      rgba(10,10,10,0.02) 8px 16px);
  border: 1px solid var(--hair-l);
}
.project-cover .corner,
.project-cover .label {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0.55;
}
.project-cover .corner { top: 18px; right: 22px; }
.project-cover .label  { bottom: 18px; left: 22px; }
.project-row.flipped .project-cover { order: -1; }

/* projects: teaser reveal (fade + see more) */
.projects-more {
  position: relative;
  overflow: hidden;
  max-height: 300px;
  transition: max-height 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.projects-more .project-row:last-of-type { border-bottom: 1px solid var(--hair-l); }
.projects-more .project-row:last-of-type {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease 0.18s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
              border-color 0.3s ease;
}
.projects-more.is-open .project-row:last-of-type {
  opacity: 1;
  transform: none;
}
.projects-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 260px;
  background: linear-gradient(to bottom, rgba(245, 242, 235, 0) 0%, var(--bone) 72%);
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 2;
}
.projects-more.is-open .projects-fade { opacity: 0; }
.projects-more-btn {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.4s ease;
}
.projects-more-btn:hover { transform: translateX(-50%) translateY(-2px); }
.projects-more-btn .arr { transition: transform 0.2s ease; }
.projects-more-btn:hover .arr { transform: translateY(3px); }
.projects-more.is-open .projects-more-btn { opacity: 0; pointer-events: none; }

/* real images replacing the placeholder frames */
.project-cover.has-img {
  background: var(--mist);
  border: 0;
}
.project-cover.has-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-cover.has-img .corner,
.project-cover.has-img .label { display: none; }
a.project-cover { text-decoration: none; color: inherit; display: block; }

@media (prefers-reduced-motion: reduce) {
  .projects-more { transition: none; }
  .projects-more .project-row:last-of-type { transition: none; opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .project-row, .project-row.flipped { grid-template-columns: 1fr; }
  .project-row.flipped .project-cover { order: 0; }
}

@media (max-width: 700px) {
  .projects-section { --gutter: 22px; }
  .projects-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
  }
  .projects-section.dx-section { padding-top: 80px; padding-bottom: 80px; }
  .project-row, .project-row.flipped { gap: 28px; padding: 40px 0; }
  .project-row .info h3 { font-size: clamp(30px, 9vw, 40px); }
  .project-row .info .desc { margin-top: 16px; font-size: 15px; }
  .project-cover { height: clamp(240px, 64vw, 360px); }
}
