/* Product showcase sections (problem / approach / gallery) */

.problem {
  background: var(--bg-page);
}
.problem__grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.problem__card {
  background: var(--bg-card);
  border-radius: var(--r-card);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.problem__quote {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}
.problem__quote::before {
  content: "“";
  display: block;
  font-family: Georgia, serif;
  font-size: 56px;
  color: var(--olive);
  line-height: 0.4;
  margin-bottom: 8px;
}
.problem__label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive-deep);
  font-weight: 700;
}
.problem__desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Approach: 3-column pillars ───────────────────────────── */
.approach {
  background: var(--bg-cream);
}
.approach__grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--bg-card);
  border-radius: var(--r-card);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.pillar__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-chip);
  background: var(--olive-soft);
  display: grid;
  place-items: center;
  color: var(--olive-deep);
  margin-bottom: 8px;
}
.pillar__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.pillar__en {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.pillar__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.pillar__bullets {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.pillar__bullets li { list-style: none; padding-left: 18px; position: relative; }
.pillar__bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 1.5px;
  background: var(--olive);
}

/* ── Screen gallery ──────────────────────────────────────── */
.gallery {
  background: var(--bg-page);
}
.gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.gallery__tag {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.thumb {
  background: var(--bg-card);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  transition: transform var(--t-quick) var(--ease-out),
              box-shadow var(--t-quick) var(--ease-out);
}
.thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}
.thumb__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-cream);
  overflow: hidden;
}
.thumb__frame iframe {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: 0;
  pointer-events: none;
  /* mask the inset rounded corners on the embedded iPhone */
}
.thumb__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15, 36, 25, 0.45) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: var(--bg-card);
  pointer-events: none;
}
.thumb__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.thumb__caption-en {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}
.thumb__caption-cn {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ── Modal — full-screen iframe ───────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 36, 25, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.modal.is-open { display: flex; }
.modal__inner {
  width: 100%;
  max-width: 460px;
  height: min(92vh, 920px);
  background: var(--bg-cream);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}
/* Wide variant — used when the embedded prototype is a desktop-oriented
   page (e.g. App Icon spec sheets that span ~900px). The default 460px
   modal compresses those into illegible flex-wrap. */
.modal__inner.is-wide {
  max-width: 940px;
}
.modal__inner iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--bg-cream);
  font-size: 20px;
  display: grid;
  place-items: center;
  z-index: 110;
  transition: background var(--t-quick) var(--ease-out);
}
.modal__close:hover { background: rgba(255, 255, 255, 0.2); }
.modal__caption {
  position: absolute;
  bottom: 32px;
  left: 32px;
  color: var(--bg-cream);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 105;
}

@media (max-width: 960px) {
  .problem__grid, .approach__grid { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .gallery__grid { grid-template-columns: 1fr; }
}
