/* Canvora product page. Builds on the shared product-page styles (/brioai/brioai.css). */
:root { --cv-violet: #6d4aff; --cv-blue: #3b82f6; --cv-cyan: #00c2ff; --cv-grad: linear-gradient(110deg, #6d4aff, #3b82f6 55%, #00c2ff); }
main > section { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px); }
.small { font-size: .88rem; }
.grad { background: var(--cv-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.frame { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.frame .bar, .cv-window .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .bar i:nth-child(2) { background: #febc2e; } .bar i:nth-child(3) { background: #28c840; }
.bar span { margin-left: 10px; font-weight: 600; }
.bar em { margin-left: auto; font-style: normal; font-weight: 600; color: var(--cv-violet); }

/* hero */
.cv-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 4vw, 64px); align-items: center; padding-top: clamp(40px, 6vw, 72px) !important; }
.cv-hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); margin: 1rem 0 1.1rem; text-wrap: balance; }
.cv-hero-visual { position: relative; padding: 18px 0 30px; }
.cv-window { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); transform: perspective(1600px) rotateY(-5deg) rotateX(2deg); transition: transform .6s var(--ease); }
.cv-hero-visual:hover .cv-window { transform: none; }
.cv-stage { background-color: #fff; background-image: linear-gradient(#eef0f6 1px, transparent 1px), linear-gradient(90deg, #eef0f6 1px, transparent 1px); background-size: 22px 22px; aspect-ratio: 800 / 520; }
.cv-stage svg { width: 100%; height: 100%; display: block; }
.cv-prompt { display: flex; align-items: center; gap: 8px; margin: -58px 16px 16px; position: relative; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .9rem; min-height: 44px; }
.cv-prompt .spark { color: var(--cv-violet); font-size: 1.05rem; }
.caret { width: 2px; height: 18px; background: var(--cv-violet); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.float { position: absolute; display: flex; flex-direction: column; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: bob 5s ease-in-out infinite; }
.float b { font: 700 1.45rem var(--display); background: var(--cv-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.float span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.f1 { left: -28px; top: 18%; } .f2 { right: -16px; top: 4%; animation-delay: -1.6s; } .f3 { right: 8%; bottom: 0; animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
svg .pop { animation: pop .45s cubic-bezier(.2, .9, .3, 1.25) both; transform-box: fill-box; transform-origin: center; }
svg .draw { animation: fadeIn .5s ease both; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
@keyframes fadeIn { from { opacity: 0; } }

/* numbers */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 0 !important; padding-bottom: 0 !important; }
.numbers div { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.numbers b { display: block; font: 700 2.2rem var(--display); background: var(--cv-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers span { color: var(--muted); font-size: .92rem; }

/* playground */
.pg-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: 22px; align-items: stretch; }
.pg-editor { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.pg-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-presets button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--font); color: var(--muted); cursor: pointer; transition: all .15s; }
.pg-presets button:hover { color: var(--text); border-color: rgba(109, 74, 255, .4); }
.pg-presets button.on { background: rgba(109, 74, 255, .1); border-color: var(--cv-violet); color: var(--cv-violet); }
#pgInput { flex: 1; min-height: 300px; resize: vertical; border: 1px solid var(--border); border-radius: 12px; padding: 14px; font: 500 .86rem/1.65 var(--mono); color: var(--text); background: #fbfcff; outline: none; }
#pgInput:focus { border-color: var(--cv-violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .12); }
.pg-help { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.pg-canvas { display: flex; flex-direction: column; }
.pg-stage { flex: 1; min-height: 420px; background-color: #fff; background-image: linear-gradient(#eef0f6 1px, transparent 1px), linear-gradient(90deg, #eef0f6 1px, transparent 1px); background-size: 20px 20px; display: grid; }
.pg-stage svg { width: 100%; height: 100%; min-height: 420px; display: block; }
.pg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }

/* pains */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pain { position: relative; height: 190px; perspective: 1000px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pain > span { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 18px; border: 1px solid var(--border); backface-visibility: hidden; transition: transform .6s var(--ease); box-shadow: var(--shadow); }
.p-front { background: var(--surface); }
.p-back { background: linear-gradient(140deg, #f3efff, #e7f6ff); transform: rotateY(180deg); border-color: rgba(109, 74, 255, .3) !important; }
.pain.flip .p-front { transform: rotateY(-180deg); }
.pain.flip .p-back { transform: rotateY(0); }
@media (hover: hover) { .pain:hover .p-front { transform: rotateY(-180deg); } .pain:hover .p-back { transform: rotateY(0); } }
.pain em { font-style: normal; font: 700 .72rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.p-back em { color: var(--cv-violet); }
.pain b { font: 600 1.18rem/1.3 var(--display); }
.pain small { color: var(--muted); font-size: .9rem; margin-top: auto; }
.p-back small { margin-top: 0; }

/* tour */
.tour-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.tour-tabs { display: flex; flex-direction: column; gap: 6px; }
.tour-tabs button { text-align: left; border: 1px solid transparent; background: none; border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; display: grid; gap: 2px; transition: background .2s, border-color .2s; }
.tour-tabs button b { font: 600 1rem var(--display); }
.tour-tabs button span { color: var(--muted); font-size: .86rem; }
.tour-tabs button:hover { background: var(--surface); }
.tour-tabs button.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.tour-tabs button.on b { color: var(--cv-violet); }
.tour-imgs { position: relative; aspect-ratio: 2160 / 1320; cursor: zoom-in; background: #f4f6fb; }
.tour-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity .5s; }
.tour-imgs img.on { opacity: 1; }
.tour-progress { height: 4px; background: var(--surface-2); }
.tour-progress i { display: block; height: 100%; width: 0; background: var(--cv-grad); }

/* speed */
.speed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.speed h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 1rem; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.keys li { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.keys li:hover { transform: translateX(6px); }
.keys span { margin-left: 8px; color: var(--muted); }
kbd { font: 600 .82rem var(--mono); padding: 4px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 3px; color: var(--text); white-space: nowrap; }

/* how */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps3 li { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.steps3 li > span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cv-grad); color: #fff; font: 700 1rem var(--display); margin-bottom: 14px; }
.steps3 h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.steps3 p { margin: 0; color: var(--muted); }

/* faq + final */
.faq { max-width: 860px !important; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font: 600 1.02rem var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--cv-violet); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.final { text-align: center; }
.final h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.4rem; }
.final .ctas { justify-content: center; }

.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 30, .82); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; font-size: 1.1rem; cursor: pointer; }

/* User guide video */
.guide-grid { grid-template-columns: 290px minmax(0, 1fr); align-items: stretch; }
.chapters { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.chapters button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font: 500 .95rem var(--font, inherit); color: var(--text, inherit); transition: background .2s; }
.chapters button:hover { background: var(--surface-2); }
.chapters button .ct { font: 600 .78rem var(--mono, ui-monospace, monospace); color: var(--muted); background: var(--surface-2); padding: 3px 7px; border-radius: 7px; min-width: 44px; text-align: center; }
.chapters button.on { background: rgba(109, 74, 255, .09); }
.chapters button.on .ct { background: var(--cv-violet); color: #fff; }
.chapters button.on b { color: var(--cv-violet); }
.chapters button:focus-visible { outline: 2px solid var(--cv-violet); outline-offset: 2px; }
.guide-frame { align-self: start; }
.guide-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1a1150; }
.guide-progress { height: 4px; background: var(--surface-2); }
.guide-progress i { display: block; height: 100%; width: 0; background: var(--cv-grad); transition: width .25s linear; }
.guide-cta { text-align: center; margin: 28px 0 0; }

@media (max-width: 1000px) {
  .guide-grid { grid-template-columns: 1fr; }
  .chapters { flex-direction: row; overflow-x: auto; order: 2; padding: 8px; }
  .chapters button { white-space: nowrap; }
  .cv-hero, .pg-grid, .tour-grid, .speed { grid-template-columns: 1fr; }
  .tour-tabs { flex-direction: row; overflow-x: auto; }
  .tour-tabs button { min-width: 220px; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .pain-grid, .steps3 { grid-template-columns: 1fr 1fr; }
  .float { display: none; }
}
@media (max-width: 640px) {
  .pain-grid, .steps3, .numbers { grid-template-columns: 1fr; }
  .cv-window { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
