:root {
  --bg: #f4efe7;
  --bg-soft: #fbf8f3;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-solid: #fffaf4;
  --line: rgba(82, 61, 41, 0.12);
  --line-strong: rgba(82, 61, 41, 0.22);
  --text: #261a12;
  --muted: #766351;
  --accent: #ffb11f;
  --accent-deep: #d88a00;
  --accent-soft: rgba(255, 177, 31, 0.12);
  --shadow-lg: 0 30px 70px rgba(79, 59, 37, 0.1);
  --shadow-md: 0 16px 38px rgba(79, 59, 37, 0.08);
  --radius-xxl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 177, 31, 0.14), transparent 22%),
    radial-gradient(circle at 86% 20%, rgba(216, 138, 0, 0.1), transparent 18%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(100%, 1640px);
  margin: 0 auto;
  padding: 22px clamp(14px, 2.4vw, 36px) 34px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.78fr);
  gap: 22px;
  align-items: stretch;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--radius-xxl);
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 182px;
  color: var(--text);
  flex: 0 0 auto;
}

.hero-logo svg {
  width: 100%;
  height: auto;
}

.hero-brand-text {
  display: grid;
  gap: 4px;
}

.eyebrow,
.section-kicker,
.product-block-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-deep);
}

.hero-brand-text span {
  color: var(--muted);
  font-size: 15px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-text {
  margin: 0;
  max-width: 63ch;
  color: var(--muted);
  font-size: clamp(15px, 1.06vw, 18px);
  line-height: 1.68;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 235, 0.88)),
    var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-video-slot {
  align-self: center;
}

.hero-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 20px;
  background: #16110d;
  box-shadow: 0 20px 44px rgba(45, 31, 20, 0.24);
}

.hero-panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc858, var(--accent));
  box-shadow: 0 0 0 7px rgba(255, 177, 31, 0.12);
}

.hero-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(82, 61, 41, 0.08);
}

.hero-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hero-list strong {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 18px;
  font-weight: 800;
}

.hero-list span:last-child {
  color: var(--muted);
  line-height: 1.58;
  padding-top: 7px;
}

.panel {
  padding: clamp(18px, 2.5vw, 28px);
  border-radius: var(--radius-xxl);
}

.gallery-panel-top,
.result-panel,
.gallery-panel {
  margin-top: 18px;
}

.steps-panel {
  margin-top: 18px;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.step-card {
  position: relative;
  min-height: 108px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(82, 61, 41, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 247, 235, 0.68));
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
}

.step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 46%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 177, 31, 0.2);
  color: var(--accent-deep);
  font-weight: 800;
  z-index: 2;
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 20px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 177, 31, 0.28);
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.gallery-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-nav-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.gallery-nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 177, 31, 0.55);
  background: white;
}

/* Step/Card visual cleanup */
.step-card:not(:last-child)::after {
  content: "";
  right: -13px;
  top: 50%;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 177, 31, 0.26);
  background: linear-gradient(180deg, rgba(255, 214, 145, 0.3), rgba(255, 177, 31, 0.18));
  transform: translateY(-50%);
  pointer-events: none;
}

.step-card:not(:last-child)::before {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent-deep);
  border-bottom: 2px solid var(--accent-deep);
  transform: translateY(-50%) rotate(-45deg);
  pointer-events: none;
  z-index: 2;
}

.step-icon {
  width: 46px;
  height: 46px;
  font-size: 24px;
  line-height: 1;
}

.step-card p {
  font-size: 16px;
  line-height: 1.45;
  text-wrap: balance;
}

/* Gallery arrows visual cleanup */
.gallery-nav-button {
  font-size: 0;
  line-height: 0;
  position: relative;
}

.gallery-nav-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #7a6149;
  border-bottom: 2px solid #7a6149;
  transition: border-color 160ms ease;
}

.gallery-nav-button.prev::before {
  transform: translate(-42%, -50%) rotate(135deg);
}

.gallery-nav-button.next::before {
  transform: translate(-58%, -50%) rotate(-45deg);
}

.gallery-nav-button:hover::before {
  border-color: var(--accent-deep);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  gap: 18px;
  margin-top: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 2px 0 0;
  font-size: clamp(24px, 1.8vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.form {
  display: grid;
  gap: 16px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  font-weight: 800;
}

.product-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 239, 0.7));
  border: 1px solid rgba(82, 61, 41, 0.09);
}

.product-block-head {
  display: grid;
  gap: 4px;
}

.product-block-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
}

.field-count {
  max-width: 260px;
}

.field-or {
  display: flex;
  justify-content: center;
}

.field-or span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 177, 31, 0.12);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

input[type="file"],
input[type="url"],
select {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: rgba(118, 99, 81, 0.72);
}

