/* Ensure [hidden] always wins over component display rules */
[hidden] { display: none !important; }

/* ─────────────────────────────────────────────
   CSS VARIABLES — design tokens from Figma
   ───────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:        #060606;
  --color-bg-mobile: #000000;
  --color-white:     #ffffff;
  --color-grey:      #999999;
  --color-grey-80:   rgba(153,153,153,0.8);
  --color-grey-50:   rgba(153,153,153,0.5);
  --color-cyan:      #1abc9c;
  --color-oxford:    #374151;
  --color-border:    #1f1f1f;
  --color-purple:        #7c3aed; /* progress bar fill */
  --color-purple-accent: #7B6EF6; /* pricing card accent — checkmarks, badges, includes */

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --header-h:     68px;
  --page-px:      16px;
  --section-gap:  60px;
  --card-w:       280px;
  --card-h:       350px;
  --card-gap:     24px;
}

/* ─────────────────────────────────────────────
   RESET / BASE
   ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }
img { display: block; }

/* ─────────────────────────────────────────────
   BANNER — white announcement strip
   ───────────────────────────────────────────── */
.banner {
  background: #9189F9;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 36px;
  width: 100%;
}

.banner-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.banner-icon {
  display: inline-block;
  flex-shrink: 0;
}

/* Force SVG icon fill to match banner text color */
.banner-icon path {
  fill: #111111;
}

/* ─────────────────────────────────────────────
   HEADER — sticky nav bar
   ───────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000;
  border-bottom: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--page-px);
  overflow: hidden;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  align-items: stretch;  /* children fill the container width set by LART */
  flex-shrink: 0;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 36px;
  color: var(--color-white);
  white-space: nowrap;
}

.logo-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 8px;
  line-height: 15px;
  color: var(--color-grey);
  display: block;           /* required for text-align: justify */
  text-align: justify;
  text-align-last: justify; /* spread to fill full LART width */
}

/* ─────────────────────────────────────────────
   TOGGLE PILL — Portrait / Landscape switcher
   ───────────────────────────────────────────── */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
}

/* Outer frosted pill container */
.toggle-pill {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 5px;
  border-radius: 9999px;
  background: rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  height: 100%;
}

/* Individual toggle button */
.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  /* line-height:1 collapses the text box to cap-height so flex
     align-items:center produces true optical centering, not
     pseudo-center skewed by leading above/below glyphs */
  line-height: 1;
  color: rgba(255,255,255,0.9);
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

/* Active state: filled cyan */
.toggle-btn--active {
  background: var(--color-cyan);
  color: var(--color-white);
}

.toggle-icon {
  flex-shrink: 0;
  color: inherit;
}

/* Header right slot (menu icon) */
.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 96px;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 40px;
  border-radius: 10px;
}

/* ─────────────────────────────────────────────
   MAIN CONTENT — progress + hero + upload + trustpilot
   ───────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding-top: 0;
}

/* ── Progress steps ── */
.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 60px; /* section gap from header */
}

.progress-step {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
}

.progress-step--active {
  color: var(--color-white);
  font-weight: 500;
}

.progress-step--dim {
  color: var(--color-grey);
  font-weight: 400;
}

/* "Choose style" is medium-weight but grey */
.progress-step:nth-child(3) {
  font-weight: 500;
}

.progress-chevron {
  flex-shrink: 0;
}

/* ── Hero section ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 60px;
  line-height: 60px;
  color: var(--color-white);
  text-align: center;
  white-space: nowrap;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-grey-80);
  text-align: center;
  width: 100%;
}

/* ── Upload zone ── */
.upload-zone {
  width: 896px;
  min-height: 150px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 21px 49px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.upload-zone:hover,
.upload-zone:focus-visible {
  border-color: rgba(255,255,255,0.3);
  outline: none;
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

/* Icon box: rounded-12 border */
.upload-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon-box {
  width: 48px;
  height: 48px;
  border: 1px solid #999;
  border-radius: 12px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* Small + badge overlaid top-right of icon box */
.upload-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 15px;
  height: 15px;
  background: #6a6a6a;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.35px;
  color: var(--color-white);
  text-align: center;
}

.upload-hint {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-grey-50);
  text-align: center;
}

/* ── Trustpilot badge ── */
.trustpilot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 9px;
}

