/* GIFs: hub, occasion pages and the editor. Builds on product-landing.css. */

body.gifs-page:has(.lp-dock) .site-footer {
  padding-bottom: 108px;
}

/* ------------------------------------------------------------------ hero */

.gif-hero-art {
  display: block;
  justify-self: center;
  width: min(360px, 100%);
  transform: rotate(2.5deg);
  transition: transform 0.25s ease;
}
.gif-hero-art:hover { transform: rotate(0deg) scale(1.02); }
.gif-hero-card {
  border-radius: 8px;
  box-shadow: 0 30px 70px -20px rgba(10, 2, 20, 0.6);
}

/* ---------------------------------------------------------------- shelves */

.gif-shelf { padding: 64px 0 8px; }
.gif-shelf + .gif-shelf { padding-top: 40px; }
.gif-shelf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin: 0 0 26px;
}
.gif-shelf-head h2 {
  margin: 0;
  font: 600 clamp(28px, 3vw, 38px)/1.15 var(--serif);
  letter-spacing: -0.025em;
}
.gif-shelf-head p { margin: 0; flex-basis: 100%; color: var(--muted); }
.gif-shelf-links { flex-basis: 100%; justify-content: flex-start; margin: 10px 0 0; }
.gif-shelf-links:empty { display: none; }
.gif-shelf-all {
  color: var(--purple);
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 34px 26px;
}

