/* ============================================================
   REVERT — Projects showcase.
   Each project is its own white panel (like the capabilities
   panel): title on top, image left, features grid right.
   ============================================================ */

.projects {
  background: #eef4fb;
  padding: 48px 20px 64px;
}

.projects-head { text-align: center; max-width: 760px; margin: 0 auto 22px; }
.projects-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 17px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--yellow-ink);
  background-image: linear-gradient(198deg, #ffff7a, #fefe46 45%, #e6e62a);
  outline: 1px solid rgba(255, 255, 255, .6);
  outline-offset: -1px;
  box-shadow:
    -3px 3px 5px rgba(70, 62, 0, .18),
    -1px 1px 2px rgba(70, 62, 0, .25),
    inset 0 -2px 0 rgba(120, 110, 0, .18);
  margin-bottom: 15px;
}
.projects-head h2 {
  font-family: "Zimula", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin: 0;
}

/* rotating title — shown only in scroll mode; swaps per project with a
   clip (overflow mask): current slides up and out, next rises in its place */
.projects-rotating-title {
  display: none;
  position: relative;
  width: 100%;
  height: 2.5em;
  overflow: hidden;
  font-family: "Zimula", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -.8px;
  color: var(--ink);
}
.prt-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0;
  padding: 0 4px;
}

.projects-stage {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 1160px;
  margin: 0 auto;
}
.projects-scenes { display: flex; flex-direction: column; gap: 26px; }

/* ---------- one project panel ---------- */
.project-card {
  background: #fff;
  border-radius: 26px;
  padding: 38px clamp(26px, 3vw, 46px) 40px;
  box-shadow: 0 24px 60px -28px rgba(20, 40, 70, .22), 0 0 0 1px rgba(16, 24, 40, .04);
  max-width: 1160px;
  margin: 0 auto;
}

.project-title {
  margin: 0;
  font-family: "Zimula", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -.7px;
  color: var(--ink);
}

.project-row {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
  align-items: center;
}

.project-visual { position: relative; }
.project-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  filter: drop-shadow(0 22px 44px rgba(14, 24, 40, .18));
}

/* ---------- features: a clean grid split by thin divider lines ---------- */
.project-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.project-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 22px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
/* internal divider lines only — grayish, low opacity */
.project-features li:nth-child(n+3) { border-top: 1px solid rgba(16, 24, 40, .09); }
.project-features li:nth-child(even) { border-left: 1px solid rgba(16, 24, 40, .09); }
.project-features li:nth-child(odd) { padding-left: 2px; }
.project-features li b { font-weight: 700; color: var(--ink); display: block; margin-bottom: 2px; }
.project-features .feat-check {
  width: 24px;
  height: auto;
  flex: none;
  margin-top: 1px;
  display: block;
}

.project-card .btn-real { margin-top: 0; }

/* top row: title on the left, duration badge top-right */
.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.project-duration {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #f4f7fb;
  border: 1px solid rgba(16, 24, 40, .07);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.project-duration svg { width: 15px; height: 15px; flex: none; color: #0d7a38; }

/* bottom row: button on the left, client badge bottom-right */
.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.project-client { display: flex; align-items: center; gap: 11px; }
.pc-logo {
  flex: none;
  display: flex;
  align-items: center;
}
.pc-logo img { max-height: 50px; max-width: 120px; width: auto; height: auto; object-fit: contain; display: block; }
.pc-meta { display: flex; flex-direction: column; line-height: 1.25; }
.pc-meta b { font-size: 14px; font-weight: 700; color: var(--ink); }
.pc-meta span { font-size: 12.5px; color: var(--muted); }

/* ---------- scroll-through mode (enabled by JS when 2+ scenes) ---------- */
.projects.is-scroll { position: relative; }
.projects.is-scroll .projects-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* heading pinned at the top, travelling with the cards */
.projects.is-scroll .projects-head {
  flex: none;
  width: min(760px, 92%);
  margin: 0 auto;
  padding-top: clamp(16px, 3.5vh, 36px);
  padding-bottom: 4px;
}
.projects.is-scroll .projects-static-title { display: none; }
.projects.is-scroll .projects-rotating-title { display: block; }
.projects.is-scroll .projects-scenes {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.projects.is-scroll .project-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 20px 0;
  will-change: transform, opacity;
}
/* title lives in the pinned heading and the badge drops into the grid,
   so the whole top row of the card is gone → shorter card */
.projects.is-scroll .project-head { display: none; }
/* duration badge, now under the last feature of the first column */
.project-duration--grid {
  grid-column: 1;
  justify-self: start;
  align-self: start;
  margin-top: 18px;
  margin-left: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .projects.is-scroll .projects-stage { position: static; height: auto; overflow: visible; display: block; }
  .projects.is-scroll .projects-scenes { position: static; }
  .projects.is-scroll .project-scene { position: relative; inset: auto; display: block; padding: 0; }
  /* no scroll-synced rotation on mobile → fall back to per-card titles */
  .projects.is-scroll .projects-rotating-title { display: none; }
  .projects.is-scroll .projects-static-title { display: block; }
  .projects.is-scroll .project-title { display: block; }
  .projects.is-scroll .project-head { justify-content: space-between; }
  .project-row { grid-template-columns: 1fr; gap: 24px; }
  .project-visual { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 620px) {
  .project-features { grid-template-columns: 1fr; }
  /* one column: every row flush-left, divider only between rows */
  .project-features li { padding: 14px 2px; }
  .project-features li:nth-child(even) { border-left: none; }
  .project-features li:nth-child(odd) { padding-left: 2px; }
  .project-features li:first-child { border-top: none; }
  .project-features li:nth-child(n+2) { border-top: 1px solid rgba(16, 24, 40, .09); }
  .project-card { padding: 28px 20px 32px; border-radius: 20px; }
}