.trustpilot-score {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 18px;
  color: var(--color-white);
  text-decoration: underline;
  white-space: nowrap;
}

.trustpilot-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100px;
  height: 18px;
  flex-shrink: 0;
}

.tp-star {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.trustpilot-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   GALLERY — horizontal carousel
   ───────────────────────────────────────────── */
.gallery {
  width: 100%;
  padding-bottom: 240px;
  /* section gap between main and gallery */
  margin-top: calc(var(--section-gap) - 24px); /* 60px total - existing 24px main gap */
}

/* Viewport: clips overflow to create carousel window */
.carousel-viewport {
  width: 100%;
  overflow: hidden;
}

/* Track: flex row of all cards, transform drives scroll */
.carousel-track {
  display: flex;
  gap: var(--card-gap);
  /* padding-left aligns first card to a comfortable inset */
  padding-left: calc((100% - (var(--card-w) * 4 + var(--card-gap) * 3)) / 2);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Individual card */
.carousel-item {
  flex-shrink: 0;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 12px;
  overflow: hidden;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  /* smooth appearance on load */
  transition: opacity 0.3s ease;
}

/* ─────────────────────────────────────────────
   TABLET — < 1024px
   ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  :root {
    --card-w: 224px;
    --card-h: 280px;
    --card-gap: 12px;
  }

  /* Upload zone matches tablet Figma width */
  .upload-zone {
    width: 736px;
  }

  .hero-title {
    font-size: 60px;
    line-height: 60px;
  }

  /* Center track for 3 visible cards */
  .carousel-track {
    padding-left: calc((100% - (var(--card-w) * 3 + var(--card-gap) * 2)) / 2);
  }
}

/* ─────────────────────────────────────────────
   MOBILE — ≤ 767px  (all phones up to small tablet)
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --header-h: 56px;
    --card-w: 163px;
    --card-h: 204px;
    --card-gap: 12px;
  }

  body {
    background: var(--color-bg-mobile);
  }

  /* Banner: show only 2 items on mobile */
  .banner {
    padding: 0 16px;
    height: 32px;
    gap: 20px;
  }

  .banner-item--hide-mobile {
    display: none;
  }

  /* Header: smaller */
  .header {
    height: var(--header-h);
    padding: 0 16px 0 16px;
  }

  /* Logo smaller on mobile */
  .logo-name {
    font-size: 28px;
    line-height: 32px;
  }

  .logo-tagline {
    font-size: 7px;
  }

  /* Toggle pill: smaller padding and text */
  .toggle-wrapper {
    height: 34.5px;
  }

  .toggle-pill {
    gap: 2px;
    padding: 3px;
  }

  .toggle-btn {
    gap: 4px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1;
  }

  .toggle-icon {
    width: 12px;
    height: 12px;
  }

  /* Hide header-end on mobile (no menu icon) */
  .header-end {
    display: none;
  }

  /* Main: tighter padding */
  .progress {
    padding-top: 32px;
    gap: 3px;
    flex-wrap: nowrap;
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
    overflow: hidden;   /* clip any overflow — keeps it strictly one line */
  }

  .progress-step {
    font-size: 11px;
    line-height: 14px;
  }

  /* Hero title: smaller */
  .hero-title {
    font-size: 36px;
    line-height: 42px;
    white-space: normal;
    padding: 0 16px;
  }

  .hero-subtitle {
    font-size: 12px;
    line-height: 16px;
    padding: 0 16px;
  }

  /* Upload zone: fluid on mobile */
  .upload-zone {
    width: calc(100% - 32px);
    max-width: 480px;
    padding: 21px 24px;
  }

  /* Gallery: 2 cards visible on mobile */
  .carousel-track {
    padding-left: calc((100% - (var(--card-w) * 2 + var(--card-gap))) / 2);
  }

  .gallery {
    padding-bottom: 80px;
    margin-top: 32px;
  }
}

