/* EasyCabinet hero — trial overlay restyled as the marketing hero over the live
   3D stage. Left card + right reel; gradient scrim keeps the real model crisp on
   the right (no backdrop-blur here, so the model reads through). */

#trialPromptOverlay {
  position: fixed;
  top: 54px;              /* sit below the app header so nav stays visible */
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 clamp(20px, 5vw, 84px);
  background: linear-gradient(100deg,
    var(--bg) 0%, var(--bg) 27%,
    color-mix(in srgb, var(--bg) 55%, transparent) 48%,
    transparent 72%);
}
#trialPromptOverlay.hidden { display: none !important; pointer-events: none; }
/* Returning visitors: hidden at parse time by the inline <head> script in index.html
   (VISITED flag) — no hero flash while the module chain hydrates, and no late
   dismissal discarding typed text. showTrialOverlay() (logo click) removes the
   class to re-open the hero. */
html.ec-return-visitor #trialPromptOverlay { display: none !important; pointer-events: none; }

/* hide the editor chrome while the hero is up (reel still drives the hidden controls) */
#app[data-hero="1"] #ec-iconrail,
#app[data-hero="1"] #chat-panel,
#app[data-hero="1"] #chat-expand-tab,
#app[data-hero="1"] #ec-stage-dock,
#app[data-hero="1"] #ec-explode-bar,
#app[data-hero="1"] #toolbar,
#app[data-hero="1"] #controlsHint { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#app[data-hero="1"] .regen-toast,
#app[data-hero="1"] #infoCard,
#app[data-hero="1"] #legend { display: none !important; }