input:focus,
select:focus {
  border-color: rgba(255, 177, 31, 0.56);
  box-shadow: 0 0 0 5px rgba(255, 177, 31, 0.12);
  background: white;
}

.file-input {
  padding: 8px 10px;
  color: var(--muted);
}

.file-input::file-selector-button {
  appearance: none;
  border: none;
  margin-right: 14px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc858, var(--accent));
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.file-input::file-selector-button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.hint,
.status,
.gallery-note {
  color: var(--muted);
  line-height: 1.62;
}

.primary-button,
.ghost-button {
  appearance: none;
  border: none;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #ffc858, var(--accent));
  color: var(--text);
  box-shadow: 0 16px 30px rgba(255, 177, 31, 0.2);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.gallery-item:hover img {
  transform: translateY(-1px);
}

.progress-card,
.progress-copy,
.steps {
  display: grid;
  gap: 14px;
}

.progress-ring {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(from 0deg, rgba(255, 177, 31, 0.95), rgba(255, 177, 31, 0.12), rgba(255, 177, 31, 0.95));
  animation: spin 3.2s linear infinite;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.96);
}

.progress-ring-core {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc858, var(--accent));
  z-index: 1;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(118, 99, 81, 0.12);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffc858, var(--accent));
  transition: width 900ms cubic-bezier(.2, .8, .2, 1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.step span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 17px;
  font-weight: 800;
}

.step strong {
  display: block;
  margin-bottom: 4px;
}

.step p {
  margin: 0;
}

.step.is-active {
  transform: translateX(4px);
}

.step.is-done span {
  background: linear-gradient(180deg, #ffc858, var(--accent));
  color: var(--text);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-stage {
  min-height: clamp(280px, 42vh, 560px);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(251, 247, 241, 0.98), rgba(244, 235, 224, 0.96));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: clamp(10px, 1.4vw, 18px);
}

.result-placeholder {
  min-height: inherit;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.result-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(60vh, 520px);
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(79, 59, 37, 0.14);
}

.gallery-track {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-grid {
  display: flex;
  gap: 12px;
  min-width: max-content;
  padding-bottom: 4px;
}

.gallery-item {
  appearance: none;
  border: none;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  width: 172px;
  min-width: 172px;
  aspect-ratio: 4 / 5;
  position: relative;
  background: #eadfce;
  box-shadow: 0 12px 26px rgba(79, 59, 37, 0.08);
}

.gallery-item.is-loading {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.3) 8%, rgba(255, 255, 255, 0.6) 18%, rgba(255, 255, 255, 0.3) 33%),
    #e5dbcc;
  background-size: 220% 100%;
  animation: gallery-shimmer 1.4s linear infinite;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 300ms ease, opacity 220ms ease;
}

.gallery-item.is-ready img {
  opacity: 1;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(25, 18, 13, 0.62) 100%);
  pointer-events: none;
}

.gallery-tag {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(36, 23, 15, 0.72);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.gallery-empty {
  margin-top: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.lightbox {
  width: min(92vw, 1440px);
  border: none;
  padding: 14px;
  border-radius: 24px;
  background: rgba(18, 12, 9, 0.92);
}

.lightbox::backdrop {
  background: rgba(12, 9, 8, 0.78);
  backdrop-filter: blur(6px);
}

.lightbox-image {
  width: 100%;
  max-height: calc(90vh - 110px);
  object-fit: contain;
  border-radius: 18px;
}

.lightbox-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-download {
  margin-top: 0;
}

.build-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.hidden {
  display: none;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes gallery-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@media (max-width: 1180px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 13ch;
  }

  .steps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-card::after {
    display: none;
  }

  .step-card::before {
    display: none;
  }

  .step-card p {
    font-size: 15px;
  }

  .step-card:nth-child(2n + 1):not(:last-child)::after {
    display: block;
  }

  .step-card:nth-child(2n + 1):not(:last-child)::before {
    display: block;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px 12px 28px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .hero-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-logo {
    width: 148px;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(28px, 9vw, 40px);
  }

  .steps-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .step-card {
    min-height: 112px;
  }

  .step-card p {
    font-size: 14px;
  }

  .step-card:not(:last-child)::after {
    display: block;
    right: auto;
    left: 50%;
    top: auto;
    bottom: -22px;
    transform: translateX(-50%);
  }

  .step-card:not(:last-child)::before {
    display: block;
    right: auto;
    left: 50%;
    top: auto;
    bottom: -12px;
    transform: translateX(-50%) rotate(45deg);
  }

  .field-count {
    max-width: none;
  }

  .section-head,
  .result-actions,
  .progress-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .result-stage {
    min-height: 280px;
  }

  .gallery-item {
    width: 136px;
    min-width: 136px;
  }
}