/* ─────────────────────────────────────────────
   BETWEEN mobile and desktop: 768px – 1023px
   ───────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
  .upload-zone {
    max-width: 736px;
    width: calc(100% - 32px);
  }
}

/* ─────────────────────────────────────────────
   ABOVE desktop threshold
   ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  .upload-zone {
    width: 896px;
  }
}

/* ─────────────────────────────────────────────
   HIDDEN FILE INPUT
   ───────────────────────────────────────────── */
#file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   UPLOAD PROGRESS STATE
   Replaces the upload-inner without layout jump.
   Both inner + progress share the same container
   height; we cross-fade between them.
   ───────────────────────────────────────────── */
.upload-inner,
.upload-progress {
  /* Occupy the same space in the flex container */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease;
}

/* Progress starts hidden */
.upload-progress {
  gap: 8px;
  padding: 0 40px;
  display: none;       /* toggled to flex by JS */
}

/* When progress is active */
.upload-zone--uploading .upload-inner {
  display: none;
}
.upload-zone--uploading .upload-progress {
  display: flex;
}

/* Filename label */
.upload-progress-filename {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--color-white);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Track (grey background) */
.upload-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
}

/* Fill (purple, animated by JS via inline width) */
.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-purple);
  border-radius: 9999px;
  /* JS drives width directly; no CSS transition needed
     since we're animating with requestAnimationFrame */
}

/* Percentage label */
.upload-progress-pct {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-grey);
  letter-spacing: 0.3px;
}

/* ─────────────────────────────────────────────
   PAGE FADE TRANSITIONS
   Page 1 fades out → Page 2 fades in
   ───────────────────────────────────────────── */
/* Fade-out class added by JS before navigation */
body.page-exit {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Fade-in on page load (Page 2) */
body.page-enter {
  animation: page-fade-in 0.4s ease forwards;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─────────────────────────────────────────────
   RESULT PAGE — hero title variant
   Desktop: one-liner (60px), whitespace:nowrap
   Tablet:  wraps to two lines
   Mobile:  three lines at 36px
   ───────────────────────────────────────────── */
.hero-title--result {
  font-size: 60px;
  line-height: 60px;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────
   STYLE CARDS SECTION (Page 2)
   ───────────────────────────────────────────── */
.style-section {
  width: 100%;
  padding-bottom: 240px;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Empty state — shown when no CRM styles exist */
.style-empty {
  padding: 60px 32px;
  text-align: center;
  color: #999;
  font-size: 15px;
  font-family: var(--font-body);
}

/*
  Desktop: 3 columns × 2 rows, fixed 280px cards
  2 separate rows of 3 (matching Figma layout)
*/
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 280px);
  grid-template-rows: repeat(2, 350px);
  gap: 24px;
}

/* Individual style card */
.style-card {
  position: relative;
  width: 280px;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  /* base transition for the lift on desktop hover */
  transition: transform 0.25s ease;
}

.style-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: opacity 0.25s ease;
}

/*
  "Use This Style" pill button — frosted glass overlay
  Matches Figma: backdrop-blur 2px, bg rgba(0,0,0,0.6),
  border rgba(38,38,38,0.4), px-11 py-7, border-radius 9999px
*/
.style-card-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(38, 38, 38, 0.4);
  border-radius: 9999px;
  padding: 7px 11px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  /* pointer-events off: click goes to card, not the button */
  pointer-events: none;
}

