/* Public home and demo pages: the AI case builder story, on top of landing_page.css (header, buttons,
   testimonials, pricing cards, sign-in dialog). Calm, roomy and compact; one accent colour. */

:root {
    --hm-ink: #0f172a;
    --hm-text: #475569;
    --hm-muted: #64748b;
    --hm-line: #e6eaf0;
    --hm-surface: #ffffff;
    --hm-tint: #f6f8fb;
    --hm-accent: var(--theme-color, #0a84ff);
    --hm-accent-soft: rgba(10, 132, 255, 0.09);
    --hm-radius: 16px;
    --hm-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px -18px rgba(15, 23, 42, 0.28);
}

body.hm-page { background: var(--hm-surface); }

/* Hero: the original layout (landing_page.css) */
.hm-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hm-actions--center { justify-content: center; }
.hm-play i { font-size: 0.8em; margin-right: 0.35rem; }
.hero-image-slider img { object-position: top left; }
/* Product screens: a calm crossfade, 6 s on each with a 1 s fade, no 3D motion (overrides landing_page.css). */
.hero-section .hero-image-slider img { transform: none; animation: heroFade 28s ease-in-out infinite; }
.hero-section .hero-image-slider img:nth-child(1) { animation-delay: -1s; }  /* first screen already showing on load */
.hero-section .hero-image-slider img:nth-child(2) { animation-delay: 6s; }
.hero-section .hero-image-slider img:nth-child(3) { animation-delay: 13s; }
.hero-section .hero-image-slider img:nth-child(4) { animation-delay: 20s; }
@keyframes heroFade {
    0% { opacity: 0; }
    3.6%, 25% { opacity: 1; }
    28.6%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-section .hero-image-slider img { animation: none; opacity: 0; }
    .hero-section .hero-image-slider img:first-child { opacity: 1; }
}
.hero-highlights i { flex: none; }  /* icons keep their size, so every card's text starts at the same line */
.hero-highlights li { align-items: center; }
/* A little more room on wide screens; header, hero and sections share the same edges. */
.container { max-width: 1240px; }
@media (min-width: 1101px) {
    .hero-container { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 3.5rem; }
    .hero-cta { justify-content: flex-start; margin: 0; }  /* buttons line up with the text above them */
}

/* "Got an RFE?": one quiet line under the hero buttons and the pricing intro; in the hero, "RFE" is bold red */
.hero-rfe, .plans-rfe { margin: 1rem 0 0; font-size: 0.92rem; color: var(--hm-muted); text-align: center; }
.hero-rfe a, .plans-rfe a { color: var(--hm-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero-rfe a:hover, .plans-rfe a:hover { text-decoration: underline; }
.hero-rfe__tag { color: #dc2626; font-weight: 800; }

/* Hero illustration (public/_hero_visual.html): documents flow into the Casyt mark and come out as a checked,
   cited petition. Drawn rather than a product screenshot. Cards float, the flow moves, the checks tick in turn. */
.hero-visual { display: flex; }
.hv {
    position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden;
    border-radius: 16px; border: 1px solid rgba(15, 23, 42, 0.06);
    background:
        radial-gradient(circle at 12% 18%, rgba(130, 112, 250, 0.12), transparent 42%),
        radial-gradient(circle at 92% 88%, rgba(255, 126, 175, 0.12), transparent 46%),
        radial-gradient(circle at 70% 8%, rgba(105, 202, 235, 0.10), transparent 40%),
        linear-gradient(180deg, #fbfcfe, #f4f7fb);
    box-shadow: 0 20px 40px -16px rgba(15, 23, 42, 0.25);
}
.hv::before {  /* a faint dot grid, like paper under the cards */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 85%); mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 85%);
}
.hv svg { position: relative; display: block; width: 100%; height: 100%; }
.hv__compact { display: none !important; }
@media (max-width: 640px) {
    .hv__wide { display: none !important; }
    .hv__compact { display: block !important; }
}
.hv .hv-doc, .hv .hv-paper, .hv .hv-mark, .hv .hv-check { transform-box: fill-box; transform-origin: center; }
.hv .hv-doc { animation: hvIn 0.7s cubic-bezier(.2, .7, .2, 1) both, hvFloat 6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.12s), calc(0.8s + var(--i) * 0.9s); }
.hv .hv-paper { animation: hvIn 0.8s cubic-bezier(.2, .7, .2, 1) 0.45s both; }
.hv .hv-mark { animation: hvIn 0.7s cubic-bezier(.2, .7, .2, 1) 0.3s both; }
.hv .hv-glow { transform-box: fill-box; transform-origin: center; animation: hvGlow 4s ease-in-out infinite; }
.hv .hv-flow { animation: hvFlow 1.4s linear infinite; }
.hv .hv-scan { transform-box: view-box; animation: hvScan 5s ease-in-out 1.2s infinite; opacity: 0; }
.hv .hv-check { animation: hvIn 0.6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(0.9s + var(--i) * 0.25s); }
.hv .hv-check__dot { transform-box: fill-box; transform-origin: center; animation: hvTick 6s ease-in-out infinite;
    animation-delay: calc(1.6s + var(--i) * 0.6s); }
@keyframes hvIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hvFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes hvGlow { 0%, 100% { opacity: 0.75; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes hvFlow { to { stroke-dashoffset: -22; } }
@keyframes hvScan { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 80% { opacity: 1; transform: translateY(150px); } 100% { opacity: 0; transform: translateY(160px); } }
@keyframes hvTick { 0%, 12%, 100% { transform: scale(1); } 6% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
    .hv .hv-doc, .hv .hv-paper, .hv .hv-mark, .hv .hv-glow, .hv .hv-flow, .hv .hv-check, .hv .hv-check__dot { animation: none; }
    .hv .hv-scan { display: none; }
}
.plans-rfe { margin-top: 0.5rem; }
@media (min-width: 1101px) { .hero-rfe { text-align: left; } }

/* Numbers */
.hm-stats { padding: 2rem 0 1.25rem; border-top: 1px solid var(--hm-line); border-bottom: 1px solid var(--hm-line); background: #fff; }
.hm-stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; text-align: center; }
.hm-stats__grid strong { display: block; font-size: 1.85rem; line-height: 1.15; color: var(--hm-ink); letter-spacing: -0.02em; }
.hm-stats__grid span { display: block; margin-top: 0.25rem; font-size: 0.92rem; color: var(--hm-text); }
.hm-stats__note { margin-top: 0.9rem; text-align: center; font-size: 0.75rem; color: var(--hm-muted); }

/* Sections */
.hm-section { padding: 4.5rem 0; background: #fff; }
.hm-section--tint { background: var(--hm-tint); }
.hm-head { max-width: 40rem; margin: 0 auto 2.5rem; text-align: center; }
.hm-head--left { margin-left: 0; text-align: left; }
.hm-eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hm-accent); }
.hm-head h1, .hm-head h2 { margin: 0.5rem 0 0.6rem; color: var(--hm-ink); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em; }
.hm-head p { margin: 0; color: var(--hm-text); font-size: 1.02rem; }


/* How it works: one light line of four steps */
.hm-flow { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; position: relative; }
.hm-flow::before { content: ""; position: absolute; top: 17px; left: 12.5%; right: 12.5%; height: 1px; background: var(--hm-line); }
.hm-flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; }
.hm-flow span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 0.55rem; border-radius: 50%; background: #fff; border: 1px solid rgba(10, 132, 255, 0.35); color: var(--hm-accent); font-weight: 700; font-size: 0.9rem; position: relative; }
.hm-flow strong { color: var(--hm-ink); font-size: 1rem; font-weight: 600; }
.hm-flow em { font-style: normal; color: var(--hm-muted); font-size: 0.9rem; }



/* Pricing: real prices only, so the struck-through "was" price is gone */
.plan-price { display: flex; align-items: baseline; }

/* FAQ */
.hm-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 3rem; align-items: start; }
.hm-faq .hm-head { margin-bottom: 0; }
.hm-faq__list details { border-bottom: 1px solid var(--hm-line); }
.hm-faq__list details:first-child { border-top: 1px solid var(--hm-line); }
.hm-faq__list summary {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0;
    cursor: pointer; list-style: none; font-weight: 600; color: var(--hm-ink);
}
.hm-faq__list summary::-webkit-details-marker { display: none; }
.hm-faq__list summary::after { content: "+"; flex: none; font-size: 1.3rem; font-weight: 400; color: var(--hm-muted); transition: transform 0.2s ease; }
.hm-faq__list details[open] summary::after { transform: rotate(45deg); }
.hm-faq__list p { margin: 0 0 1.2rem; color: var(--hm-text); line-height: 1.65; }

/* Demo page */
.hm-demo { padding: 2rem 0 3rem; background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); }
.hm-head--tight { margin-bottom: 1.5rem; }
.hm-demo h1 { margin-top: 0; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.hm-demo .hm-head p { font-size: 1rem; }
.hm-player { position: relative; max-width: 980px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #0b1220; border: 1px solid var(--hm-line); box-shadow: 0 30px 70px -32px rgba(15, 23, 42, 0.45); }
.hm-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0b1220; object-fit: cover; }
.hm-player.is-playing video { object-fit: contain; }
/* One clear play button over a clean product frame; the native controls appear once it plays. */
.hm-player__start {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
    border: 0; padding: 0; cursor: pointer; background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.32));
    color: #fff; font: inherit; transition: background 0.2s ease;
}
.hm-player__start:hover { background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.42)); }
.hm-player__start:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.hm-player__icon {
    display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, 0.96);
    color: var(--hm-accent); font-size: 1.5rem; padding-left: 4px; box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.5);
    transition: transform 0.2s ease;
}
.hm-player__start:hover .hm-player__icon { transform: scale(1.06); }
.hm-player__label { padding: 0.4rem 0.85rem; border-radius: 999px; background: rgba(15, 23, 42, 0.62); font-size: 0.92rem; font-weight: 600; }
.hm-player__label span { margin-left: 0.4rem; font-weight: 500; opacity: 0.8; }
.hm-player.is-playing .hm-player__start { display: none; }
/* Captions: small and quiet, not the browser's oversized default */
.hm-player video::cue { font-size: 15px; line-height: 1.4; background: rgba(15, 23, 42, 0.72); color: #fff; }
@media (max-width: 620px) {
    .hm-player__icon { width: 60px; height: 60px; font-size: 1.2rem; }
    .hm-player video::cue { font-size: 12px; }
}
.hm-empty { text-align: center; color: var(--hm-muted); }
.hm-guides { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 1rem; }
.hm-guide { display: flex; flex-direction: column; gap: 0.35rem; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.hm-guide__thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--hm-line); background: #e9eef5; aspect-ratio: 16 / 9; }
.hm-guide__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.hm-guide__badge {
    position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px;
    border-radius: 999px; background: rgba(15, 23, 42, 0.78); color: #fff; font-size: 0.72rem; font-weight: 600;
}
.hm-guide__badge i { font-size: 0.6rem; }
.hm-guide:hover .hm-guide__thumb img { transform: scale(1.03); }
.hm-guide:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 4px; border-radius: 12px; }
.hm-guide__title { margin-top: 0.35rem; font-weight: 600; color: var(--hm-ink); font-size: 0.95rem; line-height: 1.35; }
.hm-guide__text { font-size: 0.85rem; line-height: 1.5; color: var(--hm-text); }