/* ---------------- hero card ---------------- */
.hero-card {
  position: relative; z-index: 2;
  width: min(520px, 94vw);
  padding: 6px 4px;
  background: none; border: none; box-shadow: none;
  animation: hero-card-in .55s cubic-bezier(.2,.8,.25,1);
}
@keyframes hero-card-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--green);
  margin-bottom: 18px; padding: 6px 12px; border-radius: 999px;
  background: var(--green-chip); border: 1px solid var(--line);
}
.hero-badge-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--green); animation: hero-pulse 2.2s ease-out infinite; }
@keyframes hero-pulse { 0% { box-shadow: 0 0 0 0 var(--green-chip); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-title {
  margin: 0 0 12px; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.02;
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: -.03em; color: var(--text);
}
.hero-em { color: var(--accent); }
.hero-lead { margin: 0 0 20px; font-size: 16.5px; line-height: 1.5; color: var(--muted); max-width: 440px; }

.hero-assistant { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hero-avatar {
  width: 30px; height: 30px; border-radius: 999px; flex: none;
  background: linear-gradient(140deg, var(--amber-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-ink); font-weight: 800; font-size: 12px;
}
.hero-assistant-text { font-size: 13.5px; color: var(--muted); }
.hero-assistant-text b { color: var(--text); font-weight: 600; }

.hero-input-wrap { position: relative; }
.hero-input {
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: var(--accent-softer); color: var(--text);
  font-size: 16px; line-height: 1.55; padding: 15px 16px; resize: none; min-height: 92px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.hero-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-ghost {
  position: absolute; left: 17px; top: 15px; right: 16px;
  font-size: 16px; line-height: 1.55; color: var(--faint); pointer-events: none;
}
.hero-caret { display: inline-block; width: 2px; height: 17px; background: var(--accent); margin-left: 1px; vertical-align: -3px; animation: hero-blink 1s step-end infinite; }
@keyframes hero-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-cta {
  position: relative; overflow: hidden; margin-top: 14px; width: 100%; padding: 16px;
  border-radius: var(--radius-lg); border: none; background: var(--accent); color: var(--amber-ink);
  font-size: 16.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 30px rgba(236,154,60,.32); transition: transform .14s ease, box-shadow .14s ease;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(236,154,60,.42); }
.hero-cta-label { position: relative; }
.hero-cta-sheen {
  position: absolute; top: 0; bottom: 0; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: hero-sweep 4.6s ease-in-out infinite; pointer-events: none;
}
@keyframes hero-sweep { 0% { transform: translateX(-130%) skewX(-18deg); } 60%, 100% { transform: translateX(330%) skewX(-18deg); } }

.hero-starts-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 16px 0 8px; }
.hero-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.hero-chip {
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--accent-softer); color: var(--muted); font-size: 12.5px; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: transform .14s ease, border-color .14s ease, color .14s ease;
}
.hero-chip:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--text); }

.hero-cap-row { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.hero-cap.tick { animation: hero-tickin .4s ease; }
@keyframes hero-tickin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.hero-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.hero-foot-link {
  display: flex; align-items: center; gap: 7px; background: none; border: none;
  color: var(--muted); font-size: 13px; cursor: pointer; font-weight: 600;
}
.hero-foot-link:hover { color: var(--text); }
.hero-demo-link { background: none; border: none; color: var(--faint); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hero-demo-link:hover { color: var(--muted); }

/* empty-state hint (toggled by trial-prompt.js) */
.trial-prompt-empty { display: none; margin: 10px 0 0; font-size: 12.5px; color: var(--accent); }
.trial-prompt-empty.visible { display: block; }

/* ---------------- reel (right side) ---------------- */
.hero-reel {
  /* Occupy the right half of the hero and center the reel within it, so the
     steps + cards are always centered on the right of the page (not anchored to
     the right edge, which drifted off-center on wide screens). */
  position: absolute; left: 50%; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 1;
}
.reel-steps { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.reel-step {
  padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--rail); color: var(--faint);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: all .3s ease;
}
.reel-step.active { border-color: var(--accent); background: var(--accent); color: var(--amber-ink); }
.reel-step.done { color: var(--green); }

.reel-stage { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.reel-card { animation: reel-in .5s cubic-bezier(.2,.8,.25,1); }
@keyframes reel-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* edit comment bubble */
.reel-edit { display: flex; align-items: flex-start; gap: 11px; width: min(300px, 82%); }
.reel-pin {
  flex: none; width: 28px; height: 28px; border-radius: 999px 999px 999px 3px;
  background: var(--accent); color: var(--amber-ink); font: 800 13px var(--font-ui);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.reel-edit-msgs { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.reel-msg { max-width: 94%; padding: 9px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 12px 28px rgba(0,0,0,.42); }
.reel-msg-user { align-self: flex-end; border-radius: 13px 13px 4px 13px; background: var(--panel-3); border: 1px solid var(--line); color: var(--text); }
.reel-msg-agent { align-self: flex-start; border-radius: 13px 13px 13px 4px; background: var(--accent-soft); border: 1px solid var(--accent-soft); color: var(--text); }

/* cream "paper" cards (cut list / shop pdf) */
.reel-paper {
  position: relative; width: min(300px, 82%);
  background: var(--card); color: var(--card-ink); border-radius: 10px;
  box-shadow: 0 30px 70px rgba(0,0,0,.5); padding: 16px 18px 14px;
}
.reel-paper-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px solid #241c12; padding-bottom: 8px; margin-bottom: 11px; }
.reel-paper-title { font: 800 13px var(--font-ui); }
.reel-paper-sub { font: 500 9.5px var(--font-mono); color: #6c6253; margin-top: 2px; }
.reel-paper-tag { font: 700 9px var(--font-mono); color: #6c6253; text-align: right; }
.reel-cut-table { width: 100%; border-collapse: collapse; font: 500 11px var(--font-mono); }
.reel-cut-table td { padding: 4px 2px; border-top: 1px solid #e7ddc9; }
.reel-cut-table td:last-child { text-align: right; color: #6c6253; }
.reel-paper-foot { display: flex; justify-content: center; gap: 14px; font: 600 10px var(--font-mono); color: #6c6253; border-top: 1px solid #e7ddc9; padding-top: 9px; margin-top: 10px; }
.reel-paper-foot b { color: #241c12; }
.reel-elev { height: 120px; margin: 2px 0 4px; }
.reel-elev svg { width: 100%; height: 100%; }
.reel-pdf-foot { letter-spacing: .04em; }
.reel-pdf-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; border-radius: 10px; font: 800 18px var(--font-ui); color: rgba(236,154,60,.16); transform: rotate(-24deg); white-space: nowrap; }

@media (max-width: 900px) {
  .hero-reel { display: none; }
  #trialPromptOverlay { justify-content: center; padding: 20px; overflow-y: auto; align-items: flex-start; }
  #app[data-hero="1"] #chat-panel { opacity: 1; }
}

/* Respect reduced-motion: stop the sheen / pulse / ghost caret / reel motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-cta-sheen, .hero-badge-dot, .hero-caret,
  .reel-step, .reel-card, .hero-cap.tick, .hero-card { animation: none !important; }
  .hero-cta:hover { transform: none; }
}