/* Text span inside the button — kept separate so counter-scale works */
.style-card-btn-text {
  display: inline-block;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.style-card-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ─────────────────────────────────────────────
   STYLE CARD — DESKTOP HOVER EFFECTS
   @media (hover: hover) ensures these NEVER fire
   on touch / mobile devices.
   ───────────────────────────────────────────── */
@media (hover: hover) {
  /* Lift card slightly — subtle premium feel */
  .style-card:not(.style-card--disabled):not(.style-card--selected):hover {
    transform: translateY(-2px);
  }

  /* Image dims to 0.9 opacity */
  .style-card:not(.style-card--disabled):not(.style-card--selected):hover .style-card-img {
    opacity: 0.9;
  }

  /* Button scales up 10% — using translateX(-50%) to keep it centred */
  .style-card:not(.style-card--disabled):not(.style-card--selected):hover .style-card-btn {
    transform: translateX(-50%) scale(1.1);
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 255, 255, 0.2);
  }

  /* Counter-scale the text span so font-size stays visually unchanged */
  .style-card:not(.style-card--disabled):not(.style-card--selected):hover .style-card-btn-text {
    transform: scale(0.909); /* 1 / 1.1 = 0.909 */
  }
}

/* ── Tablet: 3 cards in fluid grid, max 736px ── */
@media (max-width: 1023px) {
  .hero-title--result {
    font-size: 60px;
    line-height: 60px;
    white-space: normal;
    text-align: center;
  }

  .style-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    max-width: 736px;
    width: calc(100% - 32px);
    gap: 12px;
  }

  .style-card {
    width: 100%;
    height: auto;
    aspect-ratio: 282 / 353;
  }

  .style-section {
    padding-bottom: 160px;
  }
}

/* ── Mobile: 2-column grid ── */
@media (max-width: 767px) {
  .hero-title--result {
    font-size: 36px;
    line-height: 42px;
    white-space: normal;
    padding: 0 16px;
    text-align: center;
  }

  .style-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: calc(100% - 32px);
    gap: 12px;
  }

  .style-section {
    padding-bottom: 80px;
    margin-top: 32px;
    gap: 12px;
  }
}

/* ─────────────────────────────────────────────
   STYLE CARD — SELECTION & DISABLED STATES
   Applied when user clicks "Use This Style"
   ───────────────────────────────────────────── */

/* Selected: image dims to near-black */
.style-card--selected .style-card-img {
  opacity: 0.15;
  transition: opacity 0.4s ease;
}

/* Dark overlay on top of selected card */
.style-card--selected::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
}

/* Other cards fade out and become unclickable */
.style-card--disabled {
  pointer-events: none;
}

.style-card--disabled .style-card-img {
  opacity: 0.4;
  transition: opacity 0.4s ease;
  filter: grayscale(0.3);
}

.style-card--disabled .style-card-btn {
  opacity: 0.25;
  transition: opacity 0.4s ease;
}

/* Lock the whole grid once a selection is made */
.style-grid--locked .style-card-btn {
  pointer-events: none;
  cursor: default;
}

/* ─────────────────────────────────────────────
   PROCESSING OVERLAY — full-screen AI state
   Shown after "Use This Style" click
   ───────────────────────────────────────────── */
.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-fade-in 0.5s ease forwards;
}

.processing-overlay[hidden] {
  display: none;
}

@keyframes overlay-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.processing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 320px;
  padding: 0 16px;
}

/* Three-dot pulse loader */
.processing-dots {
  display: flex;
  gap: 8px;
}

.processing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-purple);
  animation: dot-pulse 1.4s ease-in-out infinite both;
}

.processing-dots span:nth-child(2) { animation-delay: 0.16s; }
.processing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40%           { opacity: 1;    transform: scale(1); }
}

/* Status message fades between states via JS opacity toggle */
.processing-status {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  color: var(--color-white);
  text-align: center;
  min-height: 22px;
  transition: opacity 0.3s ease;
}

/* Thin progress bar — same visual language as upload bar */
.processing-bar-wrap {
  width: 100%;
}

.processing-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: hidden;
}

.processing-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--color-purple);
  border-radius: 9999px;
}

