/* stampcutout.css — styles unique to the Stamp Cutout Effect case study.
   The shared case-study shell (rail, type, step flow, media, lightbox)
   lives in case-study.css; link that first. All values come from the
   design tokens in styles.css (source of truth: DESIGN_SYSTEM.md). */

/* ── Canvas formats: the two shapes the trend is shared in ───── */
/* Each frame is drawn to its real canvas ratio and carries the
   composition the trend uses: stamp cutout on top, photo below. */
.stamp-formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) auto;
}

.stamp-format {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.stamp-format__frame {
  width: 100%;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.stamp-format--post .stamp-format__frame {
  aspect-ratio: var(--ratio-ig-post);
}

.stamp-format--story .stamp-format__frame {
  aspect-ratio: var(--ratio-ig-story);
}

/* Top layer: the cutout, locked to the stamp's 17:12 frame */
.stamp-format__stamp {
  align-self: center;
  width: 55%;
  aspect-ratio: var(--ratio-stamp);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--color-accent);
}

/* Bottom layer: the original photo fills whatever the canvas leaves */
.stamp-format__photo {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-veil);
  border: 1px solid var(--glass-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--color-text-secondary);
}

.stamp-format__label {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  text-align: center;
}

.stamp-format__ratio {
  display: block;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
  margin-top: var(--space-1);
}

/* ── Resize constraints: the range the stamp is allowed to move in ── */
.stamp-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) auto;
}

.stamp-spec {
  background: var(--color-surface);
  border: 1px solid var(--glass-bg);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

/* The one value users can't change gets the accent edge */
.stamp-spec--locked {
  border-color: var(--color-accent);
}

.stamp-spec__label {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.stamp-spec__value {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
}

/* ── Desktop vs mobile input: same limits, different gestures ─── */
.stamp-devices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) auto;
}

.stamp-device {
  background: var(--color-surface);
  border: 1px solid var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.stamp-device .case-subheading {
  margin-top: 0;
}

.stamp-device .case-list {
  margin-bottom: 0;
}

/* ── The five design decisions: a stacked, scannable list ───── */
.stamp-decisions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: var(--space-8) auto;
}

.stamp-decision {
  background: var(--color-surface);
  border: 1px solid var(--glass-bg);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.stamp-decision__title {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.stamp-decision__desc {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
}

/* ── Portrait screen recording ───────────────────────────────── */
/* The mobile capture is 9:16; at full column width it would run
   1400px tall, so it's capped to read as a phone in the column. */
.stamp-phone {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Reflection: three lessons, equal weight ─────────────────── */
.stamp-lessons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  margin: var(--space-8) 0;
  align-items: start;
}

/* ── Tablet ──────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1100px) {
  .stamp-lessons {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stamp-formats,
  .stamp-specs,
  .stamp-devices,
  .stamp-lessons {
    grid-template-columns: 1fr;
  }

  .stamp-lessons {
    gap: var(--space-6);
  }

  .stamp-format,
  .stamp-device {
    padding: var(--space-6);
  }
}
