:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --ink: #1f1a17;
  --muted: #6b625b;
  --line: #e8dfd3;
  --accent: #e2583e;
  --accent-ink: #ffffff;
  --accent-soft: #fde6df;
  --radius: 14px;
  --shadow: 0 24px 60px -20px rgba(60, 35, 20, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 Inter, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 700; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.02em; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 16px 20px;
}
.logo { font: 700 1.5rem Fraunces, Georgia, serif; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); font: 600 1rem Inter, system-ui, sans-serif;
  text-decoration: none; cursor: pointer; transition: transform .1s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #cf4a31; border-color: #cf4a31; }
.btn.ghost:hover { background: var(--surface); }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn.wide { width: 100%; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: 500 .85rem Inter, system-ui, sans-serif; cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center;
  max-width: 1120px; margin: 0 auto; padding: 32px 20px 64px;
}
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.fine { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.fine svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: currentColor; }

/* ---------- 3D viewer ---------- */
.viewer { display: flex; flex-direction: column; align-items: center; gap: 14px; perspective: 1000px; }
.card {
  --ar: 1.5;
  position: relative; width: min(100%, calc(68vh * var(--ar))); aspect-ratio: var(--ar);
  border-radius: 6px; overflow: hidden; background: #2a2420; box-shadow: var(--shadow);
  transform-style: preserve-3d; will-change: transform;
  border: 6px solid #fff;
}
.card canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.card canvas:active { cursor: grabbing; }
.sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 70%);
  background-size: 250% 250%; background-position: 50% 50%;
}
.status {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center; color: #fff; background: rgba(25, 20, 17, .72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.status[hidden] { display: none; }
.status p { margin: 0; font-weight: 500; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite;
}
.status.error .spinner, .status.error .meter { display: none; }
.meter { width: 60%; max-width: 240px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-bar { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hint { font-size: .88rem; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.result-actions[hidden] { display: none; }

/* ---------- sections ---------- */
section:not(.hero) { max-width: 1120px; margin: 0 auto; padding: 56px 20px; }
section h2 { text-align: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.uses article, .product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.uses p { color: var(--muted); margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px auto 0; max-width: 640px; display: grid; gap: 16px; }
.steps li { counter-increment: s; position: relative; padding-left: 56px; color: var(--muted); }
.steps li b { color: var(--ink); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font: 700 1.1rem Fraunces, Georgia, serif;
}
.product { display: flex; flex-direction: column; gap: 6px; }
.product .price { font: 700 2rem Fraunces, Georgia, serif; }
.product .price small { font: 500 .9rem Inter, system-ui, sans-serif; color: var(--muted); }
.product p { color: var(--muted); flex: 1; }
.product.featured { border: 2px solid var(--accent); }
.product .tag {
  align-self: flex-start; background: var(--accent-soft); color: var(--accent);
  font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.faq { max-width: 720px !important; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta-end { text-align: center; }
.cta-end > p { color: var(--muted); }

/* ---------- forms ---------- */
.signup { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.signup input[type=email] {
  flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font: 1rem Inter, system-ui, sans-serif; color: var(--ink);
}
.signup input[type=email]:focus { outline: none; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin-top: 12px; font-weight: 500; }
.form-msg[hidden] { display: none; }

/* ---------- order dialog ---------- */
dialog {
  width: min(480px, calc(100vw - 32px)); border: none; border-radius: 20px; padding: 28px;
  background: var(--bg); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(25, 20, 17, .55); }
dialog .close {
  position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 1.8rem;
  line-height: 1; cursor: pointer; color: var(--muted);
}
dialog .signup { flex-direction: column; }
.step[hidden] { display: none; }
.options { display: grid; gap: 10px; margin: 16px 0 20px; }
.option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
}
.option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; }
.option .name { font-weight: 600; }
.option .desc { display: block; font-size: .85rem; color: var(--muted); }
.option .price { margin-left: auto; font-weight: 700; }

footer {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  padding: 32px 20px 48px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line);
}

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .viewer { order: -1; }
  .card { width: min(100%, calc(60vh * var(--ar))); }
  .hero-copy { text-align: center; }
  .lede { margin: 0 auto 1em; }
  .actions { justify-content: center; }
  .fine { justify-content: center; text-align: left; }
  .grid3 { grid-template-columns: 1fr; }
  .signup { flex-direction: column; }
}