.processing-pct {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-grey);
  letter-spacing: 0.3px;
}

/* ─────────────────────────────────────────────
   PAGE 3 — MASTERPIECE LAYOUT
   ───────────────────────────────────────────── */

/* Main: stack tightly, let child gaps control spacing */
.main--masterpiece {
  gap: 0;
  padding-top: 60px;  /* matches progress section-gap */
}

.main--masterpiece .progress {
  padding-top: 0;
  margin-bottom: 32px;
}

.main--masterpiece .hero-title--masterpiece {
  margin-bottom: 0;
}

/* ── Preview card ── */
.masterpiece-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
  margin-top: 40px;
}

.preview-card {
  position: relative;
  width: 600px;
  min-height: 400px;
  background: #141414;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-card-img {
  width: 100%;
  height: auto;
  min-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.preview-card-actions {
  position: absolute;
  top: 12px;
  right: 10px;
}

.preview-retry-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(38, 38, 38, 0.4);
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: background 0.2s ease;
}

.preview-retry-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ── "Choose Your Format" heading ── */
.format-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 36px;
  color: var(--color-white);
  text-align: center;
}

/* ── Pricing section ── */
.pricing-section {
  width: 100%;
  padding-bottom: 240px;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;   /* all cards grow to equal height */
  width: 1100px;
  gap: 32px;
}

/* ── Individual pricing card ── */
.pricing-card {
  position: relative;
  background: #000;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 33px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Large Canvas card — deep muted indigo */
.pricing-card--canvas {
  background: #171623;
  box-shadow:
    0 0 0 1px rgba(123, 110, 246, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.05);
  border-color: transparent;
}

/* Badge floats above card top edge */
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 9999px;
  padding: 2px 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: white;
  white-space: nowrap;
}

/* Card 1 "Most Popular" — white pill with purple text */
.pricing-badge--popular {
  background: var(--color-white);
  color: var(--color-purple-accent);
}

/* Card 3 "The Perfect Gift" — solid purple accent */
.pricing-badge--gift {
  background: var(--color-purple-accent);
  color: var(--color-white);
}

/* Card inner sections */
.pricing-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.pricing-icon {
  display: flex;
  justify-content: center;
  width: 100%;
}

.pricing-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 36px;
  color: white;
  text-align: center;
  white-space: normal;
}

/* Price display */
.pricing-price {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.pricing-price-old {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: #999;
  text-decoration: line-through;
  text-decoration-skip-ink: none;
  margin-bottom: 2px;
}

.pricing-price-new {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 36px;
  line-height: 40px;
  color: white;
}

/* Countdown row */
.pricing-expires {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: white;
  width: 100%;
}

.pricing-expires-time {
  font-weight: 700;
}

/* Description text */
.pricing-desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #999;
  text-align: center;
  width: 100%;
}

/* Feature list */
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  list-style: none;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: #999;
}

.pricing-feature-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* All checkmark SVGs use the unified purple accent — overrides inline stroke="#1abc9c" */
.pricing-feature-icon svg path {
  stroke: var(--color-purple-accent);
}

/* Size select dropdown */
.pricing-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.pricing-select-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: #999;
}

.pricing-select {
  width: 100%;
  background: #000;
  border: 1px solid #262626;
  border-radius: 4px;
  padding: 7px 32px 7px 9px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: white;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6.5l4 3.5 4-3.5' stroke='%23999999' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}

.pricing-select:focus {
  outline: 1px solid #444;
}

/* Shipping highlight box */
.pricing-shipping {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(26, 188, 156, 0.05);
  border: 1px solid rgba(26, 188, 156, 0.1);
  border-radius: 10px;
  width: 100%;
}

.pricing-shipping-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pricing-shipping-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: white;
}

.pricing-shipping-title .muted {
  font-weight: 400;
  color: #999;
}

.pricing-shipping-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #999;
}

/* "+ Includes digital download" note */
.pricing-includes {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-purple-accent);
  width: 100%;
}

