/* Hover and focus feedback shared by every public page. */
.landing-page {
  --hover-time: 220ms;
  --hover-ease: cubic-bezier(.2, .75, .25, 1);
  --hover-ink: var(--ui-link, #375ce9);
  --hover-border: var(--ui-focus-border, #a5b8f7);
  --hover-tint: var(--ui-accent-bg, #edf2ff);
  --hover-shadow: 0 12px 30px #253f8814, 0 3px 8px #375ce90c;
}

html[data-site-theme="dark"] .landing-page {
  --hover-shadow: 0 12px 30px #0005, 0 0 0 1px #718ac619;
}

.landing-page :is(a, button, input, summary, .feature-icon, .glossary-card-icon, .glossary-chevron, .how-step > span) {
  transition: color var(--hover-time) ease, background-color var(--hover-time) ease,
    border-color var(--hover-time) ease, box-shadow var(--hover-time) ease,
    transform var(--hover-time) var(--hover-ease), text-decoration-color var(--hover-time) ease;
}

/* Cards and accordion containers keep their dimensions as they react. */
.landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
  .article-guide-row, .public-terms > div, .how-preview, .article-file-stack,
  .article-file, .glossary-visual-cards > div, .blog-aside-card, .blog-article-cta,
  .blog-toc, .blog-toc-mobile, .glossary-searchbox, .glossary-search,
  .landing-visual, .article-visual, .glossary-hero-visual) {
  transition: border-color var(--hover-time) ease, box-shadow var(--hover-time) ease,
    transform var(--hover-time) var(--hover-ease), background-color var(--hover-time) ease;
}

.landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
  .public-terms > div, .blog-toc, .glossary-searchbox, .glossary-search,
  .blog-aside-card, .blog-article-cta):focus-within {
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
}

.landing-page :is(.demo-browser, .demo-chat, .visual-floater, .article-demo-window,
  .article-visual-badge, .blog-card-mark, .glossary-sparkle, .file-type,
  .article-guide-row > span, .blog-read > span, .public-link-grid > a > span,
  .landing-pill .pill-star, .brand .logo, .site-theme-toggle svg, .landing-proof b),
.landing-final::after, .faq-list summary::after {
  transition: transform 320ms var(--hover-ease), box-shadow var(--hover-time) ease;
}
.landing-page :is(h1, h2, h3, dt, .glossary-card-title strong) {
  transition: color var(--hover-time) ease;
}
.public-link-grid > a > span { display: inline-block; }
.landing-page :is(.landing-nav a, .public-crumbs a, .blog-prose a,
  .legal-page a, .public-footer a, .blog-source a, .glossary-article-link) {
  text-underline-offset: .23em;
}
.landing-nav a { position: relative; }
.landing-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--hover-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--hover-time) var(--hover-ease);
}
.landing-nav a:focus-visible::after,
.landing-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Pointer-specific styling avoids sticky hover effects on touch screens. */
@media (hover: hover) and (pointer: fine) {
  .landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
    .article-guide-row, .public-terms > div, .how-preview, .article-file-stack,
    .article-file, .glossary-visual-cards > div, .blog-aside-card, .blog-article-cta,
    .blog-toc, .blog-toc-mobile, .landing-visual, .article-visual, .glossary-hero-visual):hover {
    border-color: var(--hover-border);
    box-shadow: var(--hover-shadow);
  }
  .landing-nav a:hover::after { transform: scaleX(1); }
  .landing-page :is(.landing-nav a, .public-crumbs a, .blog-prose a:not(.primary),
    .legal-page a, .public-footer a:not(.brand), .blog-source a,
    .blog-card-body h2 a, .glossary-article-link, .blog-pagination a):hover {
    color: var(--hover-ink);
  }
  .landing-page :is(.public-crumbs a, .blog-card-body h2 a, .blog-source a,
    .legal-page a:not(.outline), .glossary-article-link, .blog-pagination a):hover {
    text-decoration: underline;
  }
  .landing-page :is(.outline, .ghost, .glossary-quick a, .blog-topics a,
    .glossary-filters button:not([aria-pressed="true"]), .glossary-actions button,
    .article-demo-choices button:not([aria-pressed="true"]), .demo-options button:not([aria-pressed="true"])):hover {
    background-color: var(--hover-tint);
    color: var(--hover-ink);
    border-color: var(--hover-border);
  }
  .landing-page :is(a.primary, button.primary, .landing-final > a):hover {
    box-shadow: 0 10px 22px #375ce935;
  }
  .landing-page :is(.faq-list summary, .glossary-card summary, .blog-toc-mobile summary):hover {
    color: var(--hover-ink);
  }
  .glossary-card summary:hover .glossary-card-title strong { color: var(--hover-ink); }
  .glossary-card summary:hover .glossary-chevron { background-color: var(--hover-tint); }
  .landing-page :is(.how-step, .landing-feature, .article-guide-row, .public-terms > div):hover :is(h2, h3, dt) {
    color: var(--hover-ink);
  }
  .landing-page :is(.glossary-searchbox, .glossary-search, .legal-table-wrap):hover {
    border-color: var(--hover-border);
  }
  .landing-page :is(.hero-summary h1, .landing-section-head h2, .legal-page h2,
    .blog-prose h2, .blog-prose h3, .blog-hero h1, .blog-article-hero h1, .glossary-hero h1):hover {
    color: var(--hover-ink);
  }
  .legal-table td { transition: background-color var(--hover-time) ease; }
  .legal-table tbody tr:hover td { background-color: var(--ui-subtle, #f4f7fc); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .landing-page :is(.landing-feature, .blog-card, .article-guide-row,
    .public-terms > div, .how-preview, .glossary-visual-cards > div,
    .blog-aside-card, .blog-article-cta):hover { transform: translateY(-4px); }
  .landing-page :is(.faq-list details, .glossary-card, .article-file):hover {
    transform: translateY(-2px);
  }
  .landing-page :is(a.primary, a.outline, .landing-final > a, .glossary-quick a,
    .glossary-filters button, .blog-topics a, .cookie-banner-actions button,
    .demo-options button, .article-demo-choices button):not(:disabled):hover {
    transform: translateY(-2px);
  }
  .landing-page :is(.landing-feature, .how-preview):hover .feature-icon,
  .glossary-card summary:hover .glossary-card-icon,
  .article-file:hover .file-type,
  .how-step:hover > span, .article-guide-row:hover > span {
    transform: translateY(-2px) scale(1.08);
  }
  .brand:hover .logo, .site-theme-toggle:hover svg { transform: rotate(-8deg) scale(1.08); }
  .landing-pill:hover .pill-star { transform: rotate(20deg); }
  .landing-proof span:hover b, .faq-list summary:hover::after { transform: scale(1.13); }
  .landing-visual:hover .demo-browser { transform: translate(-3px, 2px); }
  .landing-visual:hover .demo-chat { transform: translate(2px, -4px); }
  .landing-visual:hover .visual-floater,
  .article-visual:hover .article-visual-badge { transform: translateY(-4px); }
  .article-visual:hover .article-demo-window { transform: translateY(-3px); }
  .glossary-hero-visual:hover .glossary-sparkle { transform: rotate(8deg) scale(1.06); }
  .blog-card:hover .blog-card-mark { transform: scale(1.09); }
  .blog-read:hover > span, .public-link-grid > a:hover > span { transform: translateX(4px); }
  .landing-final:hover::after { transform: scale(1.13); }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes public-details-in {
    from { opacity: .6; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .landing-page :is(.faq-list details, .glossary-card, .blog-toc-mobile)[open] > :not(summary) {
    animation: public-details-in 200ms var(--hover-ease) both;
  }
  .landing-page :is(button, a.primary, a.outline):not(:disabled):active {
    transform: scale(.98);
  }
}
@media (hover: none), (pointer: coarse) {
  .landing-page :is(button, .blog-card):hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page *, .landing-page *::before, .landing-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .landing-page :is(button, .blog-card):hover { transform: none; }
}
