:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #666a73;
  --line: #ddd8cf;
  --paper: #fffdf8;
  --panel: #ffffff;
  --mint: #dcefe8;
  --teal: #176b5b;
  --plum: #6e405f;
  --coral: #be5f45;
  --gold: #c48a2b;
  --blue: #345f92;
  --shadow: 0 22px 60px rgba(40, 36, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 16px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.header-cta,
.intent-row,
.conversion-strip,
.control-row {
  align-items: center;
  display: flex;
}

.brand {
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.brand-mark img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.site-nav {
  gap: 18px;
  justify-content: center;
}

.site-nav a,
.header-cta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.header-cta {
  background: var(--ink);
  border-radius: 8px;
  color: white;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
}

main {
  margin: 0 auto;
  max-width: 1240px;
  padding: 28px clamp(18px, 4vw, 42px) 72px;
}

.builder-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 0.95fr) minmax(300px, 0.72fr) minmax(300px, 0.78fr);
}

.builder-copy,
.builder-panel,
.preview-panel,
.tool-surface,
.age-tool,
.product-grid article,
.ops-grid div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.builder-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.hero-scene {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-content {
  background:
    linear-gradient(90deg, rgba(10, 34, 31, 0.82), rgba(10, 34, 31, 0.36) 68%),
    linear-gradient(0deg, rgba(10, 34, 31, 0.34), transparent 46%);
  color: white;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  min-height: 500px;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(40px, 5.4vw, 70px);
  letter-spacing: 0;
  line-height: 0.94;
  max-width: 840px;
}

.lede {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  margin-top: 26px;
  max-width: 680px;
}

.hero-content .eyebrow,
.hero-content .lede {
  color: rgba(255, 255, 255, 0.88);
}

.intent-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.intent-row span {
  background: var(--mint);
  border: 1px solid rgba(23, 107, 91, 0.18);
  border-radius: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  padding: 10px 12px;
}

.hero-content .intent-row span {
  background: rgba(255, 253, 248, 0.16);
  border-color: rgba(255, 253, 248, 0.26);
  color: white;
}

.builder-panel,
.preview-panel {
  padding: 22px;
}

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

label span,
legend {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 7px;
  text-transform: uppercase;
}

label.full {
  grid-column: 1 / -1;
}

input,
select {
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.14);
}

.segmented {
  border: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 0;
}

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

.segmented button,
.control-row button,
.conversion-strip button,
.conversion-strip a {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  line-height: 1.1;
  min-height: 42px;
  padding: 9px 12px;
}

.segmented button {
  background: #fbfaf6;
  color: var(--muted);
}

.segmented button.active,
.control-row button,
.conversion-strip button {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.preview-toolbar {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.preview-toolbar h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

#previewPrice {
  background: #f4efe4;
  border-radius: 8px;
  color: var(--plum);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  padding: 10px 12px;
}

.mockup-stage {
  background:
    linear-gradient(135deg, rgba(196, 138, 43, 0.2), transparent 34%),
    linear-gradient(315deg, rgba(23, 107, 91, 0.16), transparent 40%),
    #f8f3ea;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 18px;
  min-height: 342px;
  overflow: hidden;
  padding: 20px;
  place-items: center;
  position: relative;
}

.mockup-stage[data-product-view="mug"] {
  border-bottom: 16px solid #e7e0d4;
}

.mockup-stage[data-product-view="canvas"] .mockup-art {
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.18);
  width: min(320px, 86%);
}

.mockup-stage[data-product-view="ornament"] .mockup-art {
  aspect-ratio: 1;
  border-radius: 50%;
  width: min(260px, 78%);
}

.mockup-stage[data-product-view="download"] .mockup-art {
  aspect-ratio: 9 / 16;
  width: min(210px, 65%);
}

.mockup-art {
  aspect-ratio: 1.16;
  background: white;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 8px 8px 46px 46px;
  min-height: 210px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  width: min(310px, 84%);
}

.photo-frame {
  align-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(190, 95, 69, 0.25), transparent 34%),
    radial-gradient(circle at 70% 70%, rgba(23, 107, 91, 0.2), transparent 36%),
    #f4efe4;
  border-radius: 8px;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.photo-frame img {
  display: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo-frame.has-image img {
  display: block;
}

.photo-frame.has-image span {
  display: none;
}

.photo-frame span {
  color: var(--muted);
  font-weight: 900;
  padding: 20px;
  text-align: center;
}

.style-wash {
  inset: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  position: absolute;
}

.style-wash.watercolor {
  background: linear-gradient(135deg, rgba(23, 107, 91, 0.18), transparent 48%);
}

.style-wash.line {
  background:
    repeating-linear-gradient(45deg, rgba(32, 33, 36, 0.08) 0 2px, transparent 2px 10px),
    transparent;
}

.style-wash.poster {
  background: linear-gradient(0deg, rgba(196, 138, 43, 0.24), rgba(190, 95, 69, 0.18));
}

.style-wash.comic {
  background:
    radial-gradient(circle, rgba(32, 33, 36, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    rgba(52, 95, 146, 0.08);
}

.mockup-copy {
  text-align: center;
}

.mockup-copy strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.mockup-copy span {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.conversion-strip {
  gap: 10px;
  margin-top: 16px;
}

.conversion-strip a {
  background: #fbfaf6;
  color: var(--teal);
  text-decoration: none;
}

.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 12px;
}

.tool-band,
.product-section,
.ops-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1fr);
  margin-top: 54px;
  padding-top: 36px;
}

.section-intro h2 {
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.02;
}

.section-intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
}

.wide {
  grid-column: 1 / -1;
  max-width: 860px;
}

.tool-surface,
.age-tool {
  padding: 22px;
}

.control-row {
  align-items: end;
  gap: 12px;
}

.control-row label {
  flex: 1 1 180px;
}

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

.result-grid button {
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  min-height: 74px;
  padding: 12px;
  text-align: left;
}

.result-grid strong {
  display: block;
  font-size: 18px;
}

.result-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
}

.age-tool {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
}

.age-output {
  align-items: center;
  background: var(--mint);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 124px;
  padding: 20px;
}

.age-output span {
  color: var(--teal);
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 950;
  line-height: 1;
}

.age-output p {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.product-grid,
.ops-grid {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-grid article {
  min-height: 250px;
  padding: 22px;
}

.product-code {
  color: var(--coral);
  display: block;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 20px;
}

.product-grid h3 {
  font-size: 22px;
  line-height: 1.12;
}

.product-grid p {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 12px;
}

dl {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

dl div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

dd {
  font-weight: 900;
  margin: 4px 0 0;
}

.ops-grid div {
  box-shadow: none;
  min-height: 130px;
  padding: 20px;
}

.ops-grid strong,
.ops-grid span {
  display: block;
}

.ops-grid strong {
  font-size: 18px;
}

.ops-grid span {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .builder-shell,
  .tool-band,
  .age-tool {
    grid-template-columns: 1fr;
  }

  .builder-copy {
    min-height: auto;
  }

  .hero-content {
    min-height: 470px;
  }

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

@media (max-width: 640px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-cta {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  .hero-content {
    min-height: 520px;
    padding: 28px;
  }

  .form-grid,
  .segmented,
  .control-row,
  .result-grid,
  .product-grid,
  .ops-grid,
  .age-output {
    grid-template-columns: 1fr;
  }

  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .conversion-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .conversion-strip a,
  .conversion-strip button {
    text-align: center;
  }
}
