:root {
  color-scheme: light;
  --ink: #24302f;
  --muted: #66716f;
  --line: #d8ded9;
  --paper: #fffaf2;
  --surface: #ffffff;
  --mint: #2c9a88;
  --mint-dark: #197a70;
  --coral: #dd6b58;
  --yellow: #f2c94c;
  --blue: #477ca8;
  --label: #f7efe3;
  --shadow: 0 20px 50px rgba(36, 48, 47, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #fffaf2 0%, #f4fbf8 46%, #fff 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 250, 242, 0.92);
  border-bottom: 1px solid rgba(216, 222, 217, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

nav a {
  border-radius: 8px;
  color: var(--ink);
  padding: 9px 12px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  background: #e8f5f1;
}

main {
  display: grid;
  gap: 28px;
  padding: clamp(18px, 3vw, 36px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: min(560px, calc(100vh - 118px));
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.intro-copy {
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint-dark);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 20px;
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #45514f;
  font-size: clamp(1.04rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

.intro-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #f4fbf8;
}

.intro-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.designer-shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(360px, 1fr) minmax(270px, 360px);
  gap: 18px;
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.panel,
.preview-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(36, 48, 47, 0.07);
}

.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel h2,
.preview-stage h2,
.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.1;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.template-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--ink);
  text-align: left;
}

.template-card.is-active {
  border-color: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(44, 154, 136, 0.22);
}

.template-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--template-color);
  color: #203432;
  font-weight: 900;
}

.template-card strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.2;
}

.template-card small {
  color: var(--muted);
  line-height: 1.25;
}

.control-form,
.request-form {
  display: grid;
  gap: 14px;
}

label,
fieldset {
  min-width: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #3b4745;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(44, 154, 136, 0.25);
  outline-offset: 2px;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 9px;
  color: #3b4745;
  font-size: 0.9rem;
  font-weight: 800;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatches legend {
  flex-basis: 100%;
}

.swatch {
  width: 36px;
  height: 36px;
  border: 1px solid #bdc8c4;
  border-radius: 50%;
  background: var(--swatch);
}

.swatch.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px white, 0 0 0 5px var(--mint);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented legend {
  grid-column: 1 / -1;
}

.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  font-size: 0.82rem;
  text-align: center;
}

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

.segmented label:has(input:checked) {
  border-color: var(--mint);
  background: #e4f5f0;
  color: #115d56;
}

.preview-stage {
  min-height: 720px;
  padding: clamp(18px, 3vw, 28px);
}

.preview-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.tool-buttons {
  display: flex;
  gap: 8px;
}

.tool-buttons button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 900;
}

.tool-buttons button:hover {
  background: #e8f5f1;
}

.product-preview {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(44, 154, 136, 0.12), transparent 45%),
    linear-gradient(180deg, #fdf7ed, #ebf6f3);
}

.product-preview::before {
  position: absolute;
  inset: auto 8% 9% 8%;
  height: 22px;
  border-radius: 50%;
  background: rgba(36, 48, 47, 0.13);
  content: "";
  filter: blur(8px);
}

.product-object {
  position: relative;
  width: min(52vw, 330px);
  min-width: 220px;
  height: 390px;
  transform: translateY(10px);
  border: 1px solid rgba(36, 48, 47, 0.15);
  border-radius: 42px 42px 54px 54px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), var(--product-color), rgba(255, 255, 255, 0.55));
  box-shadow: 0 26px 55px rgba(36, 48, 47, 0.18);
}

.product-object.candle {
  border-radius: 18px 18px 38px 38px;
}

.product-object.soap {
  width: min(52vw, 360px);
  height: 260px;
  border-radius: 42px;
}

.product-object.seed {
  width: min(52vw, 310px);
  height: 405px;
  border-radius: 8px 8px 28px 28px;
}

.product-object.bottle {
  width: min(42vw, 230px);
  height: 450px;
  border-radius: 80px 80px 38px 38px;
}