/* Cards in one row share their lines, so titles, text, prices, lists and buttons stay level when anything wraps. */
@supports (grid-template-rows: subgrid) {
    .plans-grid > .plan-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 1rem; align-content: start; }
    .plans-grid > .plan-card .plan-card__badge { justify-self: start; }
    .plans-grid > .plan-card .plan-cta { align-self: end; }
    .plans-grid > .plan-card ul { align-content: start; }
}

/* Footer and closing call to action: headings level, buttons side by side */
.footer-content { align-items: start; }
.footer-social h4 { margin: 0 0 0.25rem; color: #fff; font-size: 1rem; }
.cta-inner > div:first-child { flex: 1 1 auto; min-width: 0; }
.cta-actions { flex: none; }
.cta-actions { flex-wrap: nowrap; }
.cta-actions .btn { white-space: nowrap; }

@media (max-width: 1080px) {
    .hm-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .hm-faq { grid-template-columns: 1fr; gap: 1.5rem; }
    .hm-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .hm-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
    .hm-flow::before { display: none; }
}
@media (max-width: 620px) {
    .hm-section { padding: 3.25rem 0; }
    .hm-stats__grid { grid-template-columns: 1fr; gap: 1rem; }
    .hm-actions .btn, .cta-actions .btn { flex: 1 1 100%; text-align: center; }
    .cta-actions { flex-wrap: wrap; }
    .hm-guides { grid-template-columns: 1fr; }
}

/* Never let a page drift sideways on a trackpad or phone (clip does not break sticky headers). */
html, body { overflow-x: clip; }
