/* The homepage welcome card: a light card over the dark caption editor, as at AutoSubtitles
   (docs/product-specs/2026-11-06-home-editor.md). The dialog paints its own dim backdrop, so the page looks the
   same before the script opens it as a modal and after. Phone first; 640, 768 and 1024 px add columns. On a phone
   the card fills the screen, so it reads as a page and not as a pop-up (2026-11-17-first-visit-clarity.md). */
dialog.hc {
    position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; overflow-y: auto; overscroll-behavior: contain;
    background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    color: #171717; color-scheme: light;
}
dialog.hc:not([open]) { display: none; }
dialog.hc::backdrop { background: transparent; }
dialog.hc[open] { animation: hc-dim 0.2s ease-out; }
dialog.hc[open] .hc-card { animation: hc-rise 0.3s ease-out; }
.hc-card {
    position: relative; width: 100%; max-width: 1024px; min-height: 100%; overflow: hidden; margin: 0 auto;
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    border: 0; background: #fff;
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", "Noto Sans Arabic", sans-serif;
}
.hc :focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
/* The card itself takes the first focus, so the close button does not open with a focus ring. */
.hc-card:focus { outline: none; }
.hc svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hc-close-form { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); z-index: 20; margin: 0; }
.hc-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.8); color: #737373; transition: color 0.15s; }
.hc-close:hover { color: #171717; }
.hc-close svg { width: 20px; height: 20px; }

/* Hero: a blue glow with a fading grid, the headline, one sentence and the upload button */
.hc-hero {
    position: relative; overflow: hidden; padding: calc(48px + env(safe-area-inset-top, 0px)) 20px 0;
    background: radial-gradient(ellipse 120% 80% at 50% 50%, rgba(59, 130, 246, 0.5) 0%, rgba(59, 130, 246, 0.25) 30%, rgba(147, 197, 253, 0.1) 55%, transparent 75%);
}
.hc-grid {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
    background-image: linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15));
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15));
}
.hc-hero-inner { position: relative; padding-bottom: 120px; text-align: center; }
.hc-logo { display: block; width: 56px; height: 56px; margin: 0 auto 20px; }
.hc h1 { margin: 0 0 24px; font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; color: #171717; text-wrap: balance; }
.hc h1 em { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; font-style: italic; font-weight: 500; }
.hc-chip { display: inline-block; padding: 0 8px 4px; border-radius: 12px; background: #000; color: #fff; }
.hc h1 br { display: none; }
.hc-lead { max-width: 640px; margin: 0 auto 32px; font-size: 17px; color: #404040; }
.hc-ring {
    display: inline-flex; padding: 5px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px;
    background: rgba(255, 255, 255, 0.3); -webkit-backdrop-filter: blur(64px); backdrop-filter: blur(64px);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.hc-ring-lg { box-shadow: 0 0 60px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.hc-upload {
    display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 18px 28px; border: 0; border-radius: 999px;
    background: #2563eb; color: #fff; font-size: 20px; font-weight: 600; line-height: 1.2; transition: background-color 0.15s, transform 0.15s;
}
.hc-upload:hover { background: #1d4ed8; }
.hc-upload:active { transform: scale(0.97); }
.hc-upload-sm { padding: 12px 32px; font-size: 16px; }
.hc-upload-sm svg { width: 20px; height: 20px; }
.hc-note { margin: 12px 0 0; font-size: 14px; color: #525252; }
/* Three facts under the upload button: what a visitor wonders before choosing a file. */
.hc-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; max-width: 720px; margin: 20px auto 0; padding: 0; list-style: none; font-size: 14px; font-weight: 500; color: #404040; }
.hc-facts li { display: inline-flex; align-items: center; gap: 6px; }
.hc-facts svg { width: 16px; height: 16px; color: #16a34a; stroke-width: 3; }
.hc-sample { margin: 16px 0 0; }
.hc-sample button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid #bfdbfe; border-radius: 999px;
    background: rgba(255, 255, 255, 0.85); color: #1d4ed8; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
    touch-action: manipulation; transition: background-color 0.15s, border-color 0.15s;
}
.hc-sample button svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.hc-sample button:hover { border-color: #93c5fd; background: #fff; color: #1e3a8a; }
.hc-sample button:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }

/* Four example clips: a swipe row with dots on a phone, a row of four from 768 px */
.hc-examples { position: relative; z-index: 10; margin: -64px 0 64px; }
.hc-strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hc-strip::-webkit-scrollbar { display: none; }
.hc-clip {
    flex: 0 0 55%; margin: 0; padding: 6px; scroll-snap-align: center; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 16px;
    background: rgba(255, 255, 255, 0.3); box-shadow: 0 0 60px rgba(59, 130, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(64px); backdrop-filter: blur(64px);
}
.hc-clip video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #000; }
.hc-clip figcaption { padding: 8px 4px 2px; font-size: 13px; font-weight: 600; text-align: center; color: #404040; }
.hc-dots { display: flex; justify-content: center; }
.hc-dots button { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; }
.hc-dots button::before { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 999px; background: #d4d4d4; transform: translate(-50%, -50%); transition: width 0.2s, background-color 0.2s; }
.hc-dots button[aria-current="true"]::before { width: 24px; background: #3b82f6; }

/* Sections */
.hc-body { padding: 0 20px; }
.hc-section { margin-bottom: 64px; }
.hc h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.25; font-weight: 700; text-align: center; color: #171717; text-wrap: balance; }
.hc h2.hc-h2-spaced { margin-bottom: 40px; }
.hc-sub { margin: 0 0 40px; text-align: center; color: #737373; }
.hc-sub a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.hc-sub a:hover { color: #171717; }

.hc-features { display: grid; gap: 32px; align-items: start; }
.hc-feature-list { display: grid; gap: 4px; }
.hc-feature { border-radius: 12px; transition: background-color 0.15s; }
.hc-feature:hover { background: #fafafa; }
.hc-feature.is-open { background: #f5f5f5; }
.hc-feature-head { display: flex; gap: 16px; align-items: center; width: 100%; min-height: 44px; padding: 16px; border: 0; border-radius: 12px; background: none; color: #171717; font-weight: 600; text-align: left; }
.hc-feature-head svg { width: 20px; height: 20px; flex: none; color: #2563eb; }
.hc-feature-text { margin: -12px 0 0; padding: 0 16px 16px 52px; font-size: 14px; color: #525252; }
.hc-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 600; }
.hc-demo { padding: 6px; border-radius: 16px; background: linear-gradient(to bottom, #3b82f6, #fff); }
.hc-demo-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; height: 380px; padding: 24px 16px; border-radius: 10px; background: #fff; }
.hc-wave { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 84px; }
.hc-wave i { width: 4px; height: 40px; border-radius: 999px; background: rgba(96, 165, 250, 0.7); transform-origin: bottom; animation: hc-wave 1.5s ease-in-out infinite alternate; }
.hc-wave i:nth-child(6n + 1) { height: 35px; }
.hc-wave i:nth-child(6n + 2) { height: 62px; animation-delay: 0.1s; }
.hc-wave i:nth-child(6n + 3) { height: 26px; animation-delay: 0.2s; }
.hc-wave i:nth-child(6n + 4) { height: 78px; animation-delay: 0.3s; }
.hc-wave i:nth-child(6n + 5) { height: 46px; animation-delay: 0.4s; }
.hc-wave i:nth-child(6n) { height: 68px; animation-delay: 0.5s; }
.hc-lines { display: grid; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
.hc-lines li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 12px; border-radius: 8px; background: #f5f5f5; animation: hc-up 0.4s ease-out both; }
.hc-lines li:nth-child(2) { animation-delay: 0.15s; }
.hc-lines li:nth-child(3) { animation-delay: 0.3s; }
.hc-lines li:nth-child(4) { animation-delay: 0.45s; }
.hc-lines time { flex: none; margin-top: 3px; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #3b82f6; }
.hc-lines span { flex: 1; min-width: 0; font-size: 14px; color: #404040; }
.hc-lines span[dir="rtl"] { text-align: right; }
.hc-typing { display: flex; gap: 4px; padding-top: 5px; }
.hc-typing i { width: 8px; height: 8px; border-radius: 999px; background: #60a5fa; animation: hc-bounce 1s ease-in-out infinite; }
.hc-typing i:nth-child(2) { animation-delay: 0.15s; }
.hc-typing i:nth-child(3) { animation-delay: 0.3s; }

.hc-cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.hc-cards-4 { margin-bottom: 40px; counter-reset: hc-step; }
/* The steps are numbered, so the order reads at a glance. */
.hc-cards-4 > li { position: relative; counter-increment: hc-step; }
.hc-cards-4 > li::before {
    content: counter(hc-step); position: absolute; top: 12px; left: 12px; display: grid; place-items: center; width: 24px; height: 24px;
    border-radius: 999px; background: #2563eb; color: #fff; font-size: 13px; font-weight: 700;
}
.hc-tile { padding: 20px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fafafa; }
.hc-tile h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: #171717; }
.hc-tile p { margin: 0; font-size: 14px; color: #525252; }
.hc-center { text-align: center; }
.hc-center > svg { display: block; width: 28px; height: 28px; margin: 0 auto 10px; color: #2563eb; }
.hc-center h3 { margin-bottom: 4px; }
.hc-icon { display: inline-flex; margin-bottom: 16px; padding: 8px; border-radius: 12px; background: #dbeafe; color: #2563eb; }
.hc-plan { padding: 24px; border: 1px solid #e5e5e5; border-radius: 16px; background: #fafafa; }
.hc-plan-blue { border-color: #bfdbfe; background: #eff6ff; }
.hc-plan-amber { border-color: #fde68a; background: rgba(255, 251, 235, 0.6); }
.hc-plan h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #171717; }
.hc-plan > p { margin: 0 0 24px; font-size: 14px; color: #6b6b6b; }
.hc-plan ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hc-plan li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #404040; }
.hc-plan li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 999px; background: #a3a3a3; }
.hc-plan-blue li::before { background: #3b82f6; }
.hc-plan-amber li::before { background: #f59e0b; }
.hc-plans { margin-bottom: 40px; }
.hc-cta { text-align: center; }
.hc-faq { display: grid; gap: 12px; margin-bottom: 64px; }
.hc-qa { padding: 16px; border: 1px solid #f5f5f5; border-radius: 8px; background: #fafafa; }
.hc-qa h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: #171717; }
.hc-qa p { margin: 0; font-size: 14px; color: #525252; }

/* Footer: the site footer groups on a dark band */
.hc-footer { padding: 32px 20px; border-top: 1px solid #262626; background: #171717; color: #d4d4d4; font-size: 14px; }
.hc-footer :focus-visible { outline-color: #fff; }
.hc-footer .uf-footer-grid { display: grid; gap: 24px; }
/* As at AutoSubtitles' home: the link groups only, with no brand blurb and no bottom row. */
.hc-footer :is(.uf-footer-brand, .uf-footer-bottom) { display: none; }
.hc-footer .uf-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.hc-footer .uf-brand img { width: 32px; height: 32px; }
.hc-footer .uf-footer-brand p { max-width: 280px; margin: 12px 0 0; color: #a3a3a3; }
.hc .hc-footer h2 { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-align: left; text-transform: uppercase; color: #808080; }
.hc-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hc-footer ul a { color: inherit; text-decoration: none; transition: color 0.15s; }
.hc-footer ul a:hover { color: #fff; }
.hc-footer .uf-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #262626; color: #808080; font-size: 13px; }
@media (pointer: coarse) {
    .hc-footer ul { gap: 0; }
    .hc-footer :is(ul a, .uf-brand) { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
}

@media (min-width: 400px) {
    .hc-upload { padding: 20px 48px; }
    .hc-upload-sm { padding: 12px 32px; }
}
@media (min-width: 640px) {
    dialog.hc { padding: 0 max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px)); }
    .hc-card {
        min-height: 0; margin: calc(48px + env(safe-area-inset-top, 0px)) auto calc(64px + env(safe-area-inset-bottom, 0px)); padding: 0;
        border: 1px solid #dbeafe; border-radius: 16px; box-shadow: 0 0 80px rgba(59, 130, 246, 0.18);
    }
    .hc-hero { padding-top: 56px; }
    .hc-close-form { top: 12px; right: 12px; }
    .hc h1 { font-size: 52px; }
    .hc h1 br { display: inline; }
    .hc-cards-4, .hc-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hc-footer .uf-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .hc-hero { padding: 56px 32px 0; }
    .hc h1 { margin-bottom: 28px; font-size: 72px; line-height: 1.15; }
    .hc-lead { font-size: 19px; }
    .hc-facts { font-size: 15px; }
    .hc-upload { padding: 20px 48px; font-size: 24px; }
    .hc-upload-sm { padding: 12px 32px; font-size: 18px; }
    .hc-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; padding: 0 32px; }
    .hc-dots { display: none; }
    .hc-body { padding: 0 32px; }
    .hc h2 { font-size: 30px; }
    .hc-footer { padding: 40px 32px; }
}
@media (min-width: 1024px) {
    .hc-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hc-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hc-footer .uf-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@keyframes hc-dim { from { background-color: rgba(0, 0, 0, 0); } }
@keyframes hc-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes hc-wave { from { transform: scaleY(0.45); } to { transform: scaleY(1); } }
@keyframes hc-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hc-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
    .hc, .hc *, .hc *::before { animation: none !important; transition: none !important; }
}
