:root {
  --cream:     #FAF6F0;
  --warm:      #F3EBE0;
  --sand:      #E8DED0;
  --terracotta:#C4805A;
  --clay:      #A0694B;
  --bark:      #5C3D2E;
  --ink:       #2B1D12;
  --olive:     #7A8B6F;
  --sage:      #B5C4A8;
  --gold:      #D4A853;
  --blush:     #E8C4B0;
  --white:     #FFFDF9;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .4s, backdrop-filter .4s;
}
.nav.scrolled {
  background: rgba(250,246,240,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.nav-logo img {
  height: 36px; width: auto; object-fit: contain;
}
.nav-logo-text { font-weight: 600; font-size: 15px; letter-spacing: .3px; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--bark);
  font-size: 14px; font-weight: 500;
  letter-spacing: .2px; transition: color .3s;
}
.nav-links a:hover { color: var(--terracotta); }
.nav-links a.is-active { color: var(--terracotta); font-weight: 600; }

.nav-hamburger {
  display: none; background: none; border: none;
  cursor: pointer; width: 32px; height: 32px;
  position: relative; z-index: 110;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  position: absolute; left: 5px; transition: all .3s;
}
.nav-hamburger span:nth-child(1) { top: 8px; }
.nav-hamburger span:nth-child(2) { top: 15px; }
.nav-hamburger span:nth-child(3) { top: 22px; }
.nav-hamburger.open span:nth-child(1) { top: 15px; transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { top: 15px; transform: rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: rgba(250,246,240,.97);
  backdrop-filter: blur(24px);
  z-index: 99;
  flex-direction: column; align-items: center;
  justify-content: center; gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; color: var(--ink);
  font-size: 20px; font-weight: 600; transition: color .3s;
}
.mobile-menu a:hover { color: var(--terracotta); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block; padding: 16px 36px;
  background: var(--terracotta); color: var(--white);
  text-decoration: none; font-size: 15px; font-weight: 500;
  border-radius: 60px; transition: all .3s; letter-spacing: .3px;
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--clay); transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(196,128,90,.25);
}
.btn-ghost {
  display: inline-block; padding: 16px 32px;
  color: var(--bark); text-decoration: none;
  font-size: 15px; font-weight: 500;
  border: 1.5px solid var(--sand); border-radius: 60px;
  transition: all .3s; background: none; cursor: pointer;
}
.btn-ghost:hover {
  border-color: var(--terracotta); color: var(--terracotta);
}

/* ===== HERO ===== */
.book-hero {
  padding: 160px 48px 80px;
  text-align: center;
  position: relative;
}
.book-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(196,128,90,.06), transparent);
  pointer-events: none;
}
.book-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--clay); margin-bottom: 20px;
}
.book-eyebrow::before,
.book-eyebrow::after {
  content: ''; width: 32px; height: 1px;
  background: var(--sand);
}
.book-title {
  font-family: 'Noto Serif SC', 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}
.book-desc {
  font-size: 17px; line-height: 1.9;
  color: var(--bark); font-weight: 300;
  max-width: 540px; margin: 0 auto;
}

/* ===== STEP WIZARD ===== */
.wizard {
  max-width: 780px;
  margin: 0 auto 120px;
  padding: 0 24px;
}

.wizard-progress {
  display: flex; align-items: center;
  justify-content: center;
  gap: 0; margin-bottom: 56px;
}
.wizard-step-indicator {
  display: flex; align-items: center; gap: 0;
}
.wiz-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  border: 2px solid var(--sand);
  color: var(--clay); background: var(--cream);
  transition: all .4s ease;
  position: relative; z-index: 1;
}
.wiz-dot.active {
  background: var(--terracotta); color: var(--white);
  border-color: var(--terracotta);
  box-shadow: 0 4px 20px rgba(196,128,90,.3);
}
.wiz-dot.done {
  background: var(--olive); color: var(--white);
  border-color: var(--olive);
}
.wiz-line {
  width: 80px; height: 2px;
  background: var(--sand);
  transition: background .4s ease;
}
.wiz-line.done { background: var(--olive); }

.wiz-labels {
  display: flex; justify-content: center;
  gap: 80px; margin-top: 12px;
}
.wiz-label {
  font-size: 12px; font-weight: 500;
  color: var(--clay); text-align: center;
  letter-spacing: .3px;
  transition: color .3s;
}
.wiz-label.active { color: var(--ink); font-weight: 600; }

/* panels */
.wizard-panel {
  display: none;
  animation: fadeUp .5s ease forwards;
}
.wizard-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px; font-weight: 700;
  margin-bottom: 8px; text-align: center;
}
.panel-desc {
  font-size: 15px; color: var(--clay);
  text-align: center; margin-bottom: 36px;
  font-weight: 300; line-height: 1.7;
}

/* ===== STEP 1: SERVICE SELECT ===== */
.svc-options {
  display: flex; flex-direction: column;
  gap: 16px;
}

.svc-option {
  background: var(--white);
  border: 1.5px solid var(--sand);
  border-radius: 20px;
  padding: 28px 32px;
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
}
.svc-option:hover {
  border-color: var(--blush);
  box-shadow: 0 8px 32px rgba(196,128,90,.08);
}
.svc-option.selected {
  border-color: var(--terracotta);
  box-shadow: 0 8px 32px rgba(196,128,90,.12);
}