/* CTA button — pushed to bottom via mt-auto wrapper */
.pricing-cta-wrap {
  margin-top: auto;
}

.pricing-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  min-height: 36px;
  background: white;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: black;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.pricing-cta:hover {
  background: #9189F9;
  color: white;
  opacity: 1;
}

/* ── Page 3 hero title variant ── */
.hero-title--masterpiece {
  font-size: 60px;
  line-height: 60px;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────
   PAGE 3 — RESPONSIVE
   ───────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1023px) {
  .hero-title--masterpiece {
    font-size: 46px;
    line-height: 54px;
    white-space: normal;
    text-align: center;
  }

  .preview-card {
    width: 100%;
    max-width: 600px;
  }

  .masterpiece-preview {
    padding: 0 16px;
    box-sizing: border-box;
    gap: 40px;
  }

  /* Tablet: 2-col, then canvas full-width centered */
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
    width: auto;
    max-width: 736px;
    margin: 0 24px;
    gap: 24px;
  }

  .pricing-card--canvas {
    grid-column: 1 / -1;
    max-width: 448px;
    justify-self: center;
    width: 100%;
  }

  .pricing-section {
    padding-bottom: 160px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .hero-title--masterpiece {
    font-size: 36px;
    line-height: 42px;
    white-space: normal;
    text-align: center;
    padding: 0 16px;
  }

  .preview-card {
    width: 100%;
    max-width: 480px;
  }

  .masterpiece-preview {
    padding: 0 16px;
    gap: 32px;
  }

  .format-heading {
    font-size: 24px;
    line-height: 30px;
  }

  /* Mobile: single column */
  .pricing-grid {
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    max-width: 480px;
    margin: 0 auto;
    gap: 24px;
  }

  .pricing-card--canvas {
    grid-column: auto;
    max-width: 100%;
    justify-self: stretch;
  }

  .pricing-section {
    padding-bottom: 80px;
    margin-top: 32px;
  }

  .main--masterpiece {
    padding-top: 32px;
  }
}

/* ─────────────────────────────────────────────
   CUSTOM SELECT DROPDOWN
   Replaces native <select> on pricing cards.
   Dark theme, blue active state, chevron rotation.
   ───────────────────────────────────────────── */

.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
}

/* Trigger button — looks like old native select */
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #000;
  border: 1px solid #262626;
  border-radius: 4px;
  padding: 7px 9px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: white;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}

.custom-select-trigger:hover {
  border-color: #3f3f3f;
}

.custom-select--open .custom-select-trigger {
  border-color: #555;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Chevron rotates on open */
.custom-select-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.custom-select--open .custom-select-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.custom-select-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0d0d0d;
  border: 1px solid #555;
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  list-style: none;
}

.custom-select--open .custom-select-menu {
  display: block;
  animation: select-in 0.12s ease;
}

@keyframes select-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Option row */
.custom-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.1s ease;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Selected option — blue tint + checkmark visible */
.custom-select-option--selected {
  background: rgba(59, 130, 246, 0.18);
  color: white;
}

.custom-select-option--selected:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* Checkmark icon (hidden by default, visible on selected) */
.custom-select-check {
  flex-shrink: 0;
  opacity: 0;
  width: 14px;
  height: 14px;
}

.custom-select-option--selected .custom-select-check {
  opacity: 1;
}

/* ─────────────────────────────────────────────
   CHECKOUT PAGE
   Simple order-confirmation layout
   ───────────────────────────────────────────── */
.checkout-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 60px 16px 120px;
}

.checkout-card {
  width: 100%;
  max-width: 520px;
  background: #0d0d0d;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.checkout-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 36px;
  line-height: 40px;
  color: white;
  text-align: center;
}

.checkout-subheading {
  font-family: var(--font-body);
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-top: -24px;
}

/* Order summary rows */
.checkout-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #1f1f1f;
  border-bottom: 1px solid #1f1f1f;
  padding: 20px 0;
}