.gif-tile { display: block; color: inherit; }
.gif-tile .gif-tile-card { border-radius: 6px; }
.gif-tile .mc-card { box-shadow: none; }
.gif-tile-title {
  margin: 14px 0 0;
  font: 600 20px/1.25 var(--serif);
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ steps */

.gif-steps { padding: 90px 0 30px; }
.gif-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.gif-steps-list li {
  background: var(--lp-band, #f6f1e8);
  border-radius: 18px;
  padding: 28px 26px 30px;
}
.gif-step-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font: 700 17px/1 var(--sans);
}
.gif-steps-list h3 { margin: 16px 0 6px; font: 600 22px/1.2 var(--serif); letter-spacing: -0.015em; }
.gif-steps-list p { margin: 0; color: var(--muted); font-size: 17px; }

.gif-cross { padding: 40px 0 0; }
.gif-cross p {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
}
.gif-cross a { color: var(--purple); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- editor */

.gif-editor { padding: 34px 0 40px; }

.gif-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.gif-stage { position: sticky; top: 96px; }
.gif-stage-card { border-radius: 8px; }
.gif-panel h1 {
  margin: 0 0 8px;
  font: 600 clamp(32px, 3.6vw, 46px)/1.08 var(--serif);
  letter-spacing: -0.03em;
}
.gif-panel > .lede { margin: 0 0 26px; color: var(--muted); font-size: 19px; }

.gif-step {
  border-top: 1px solid rgba(42, 16, 59, 0.1);
  padding: 22px 0 6px;
}
.gif-step h2 {
  margin: 0 0 12px;
  font: 600 21px/1.2 var(--serif);
  letter-spacing: -0.01em;
}
.gif-step .note { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.gif-field { display: block; margin: 0 0 12px; }
.gif-field span { display: block; font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.gif-field input {
  width: 100%;
  border: 1.5px solid rgba(42, 16, 59, 0.16);
  border-radius: 10px;
  padding: 11px 13px;
  font: 17px var(--sans);
  color: var(--ink);
  background: #fff;
}
.gif-field input:focus { outline: none; border-color: var(--purple); }

.gif-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gif-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(42, 16, 59, 0.18);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font: 600 15px/1.2 var(--sans);
  cursor: pointer;
}
.gif-chip:hover { border-color: var(--purple); }
.gif-chip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }

.gif-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.gif-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(42, 16, 59, 0.18);
  background: linear-gradient(135deg, var(--s1) 0 34%, var(--s2) 34% 67%, var(--s3) 67%);
  cursor: pointer;
  padding: 0;
}
.gif-swatch.is-on { box-shadow: 0 0 0 2.5px var(--purple); }

.gif-make { padding-top: 26px; }
.gif-make .btn { font-size: 17px; padding: 16px 30px; }
.gif-make .btn[disabled] { opacity: 0.7; cursor: progress; }
.gif-status { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.gif-status:empty { display: none; }
.gif-result {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--lp-band, #f6f1e8);
}
.gif-result img { width: 140px; border-radius: 6px; }
.gif-result p { margin: 0 0 10px; font-size: 16px; }
.gif-result .gif-actions .btn { padding: 11px 18px; }

.gif-more { margin-top: 56px; padding: 44px 0 10px; border-top: 1px solid rgba(58, 24, 79, 0.1); }

/* Crop dialog */
.gif-crop {
  width: min(460px, 94vw);
  border: 0;
  border-radius: 18px;
  padding: 24px 24px 18px;
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(42, 16, 59, 0.55);
}
.gif-crop::backdrop { background: rgba(42, 16, 59, 0.58); }
.gif-crop h2 { margin: 0; font: 600 25px/1.2 var(--serif); letter-spacing: -0.02em; }
.gif-crop p { margin: 6px 0 14px; color: var(--muted); font-size: 15px; }
.crop-view {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #1d1024;
  touch-action: none;
  cursor: grab;
  margin-bottom: 14px;
}
.crop-view:active { cursor: grabbing; }
.crop-view img {
  position: absolute;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
.crop-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 999px rgba(29, 16, 36, 0.6);
  pointer-events: none;
}
.crop-zoom { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.crop-zoom input { flex: 1; accent-color: var(--purple); }
.crop-zoom .gif-chip { width: 40px; justify-content: center; padding: 6px 0; font-size: 20px; }
.crop-actions { display: flex; gap: 10px; justify-content: flex-end; }
.crop-actions [data-crop="reset"] { margin-right: auto; }

.mc-photo-img { cursor: grab; touch-action: none; }

/* --------------------------------------------------------- feature rows */

.gif-feat {
  position: relative;
  aspect-ratio: 16 / 11;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
}
.gif-feat--purple {
  background: var(--hero-field);
  background-image: radial-gradient(circle at 50% 46%, rgba(243, 198, 61, 0.26), transparent 56%);
}
.gif-feat--cream {
  background: #fbf3e6;
  background-image: radial-gradient(circle at 50% 30%, rgba(243, 198, 61, 0.2), transparent 58%);
}
.gif-feat-card {
  width: auto;
  height: 86%;
  aspect-ratio: 3 / 4;
  transform: rotate(-2deg);
}
.lp-row--flip .gif-feat-card { transform: rotate(2deg); }
.gif-feat-card .mc-card { box-shadow: 0 22px 46px rgba(20, 6, 30, 0.32); }

.gif-feat:has(.gif-phone) { aspect-ratio: 16 / 12.6; }
.gif-phone {
  width: min(300px, 62%);
  height: 92%;
  margin-top: 8%;
  align-self: start;
  background: #efe7dc;
  border: 8px solid #1d1024;
  border-bottom: 0;
  border-radius: 34px 34px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 50px rgba(42, 16, 59, 0.22);
}
.gif-phone-head {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 10px;
  background: #1f6f5c;
  color: #fff;
  line-height: 1.2;
}
.gif-phone-head b { font-size: 15px; }
.gif-phone-head span { font-size: 11px; opacity: 0.8; }
.gif-phone-chat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 10px;
}
.gif-msg {
  margin: 0;
  max-width: 84%;
  padding: 7px 10px;
  background: #fff;
  border-radius: 4px 12px 12px 12px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink, #2a103b);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}
.gif-msg i {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  color: #b0476b;
}
.gif-msg--me {
  align-self: flex-end;
  background: #d8f6c8;
  border-radius: 12px 4px 12px 12px;
}
.gif-msg--gif {
  position: relative;
  width: 42%;
  padding: 4px;
}
.gif-msg--gif .mc-card { border-radius: 8px; box-shadow: none; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .gif-hero-art { width: min(300px, 80%); }
  .gif-steps-list { grid-template-columns: 1fr; }
  .gif-editor-grid { grid-template-columns: 1fr; gap: 28px; }
  .gif-stage { position: static; max-width: 380px; margin: 0 auto; width: 100%; }
}

@media (max-width: 560px) {
  .gif-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .gif-tile-title { font-size: 17px; }
  .gif-result { grid-template-columns: 1fr; }
  .gif-result img { width: 180px; }
}
