/* CraftForms — landing pages (WooCommerce personalization, coupon). Builds on home.css. */

.lp-section {
  padding-block: var(--section-pad);
}

.lp-hero {
  padding-bottom: var(--section-pad);
}

.lp-hero .hero__title {
  max-width: 16ch;
  font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4.25rem);
}

/* ---------- live configurator ---------- */

.lp-demo {
  display: grid;
  gap: 28px;
  margin-top: clamp(32px, 4vw, 56px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.lp-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.lp-field legend {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
}

.swatch {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch__face {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--rule);
  border-radius: var(--die);
  background: var(--floor);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.swatch__face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.35);
}

.swatch__label {
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
}

.swatch:hover .swatch__face {
  border-color: var(--ink-3);
}

.swatch input:checked + .swatch__face {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--green);
}

.swatch input:focus-visible + .swatch__face {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.lp-preview {
  margin: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.lp-preview__stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--die);
  background:
    radial-gradient(circle at 50% 45%, var(--stock) 0 38%, transparent 70%),
    var(--floor-2);
}

.lp-preview__stage img {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  object-fit: contain;
  transition: opacity 220ms var(--ease-out);
}

.lp-preview figcaption {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.lp-preview figcaption .label-caps {
  margin-right: 6px;
  font-size: 0.75rem;
  color: var(--green-ink);
}

@media (min-width: 960px) {
  .lp-demo {
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }

  .lp-preview {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

/* ---------- sections ---------- */

.lp-split {
  display: grid;
  gap: 32px;
}

@media (min-width: 1000px) {
  .lp-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

.lp-sheet {
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--die);
  background: var(--stock);
  box-shadow: 0 1px 1px oklch(0.22 0.05 152 / 0.12), 0 10px 26px -14px oklch(0.22 0.05 152 / 0.45);
}

.lp-sheet > p {
  color: var(--ink-2);
}

.lp-sheet .contents {
  margin-top: 18px;
}

.lp-points {
  display: grid;
  border-top: 2px solid var(--ink);
}

.lp-points li {
  padding: 16px 0;
  border-bottom: 1px dashed var(--rule-strong);
  color: var(--ink-2);
}

.lp-points strong {
  color: var(--ink);
  font-weight: 760;
}

.lp-more {
  margin-top: 28px;
}

.lp-videos-section {
  background: var(--floor-2);
}

.lp-videos {
  display: grid;
  gap: 18px;
  margin-top: clamp(32px, 4vw, 48px);
}

.lp-video {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: var(--die);
  background: var(--stock);
  box-shadow: var(--shadow-label);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.lp-video:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--amber), var(--shadow-label);
}

.lp-video img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lp-video__body {
  display: grid;
  gap: 6px;
  padding: 18px 20px 20px;
  border-top: 2px dashed var(--rule);
}

.lp-video__body strong {
  font-size: 1.1875rem;
  font-weight: 780;
  line-height: 1.25;
}

.lp-video__body > span {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.lp-video__tags {
  margin-top: 4px;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-size: 0.75rem !important;
  color: var(--green-ink) !important;
}

@media (min-width: 760px) {
  .lp-videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lp-facts-section {
  padding-block: clamp(48px, 6vw, 80px);
}

.lp-facts {
  display: grid;
  margin: 0;
  border-radius: var(--die);
  background: var(--stock);
  box-shadow: var(--shadow-label);
}

.lp-facts > div {
  padding: 22px 24px;
  border-bottom: 1px dashed var(--rule);
}

.lp-facts > div:last-child {
  border-bottom: 0;
}

.lp-facts dt {
  font-size: 1.125rem;
  font-weight: 780;
}

.lp-facts dd {
  margin: 6px 0 0;
  color: var(--ink-2);
}

.lp-facts a {
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 900px) {
  .lp-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lp-facts > div {
    border-bottom: 0;
    border-right: 1px dashed var(--rule);
  }

  .lp-facts > div:last-child {
    border-right: 0;
  }
}

/* ---------- coupon ---------- */

.coupon {
  padding-block: clamp(32px, 5vw, 72px) clamp(24px, 3vw, 40px);
}

.coupon__grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.coupon__title {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.75rem);
  font-stretch: 112%;
  font-weight: 860;
  letter-spacing: -0.036em;
  line-height: 0.92;
  max-width: 13ch;
}

.coupon__copy .hero__lede {
  margin-top: 22px;
}

.coupon-label {
  display: grid;
  gap: 14px;
  padding: 18px 22px 20px;
  border-radius: var(--die);
  background: var(--amber);
  box-shadow: var(--shadow-label);
  transform: rotate(-1.2deg);
}

.coupon-label__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px dashed oklch(0.22 0.03 152 / 0.45);
  font-size: 0.8125rem;
}

.coupon-label__value {
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  font-weight: 880;
  font-stretch: 90%;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.coupon-label__value .mono {
  font-weight: 700;
  font-stretch: 80%;
}

.coupon-label__code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--stock);
}

.coupon-label__code .label-caps {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.coupon-label__code code {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.coupon-label__code .btn {
  margin-left: auto;
}

.coupon-label__fine {
  font-size: 0.875rem;
  font-weight: 600;
}

.coupon-label .barcode {
  height: 24px;
}

@media (min-width: 960px) {
  .coupon__grid {
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 64px;
  }
}

.lp-preview__stage {
  width: 100%;
  max-width: 520px;
}

/* One amber action: the demo label is secondary */
.lp-hero .franked {
  background: var(--stock);
}

.lp-hero .franked:hover {
  background: var(--floor-2);
}