.svc-option-header {
  display: flex; align-items: center;
  justify-content: space-between;
}
.svc-option-left {
  display: flex; align-items: center; gap: 16px;
}
.svc-option-num {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
.svc-option:nth-child(1) .svc-option-num { background: var(--terracotta); }
.svc-option:nth-child(2) .svc-option-num { background: var(--olive); }

.svc-option-name {
  font-size: 18px; font-weight: 600;
}
.svc-option-tag {
  font-size: 12px; color: var(--clay);
  font-weight: 300; margin-top: 2px;
}

.svc-check {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--sand);
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
  flex-shrink: 0;
}
.svc-option.selected .svc-check {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.svc-check-inner {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0;
  transition: opacity .3s;
}
.svc-option.selected .svc-check-inner { opacity: 1; }

/* sub items */
.svc-subitems {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, margin .3s ease;
  margin-top: 0;
}
.svc-option.selected .svc-subitems {
  max-height: 500px;
  margin-top: 20px;
}
.svc-subitems-inner {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
}

.sub-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--sand);
  font-size: 13px; font-weight: 400;
  color: var(--bark); background: var(--cream);
  cursor: pointer; transition: all .25s;
  user-select: none;
}
.sub-chip:hover {
  border-color: var(--blush);
}
.sub-chip.picked {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

/* ===== STEP 2: CONTACT INFO ===== */
.form-fields {
  display: flex; flex-direction: column;
  gap: 20px; max-width: 520px;
  margin: 0 auto;
}

.field-group {
  display: flex; flex-direction: column; gap: 6px;
}

.field-group label {
  font-size: 13px; font-weight: 500;
  color: var(--bark); letter-spacing: .2px;
}
.field-group label .req {
  color: var(--terracotta); margin-left: 2px;
}

.field-group input,
.field-group textarea,
.field-group select {
  padding: 14px 18px;
  border: 1.5px solid var(--sand);
  border-radius: 14px;
  background: var(--white);
  font-size: 15px;
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--ink);
  transition: border-color .3s;
  outline: none;
}
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  border-color: var(--terracotta);
}

.field-group textarea {
  resize: vertical; min-height: 100px;
}

.field-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== STEP 3: CONFIRM ===== */
.confirm-card {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 16px 60px rgba(43,29,18,.05);
}

.confirm-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sand);
}
.confirm-section:last-child {
  margin-bottom: 0; padding-bottom: 0;
  border-bottom: none;
}

.confirm-label {
  font-size: 12px; font-weight: 600;
  color: var(--clay); letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 8px;
}

.confirm-value {
  font-size: 16px; font-weight: 500;
  line-height: 1.6;
}

.confirm-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
}
.confirm-chips span {
  padding: 6px 14px; border-radius: 999px;
  background: var(--warm); font-size: 13px;
  color: var(--bark);
}

/* nav buttons */
.wizard-nav {
  display: flex; justify-content: center;
  gap: 16px; margin-top: 40px;
}

/* ===== SUCCESS VIEW ===== */
.success-view {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  background: var(--warm);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
}
.success-view.show { display: block; }

/* block 1: header */
.success-header { margin-bottom: 32px; }
.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--olive);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  animation: popIn .5s ease;
}
.success-icon svg { width: 26px; height: 26px; }
@keyframes popIn {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.success-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px; font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}
.success-desc {
  font-size: 14px;
  color: var(--clay);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
  font-weight: 400;
}

/* shared card */
.success-card {
  background: var(--white);
  border: 0.5px solid var(--sand);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

/* block 2: code card */
.success-card-label {
  font-size: 12px;
  color: var(--clay);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.success-code {
  font-family: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.2;
}
.success-copy-btn {
  background: transparent;
  border: 0.5px solid var(--sand);
  color: var(--bark);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.success-copy-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* block 3: QR card */
.success-qr-card { margin-bottom: 24px; }
.success-qr-frame {
  display: inline-block;
  background: var(--white);
  border: 0.5px solid var(--sand);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.success-qr-frame img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: contain;
}
.success-qr-fallback {
  font-size: 13px;
  color: var(--clay);
  width: 200px;
  line-height: 1.6;
}
.success-qr-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.success-qr-sub {
  font-size: 12px;
  color: var(--clay);
}

/* block 4: steps card */
.success-steps-card {
  padding: 20px 24px;
  margin-bottom: 24px;
  text-align: left;
}
.success-steps-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--bark);
  text-align: center;
  margin-bottom: 12px;
}
.success-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.success-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.success-step-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--warm);
  color: var(--bark);
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.success-step-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--bark);
}
.success-step-code {
  font-family: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
  color: var(--terracotta);
  letter-spacing: 1px;
}

/* block 5: back button */
.success-actions { margin-top: 8px; }
.success-back-btn {
  display: inline-block;
  background: transparent;
  border: 0.5px solid var(--sand);
  color: var(--bark);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  transition: border-color .25s, color .25s;
}
.success-back-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

@media (max-width: 768px) {
  .success-view {
    padding: 32px 20px;
    margin: 0 16px;
    border-radius: 14px;
  }
  .success-card { padding: 20px; }
  .success-steps-card { padding: 18px 20px; }
  .success-qr-frame img,
  .success-qr-fallback { width: 180px; }
  .success-qr-frame img { height: 180px; }
}

/* ===== FOOTER ===== */
.footer {
  padding: 64px 48px 48px;
  border-top: 1px solid var(--sand);
  display: flex; justify-content: space-between;
  align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.footer-left { font-size: 13px; color: var(--clay); font-weight: 300; }
.footer-right { display: flex; gap: 28px; }
.footer-right a {
  font-size: 13px; color: var(--clay);
  text-decoration: none; transition: color .3s;
}
.footer-right a:hover { color: var(--terracotta); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .book-hero { padding: 130px 24px 60px; }
  .wizard { padding: 0 16px; }
  .svc-option { padding: 22px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .confirm-card { padding: 28px 24px; }
  .footer { flex-direction: column; gap: 24px; text-align: center; }
  .wiz-labels { gap: 50px; }
  .wiz-line { width: 50px; }
}