.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 14px;
  color: #999;
}

.checkout-row--total {
  font-weight: 700;
  font-size: 16px;
  color: white;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid #1f1f1f;
}

.checkout-row-label { }
.checkout-row-value { color: white; }

/* Product badge in summary */
.checkout-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.checkout-product-badge--download { background: rgba(145, 137, 249, 0.15); color: #9189F9; }
.checkout-product-badge--print    { background: rgba(255, 255, 255, 0.08); color: white; }
.checkout-product-badge--canvas   { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

/* Main CTA */
.checkout-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: white;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: black;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.checkout-cta:hover {
  background: #9189F9;
  color: white;
}

/* Processing state */
.checkout-cta--processing {
  pointer-events: none;
  background: #1f1f1f;
  color: #666;
}

/* Success state overlay — shown after "place order" */
.checkout-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 8px 0;
}

.checkout-success--visible {
  display: flex;
}

.checkout-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(26, 188, 156, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.checkout-success-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  font-style: italic;
  color: white;
}

.checkout-success-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: #999;
  line-height: 22px;
}

.checkout-back-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: #555;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s ease;
}

.checkout-back-link:hover { color: #999; }

/* Security note */
.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  color: #555;
  text-align: center;
}

@media (max-width: 767px) {
  .checkout-card {
    padding: 28px 20px;
  }
  .checkout-heading {
    font-size: 28px;
    line-height: 34px;
  }
}

/* ─────────────────────────────────────────────
   CHECKOUT PAGE — extended styles
   ───────────────────────────────────────────── */

/* Page wrapper */
.checkout-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 100px); /* fill viewport below header */
  padding: 56px 16px 80px;
  gap: 0;
}

/* Card header row (icon + title stack) */
.checkout-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.checkout-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 26px;
  line-height: 32px;
  color: white;
  margin: 0;
}

.checkout-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: #777;
  margin: 6px 0 0;
}

/* Summary line items (JS-generated) */
.checkout-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: white;
}

.checkout-line--sub {
  font-size: 13px;
  color: #666;
  padding-top: 0;
}

.checkout-line-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.checkout-line-name {
  font-weight: 500;
}

.checkout-line-detail {
  font-size: 12px;
  color: #666;
}

.checkout-line-price {
  font-weight: 600;
  white-space: nowrap;
}

/* Divider */
.checkout-divider {
  border: none;
  border-top: 1px solid #1f1f1f;
  margin: 0;
}

/* Total row */
.checkout-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
}

.checkout-total-label {
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.checkout-total-price {
  font-size: 22px;
  font-weight: 700;
  color: white;
}

/* Trust badges row */
.checkout-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  color: #555;
}

/* Override hardcoded teal SVG strokes in trust badges */
.checkout-trust-item svg * {
  stroke: #9189F9;
}

/* Utility: muted text */
.muted {
  color: #555;
}

/* Success state */
.checkout-success-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  width: 100%;
  max-width: 520px;
  padding: 20px 0;
}

.checkout-success-circle {
  animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* SVG stroke animations for the checkmark */
.success-ring {
  stroke-dasharray: 165;
  stroke-dashoffset: 165;
  animation: draw-ring 0.5s ease forwards 0.1s;
}

.success-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw-check 0.35s ease forwards 0.5s;
}

@keyframes draw-ring {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

/* Error / high-traffic icon overrides */
.error-ring {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.error-cross {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw-check 0.3s ease forwards 0.3s;
}

.checkout-success-msg {
  font-family: var(--font-body);
  font-size: 14px;
  color: #999;
  line-height: 22px;
  max-width: 380px;
}

.checkout-cta--success {
  text-decoration: none;
  margin-top: 8px;
}

@media (max-width: 767px) {
  .checkout-section {
    padding: 32px 16px 60px;
  }
  .checkout-card {
    padding: 28px 20px;
    gap: 24px;
  }
  .checkout-trust {
    gap: 12px;
  }
}
