/* Kinvra AI — shared header menus, footer site map, and the building blocks of
   the inner pages (site/components.mjs). Loaded after site.css. */

/* ---------- skip link ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; transition: top 0.2s var(--ease); }
.skip:focus { top: 10px; text-decoration: none; }

/* ---------- header menus ---------- */
.nav-item { position: static; display: flex; }
.nav-links { align-items: center; }
.nav-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; letter-spacing: -0.01em; cursor: pointer; transition: color 0.3s var(--ease); }
.nav-trigger::after { content: ""; width: 6px; height: 6px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.25s var(--ease); opacity: 0.7; }
.nav-trigger[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.nav-trigger:hover, .nav-trigger[aria-expanded="true"], .nav-trigger[data-current] { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav.dark .nav-trigger { color: #d2d2d7; }
.nav.dark .nav-trigger:hover, .nav.dark .nav-trigger[aria-expanded="true"] { color: #fff; }
.nav.menu-open { background: rgba(255, 255, 255, 0.96); border-bottom-color: rgba(0, 0, 0, 0.08); }
.nav.dark.menu-open { background: rgba(22, 22, 23, 0.96); }

.mega { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.08); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18); animation: mega-in 0.28s var(--ease); }
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px); } }
.mega-inner { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 48px; padding-block: 30px 36px; }
.mega-title { margin-bottom: 14px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.mega-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; margin-inline: -12px; border-radius: 14px; color: var(--ink) !important; font-weight: 400 !important; transition: background-color 0.2s var(--ease); }
.mega-link:hover { background: var(--bg-2); text-decoration: none; }
.mega-link strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.mega-link small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--ink-3); }
.mega-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: linear-gradient(135deg, rgba(41, 151, 255, 0.14), rgba(255, 79, 216, 0.14)); }
.mega-icon svg { width: 20px; height: 20px; fill: none; stroke: #5b3fd6; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.mega ul a { display: block; padding: 7px 0; color: var(--ink) !important; font-size: 15px !important; font-weight: 500; }
.mega ul a:hover { color: var(--blue) !important; text-decoration: none; }
.mega-side { padding-left: 32px; border-left: 1px solid var(--line); }
.mega-side .chev { margin-top: 14px; font-size: 14px; }
.mega-copy { font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.mega-promo { display: grid; gap: 2px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(41, 151, 255, 0.1), rgba(255, 79, 216, 0.1)); color: var(--ink) !important; font-size: 14px !important; }
.mega-promo:hover { text-decoration: none; background: linear-gradient(135deg, rgba(41, 151, 255, 0.16), rgba(255, 79, 216, 0.16)); }
.mega-promo strong { font-size: 15px; }
.mega-promo small { color: var(--ink-3); line-height: 1.35; }
.mega-promo-tag { justify-self: start; padding: 1px 8px; border-radius: 980px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.nav.dark .mega-promo { color: #f5f5f7 !important; }
.nav.dark .mega-promo small { color: #a1a1a6; }
.nav.dark .mega { background: #161617; border-bottom-color: rgba(255, 255, 255, 0.08); }
.nav.dark .mega-link, .nav.dark .mega ul a { color: #f5f5f7 !important; }
.nav.dark .mega-link:hover { background: rgba(255, 255, 255, 0.06); }
.nav.dark .mega-side { border-left-color: rgba(255, 255, 255, 0.12); }

.nav-cta { margin-left: 0; }
.nav-book { margin-left: 4px; }
.nav.dark .nav-book { color: #2997ff; box-shadow: inset 0 0 0 1px #2997ff; }
.mm-book { margin-top: 10px; }
.nav-burger { display: none; position: relative; width: 38px; height: 38px; margin-right: -8px; border: 0; background: none; cursor: pointer; }
.nav-burger span { position: absolute; left: 10px; right: 10px; height: 1.6px; border-radius: 2px; background: var(--ink); transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { top: 22px; }
.nav.mm-open .nav-burger span:nth-child(1) { top: 18.5px; transform: rotate(45deg); }
.nav.mm-open .nav-burger span:nth-child(2) { top: 18.5px; transform: rotate(-45deg); }
.nav.dark .nav-burger span { background: #f5f5f7; }

.mobile-menu { position: fixed; inset: 52px 0 0 0; z-index: 60; overflow-y: auto; background: rgba(255, 255, 255, 0.98); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: mm-in 0.3s var(--ease); overscroll-behavior: contain; }
@keyframes mm-in { from { opacity: 0; transform: translateY(-8px); } }
.mm-inner { display: grid; gap: 4px; padding-block: 18px calc(40px + env(safe-area-inset-bottom)); }
.mm-group { border-bottom: 1px solid var(--line); }
.mm-group summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); cursor: pointer; list-style: none; }
.mm-group summary::-webkit-details-marker { display: none; }
.mm-plus { position: relative; width: 14px; height: 14px; }
.mm-plus::before, .mm-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; background: var(--ink-3); transition: transform 0.25s var(--ease); }
.mm-plus::after { transform: rotate(90deg); }
.mm-group[open] .mm-plus::after { transform: rotate(0deg); }
.mm-group ul, .mm-links { list-style: none; margin: 0; padding: 0 0 12px; display: grid; gap: 2px; }
.mm-group a { display: block; padding: 9px 0; font-size: 17px; color: var(--ink-2); }
.mm-links { padding-top: 6px; }
.mm-links a { display: block; padding: 14px 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-menu a:hover { text-decoration: none; color: var(--blue); }
.mm-cta { margin-top: 20px; width: 100%; }
html.mm-lock, html.mm-lock body { overflow: hidden; }

@media (max-width: 1100px) { .nav-book { display: none; } }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-burger { display: block; }
}
@media (max-width: 360px) {
  .nav-cta { display: none; }
  .nav-burger { margin-left: auto; }
}

/* ---------- footer site map ---------- */
.footer-sitemap { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; }
.footer-brand .logo { margin-bottom: 12px; font-size: 15px; }
.footer-brand .logo svg { width: 22px; height: 22px; }
.footer-brand p { max-width: 34ch; line-height: 1.5; }
.footer-brand p a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 900px) { .footer-sitemap { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-sitemap { grid-template-columns: 1fr; } }

/* ---------- inner pages ---------- */
.pg-crumbs { padding-bottom: 28px; }
.pg-hero .pg-crumbs { margin-top: -30px; }
.pg-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-3); }
.pg-crumbs li + li::before { content: "›"; margin-right: 6px; color: #a1a1a6; }
.pg-crumbs a { color: var(--ink-3); }

.pg-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 56px 88px; }
.pg-hero:not(.has-media) { padding-bottom: 48px; }
.pg-hero-glow { position: absolute; inset: -40% -10% auto; height: 640px; z-index: -1; pointer-events: none; background: radial-gradient(40% 50% at 20% 30%, rgba(142, 197, 255, 0.45), transparent 70%), radial-gradient(35% 45% at 55% 10%, rgba(201, 182, 255, 0.45), transparent 70%), radial-gradient(35% 45% at 85% 35%, rgba(255, 196, 236, 0.45), transparent 70%); filter: blur(20px); }
.pg-hero-inner { display: grid; gap: 48px; align-items: center; }
.pg-hero:not(.has-media) .pg-hero-inner { text-align: center; }
.pg-hero:not(.has-media) .pg-lede { margin-inline: auto; }
.pg-hero:not(.has-media) .pg-actions { justify-content: center; }
.pg-hero.has-media .pg-hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.pg-title, .pg-h2, .pg-h3, .pg-card h3 { text-wrap: balance; }
.pg-lede, .pg-sub, .pg-card p, .pg-split-copy > p, .pg-faq-a p, .pg-prose p { text-wrap: pretty; }
.pg-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.04em; }
.pg-lede { margin-top: 20px; max-width: 46ch; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.4; font-weight: 500; letter-spacing: -0.02em; color: var(--ink-3); }
.pg-note { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.pg-hero-media { position: relative; border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.35); aspect-ratio: 3 / 2; }
.pg-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.pg-hero.dark { background: var(--black); color: var(--on-dark); }
.pg-hero.dark .pg-lede { color: var(--on-dark-2); }

.pg-section { padding-block: 96px; scroll-margin-top: 52px; }
.pg-section.alt { background: var(--bg-2); }
.pg-section.dark { background: var(--black); color: var(--on-dark); }
.pg-section.dark .pg-sub, .pg-section.dark .pg-card p { color: var(--on-dark-2); }
.pg-narrow { max-width: 820px; }
.pg-head { max-width: 760px; margin-bottom: 52px; }
.pg-head.center { margin-inline: auto; text-align: center; }
.pg-h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.07; font-weight: 700; letter-spacing: -0.035em; }
.pg-h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; }
.pg-sub { margin-top: 16px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.45; color: var(--ink-3); font-weight: 500; letter-spacing: -0.015em; }
.pg-head.center .pg-sub { margin-inline: auto; max-width: 52ch; }

.pg-cards { display: grid; gap: 18px; }
.pg-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pg-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius-lg); background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 40px -28px rgba(0, 0, 0, 0.22); color: var(--ink); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.pg-section:not(.alt):not(.dark) .pg-card { background: var(--bg-2); box-shadow: none; }
.pg-card h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; }
.pg-card p { color: var(--ink-3); line-height: 1.5; }
.pg-card.link:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 30px 60px -30px rgba(0, 0, 0, 0.3); text-decoration: none; }
.pg-card .chev { margin-top: auto; padding-top: 6px; font-size: 15px; }
.pg-card .pg-card-eyebrow { font-size: 13px; font-weight: 600; color: #5b3fd6; }
.pg-section.dark .chev, .pg-hero.dark .chev, .pg-section.dark .pg-card .chev { color: #2997ff; }
.pg-section.dark .pg-card .pg-card-eyebrow { color: #b9a8ff; }
.pg-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, rgba(41, 151, 255, 0.14), rgba(255, 79, 216, 0.14)); }
.pg-icon svg { width: 24px; height: 24px; fill: none; stroke: #5b3fd6; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pg-section.dark .pg-card { background: #161617; box-shadow: none; color: var(--on-dark); }
.pg-section.dark .pg-icon svg { stroke: #b9a8ff; }

.pg-checks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.pg-checks li { display: flex; gap: 11px; align-items: flex-start; line-height: 1.45; }
.pg-checks svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.pg-checks circle { fill: var(--blue); }
.pg-checks path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.pg-split + .pg-split { margin-top: 88px; }
.pg-split.reverse .pg-split-media { order: 2; }
.pg-split-media { border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 3 / 2; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.35); }
.pg-split-media img { width: 100%; height: 100%; object-fit: cover; }
.pg-split-copy > p { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--ink-3); }
.pg-split-copy .chev { margin-top: 20px; }

.pg-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pg-steps li { padding: 26px; border-radius: var(--radius-lg); background: var(--bg); }
.pg-section:not(.alt) .pg-steps li { background: var(--bg-2); }
.pg-step-n { display: block; margin-bottom: 18px; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pg-steps h3 { font-size: 19px; letter-spacing: -0.02em; }
.pg-steps p { margin-top: 8px; color: var(--ink-3); line-height: 1.5; }

.pg-faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.pg-faq-item { border-bottom: 1px solid var(--line); }
.pg-faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; cursor: pointer; list-style: none; }
.pg-faq-item summary::-webkit-details-marker { display: none; }
.pg-faq-icon { position: relative; width: 16px; height: 16px; flex: none; }
.pg-faq-icon::before, .pg-faq-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px; background: var(--ink-3); transition: transform 0.3s var(--ease); }
.pg-faq-icon::after { transform: rotate(90deg); }
.pg-faq-item[open] .pg-faq-icon::after { transform: rotate(0deg); }
.pg-faq-a { padding: 0 36px 22px 0; color: var(--ink-3); font-size: 17px; line-height: 1.55; }
.pg-faq-item summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }

.pg-cta { padding-block: 40px 110px; }
.pg-cta-panel { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 7vw, 80px) clamp(22px, 6vw, 80px); border-radius: var(--radius-xl); background: #0b0b0f; color: var(--on-dark); text-align: center; }
.pg-cta-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 20% 0%, rgba(41, 151, 255, 0.35), transparent 70%), radial-gradient(45% 60% at 85% 100%, rgba(255, 79, 216, 0.3), transparent 70%); }
.pg-cta-panel .pg-sub { color: var(--on-dark-2); margin-inline: auto; max-width: 52ch; }
.pg-grade-form { display: flex; gap: 8px; max-width: 560px; margin: 32px auto 18px; padding: 6px; border-radius: 980px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.pg-grade-form input { flex: 1; min-width: 0; padding: 0 18px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 17px; outline: none; }
.pg-grade-form input::placeholder { color: rgba(255, 255, 255, 0.55); }
.pg-grade-form:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 4px rgba(41, 151, 255, 0.3); }
.pg-cta-panel .chev { color: #2997ff; }

.pg-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pg-related-item { position: relative; display: grid; gap: 4px; padding: 22px 48px 22px 22px; border-radius: 18px; background: var(--bg); color: var(--ink); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.pg-related-item:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.3); text-decoration: none; }
.pg-related-item strong { font-size: 17px; letter-spacing: -0.015em; }
.pg-related-item span:not(.pg-arrow) { font-size: 14px; color: var(--ink-3); line-height: 1.4; }
.pg-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--blue); font-size: 18px; transition: transform 0.3s var(--ease); }
.pg-related-item:hover .pg-arrow { transform: translate(4px, -50%); }

.pg-prose { max-width: 720px; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.pg-prose p + p { margin-top: 18px; }
.pg-prose h3 { margin-top: 36px; font-size: 24px; letter-spacing: -0.02em; color: var(--ink); }

@media (max-width: 1020px) {
  .pg-cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pg-hero.has-media .pg-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .pg-cards.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pg-split.reverse .pg-split-media { order: 0; }
  .mega-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pg-hero { padding-block: 36px 64px; }
  .pg-section { padding-block: 72px; }
  .pg-head { margin-bottom: 36px; }
  .pg-cards.cols-2, .pg-cards.cols-3, .pg-cards.cols-4, .pg-steps, .pg-related { grid-template-columns: minmax(0, 1fr); }
  .pg-card { padding: 24px; }
  .pg-split + .pg-split { margin-top: 60px; }
  .pg-grade-form { flex-direction: column; border-radius: 22px; padding: 8px; }
  .pg-grade-form input { min-height: 48px; }
  .pg-faq-item summary { font-size: 17px; }
  .pg-cta { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .mega, .mobile-menu { animation: none; }
  .pg-card, .pg-related-item { transition: none; }
}