.lid {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 54%;
  height: 62px;
  transform: translateX(-50%);
  border: 1px solid rgba(36, 48, 47, 0.18);
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #d5b06a, #a97836);
}

.product-object.soap .lid,
.product-object.seed .lid {
  display: none;
}

.product-object.bottle .lid {
  top: -70px;
  width: 38%;
  height: 96px;
  border-radius: 16px 16px 4px 4px;
  background: linear-gradient(180deg, #b6d5c9, #5f9b8c);
}

.product-label {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 34%;
  display: grid;
  min-height: 168px;
  place-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 1px solid rgba(36, 48, 47, 0.18);
  border-radius: 8px;
  background: var(--label);
  color: var(--ink);
  text-align: center;
}

.product-object.soap .product-label {
  top: 26%;
}

.product-object.seed .product-label {
  top: 18%;
  min-height: 230px;
}

.product-object.bottle .product-label {
  top: 42%;
  left: 7%;
  right: 7%;
}

.product-label img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.product-label span {
  color: var(--mint-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-label strong {
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
}

.product-label small {
  color: var(--muted);
  font-weight: 800;
}

.product-label p {
  margin: 0;
  color: #4e5a58;
  font-size: 0.86rem;
  line-height: 1.35;
}

.product-label.script strong {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(1.75rem, 3.6vw, 2.55rem);
}

.product-label.modern strong {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.18rem, 2.5vw, 1.72rem);
  text-transform: uppercase;
}

.shine {
  position: absolute;
  inset: 26px auto 40px 19%;
  width: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  filter: blur(3px);
}

.gift-tag {
  position: absolute;
  right: clamp(18px, 8%, 90px);
  bottom: clamp(28px, 10%, 80px);
  display: grid;
  min-width: 132px;
  max-width: 190px;
  gap: 5px;
  padding: 13px 15px;
  transform: rotate(-5deg);
  border: 1px solid #d1b982;
  border-radius: 8px;
  background: #fff9e9;
  box-shadow: 0 12px 22px rgba(36, 48, 47, 0.12);
}

.gift-tag span {
  color: #946b17;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gift-tag strong {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.detail-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-strip div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.detail-strip span,
.price-box span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-strip strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.option-list {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.option-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  font-size: 0.88rem;
  font-weight: 700;
}

.option-list input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--mint);
}

.price-box {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.price-box span,
.price-box small {
  color: rgba(255, 255, 255, 0.72);
}

.price-box strong {
  font-size: 2rem;
  line-height: 1;
}

.budget-meter {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.budget-meter > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.budget-meter div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e4ebe7;
}

.budget-meter i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 180ms ease, background 180ms ease;
}

.primary-action {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--coral);
  color: white;
  font-weight: 900;
}

.primary-action:hover {
  background: #c94e3c;
}

.summary-output {
  display: block;
  margin-top: 14px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf9;
  padding: 12px;
  color: #33403e;
  font-size: 0.86rem;
  line-height: 1.45;
}

.collection-band,
.process-band {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 68px) 0;
}

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

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

.collection-grid article {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.collection-grid span {
  color: var(--coral);
  font-weight: 900;
}

.collection-grid h3 {
  margin-bottom: 0;
}

.collection-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 4px solid var(--mint);
}

.process-list span {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .designer-shell {
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  }

  .summary-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .intro-band,
  .designer-shell,
  .collection-grid,
  .process-list {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 13ch;
  }

  .preview-stage {
    min-height: auto;
  }

  .product-preview {
    min-height: 500px;
  }

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

@media (max-width: 560px) {
  main {
    padding: 14px;
  }

  .template-grid,
  .field-pair,
  .detail-strip,
  .segmented {
    grid-template-columns: 1fr;
  }

  .preview-toolbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-object,
  .product-object.soap,
  .product-object.seed,
  .product-object.bottle {
    width: min(76vw, 300px);
  }

  .gift-tag {
    right: 18px;
    bottom: 18px;
  }
}
