:root {
  --ink: #16202a;
  --muted: #637080;
  --line: #d8dee6;
  --paper: #f8fafc;
  --panel: #ffffff;
  --accent: #d71920;
  --accent-dark: #a80f16;
  --focus: #2457d6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  gap: 6px;
}

.topnav a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
}

.hero {
  display: grid;
  gap: 28px;
  min-height: calc(100vh - 69px);
  padding: clamp(24px, 4vw, 56px);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(36, 87, 214, 0.10), transparent 34%),
    var(--paper);
}

.hero-copy {
  max-width: 890px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
}

.lead {
  max-width: 720px;
  color: #3c4856;
  font-size: 18px;
}

.creator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 18px;
  align-items: stretch;
}

.preview-panel,
.controls-panel,
.quote-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(22, 32, 42, 0.08);
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(380px, 1fr) auto;
  min-height: 580px;
  overflow: hidden;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.preview-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.bottle-stage {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(22, 32, 42, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(22, 32, 42, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.template-preview {
  position: relative;
  width: min(76vw, 430px);
  aspect-ratio: var(--template-aspect, 1 / 1);
  filter: drop-shadow(0 26px 30px rgba(22, 32, 42, 0.20));
}

.template-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.template-tint {
  position: absolute;
  inset: 0;
  background: var(--bottle-color, #f7f7f2);
  mix-blend-mode: multiply;
  opacity: 0.16;
  pointer-events: none;
}

.print-area {
  position: absolute;
  top: var(--print-top, 50%);
  left: var(--print-left, 50%);
  display: grid;
  width: var(--print-width, 46%);
  height: var(--print-height, 18%);
  place-items: center;
  transform: translate(-50%, -50%);
}

.print-area canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-placeholder {
  position: absolute;
  color: #d71920;
  font-size: clamp(11px, 2.4vw, 24px);
  font-weight: 900;
  letter-spacing: 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.summary-strip span {
  min-width: 0;
  padding: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.summary-strip strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.control-group {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.control-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.group-head h3 {
  margin: 0;
  font-size: 18px;
}

.step {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.model-option,
.swatch,
.upload-box label,
.upload-box button,
.pantone-row button,
.primary-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.model-option {
  padding: 10px 8px;
  text-align: left;
}

.model-option strong,
.model-option span {
  display: block;
}

.model-option span {
  color: var(--muted);
  font-size: 12px;
}

.model-option.active,
.swatch.active {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.14);
}

.field-label {
  display: block;
  margin: 12px 0 7px;
  color: #3c4856;
  font-size: 13px;
  font-weight: 800;
}

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

.swatch {
  position: relative;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

.swatch::after {
  content: attr(aria-label);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 7px);
  z-index: 4;
  display: none;
  padding: 5px 7px;
  color: #fff;
  background: #111822;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(50%);
}

.swatch:hover::after,
.swatch:focus-visible::after {
  display: block;
}

.upload-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box label,
.upload-box button,
.pantone-row button,
.primary-link {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  text-decoration: none;
}

.upload-box label,
.primary-link {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 800;
}

.upload-box button,
.pantone-row button {
  color: var(--ink);
  background: #fff;
}

.pantone-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.pantone-row input,
.quote-form input {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.models-band,
.quote-band {
  padding: clamp(34px, 5vw, 70px) clamp(18px, 4vw, 56px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head h2,
.quote-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

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

.model-card {
  min-height: 240px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-bottle {
  position: relative;
  width: 70px;
  height: 142px;
  margin-bottom: 16px;
}

.mini-bottle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 26px;
  height: 30px;
  border-radius: 8px 8px 3px 3px;
  background: var(--accent);
}

.mini-bottle::after {
  content: "";
  position: absolute;
  top: 32px;
  left: 5px;
  width: 60px;
  height: 104px;
  border: 2px solid rgba(22, 32, 42, 0.18);
  border-radius: 22px 22px 14px 14px;
  background: #f7f7f2;
  box-shadow: inset -10px 0 20px rgba(0, 0, 0, 0.10);
}

.model-card h3 {
  margin-bottom: 8px;
}

.model-card p {
  color: var(--muted);
}

.quote-band {
  padding-top: 0;
}

.quote-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 4vw, 40px);
}

.quote-form {
  display: grid;
  gap: 10px;
}

.quote-form label {
  color: #3c4856;
  font-weight: 800;
}

.price-box {
  padding: 16px;
  background: #f3f6f9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.price-box span,
.price-box small {
  display: block;
  color: var(--muted);
}

.price-box strong {
  display: block;
  margin: 4px 0;
  font-size: 34px;
}

.primary-link {
  min-height: 48px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(36, 87, 214, 0.30);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .creator-shell,
  .quote-panel {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    order: -1;
  }
}

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

  .topnav {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    padding: 22px 14px;
  }

  .preview-panel {
    min-height: 520px;
  }

  .bottle-stage {
    min-height: 360px;
    padding: 12px;
  }

  .template-preview {
    width: min(92vw, 330px);
  }

  .summary-strip,
  .model-cards,
  .model-grid {
    grid-template-columns: 1fr;
  }

  .swatches {
    grid-template-columns: repeat(4, 1fr);
  }

  .section-head {
    display: block;
  }
}
