/* KC7 marketing site shell and section primitives. Tokens (--ink, --panel,
   --orange, --blue, --serif, …) come from home-desktop.css, which is loaded
   first by base-site.html.

   Primitives for page templates:
     .site-hero            page opener: <h1> (+ <em class="it"> accent), .lede, .site-actions, optional .site-hero-aside
     .site-section         band; add .raised for a panel background, .narrow for reading width
     .site-section-head    <h2> + .lede
     .prose                long-form copy (h2/h3/p/ul/blockquote/a)
     .split  .split.reverse   two columns on wide screens
     .figure               <img> + <figcaption>
     .cards  .card         grid of panel cards (.card-icon, h3, p)
     .quotes .quote        testimonial cards
     .faq-list details     disclosure rows
     .people .person       team member cards
     .site-cta             closing band with actions
     .form                 form layout (.field, .field-row, .form-actions, .form-error)
     .btn .btn-primary/.btn-outline/.btn-ghost/.btn-sm  (from home-desktop.css) */

.site-body { background: var(--canvas); color: var(--ink); user-select: auto; }
.site-main { min-height: 60vh; }
.site-container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-container.narrow { width: min(760px, calc(100% - 32px)); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #1a1612; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* --------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(9, 9, 9, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header-inner { display: flex; align-items: center; gap: 8px; height: 64px; }
.site-brand { display: inline-flex; margin-right: 8px; }
.site-brand img, .site-drawer-head img, .site-footer-brand img { height: 28px; width: auto; display: block; }
.site-nav { display: none; align-items: center; gap: 2px; }
.site-nav-link, .site-menu > summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--secondary); text-decoration: none; cursor: pointer; list-style: none; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary i { font-size: 10px; opacity: 0.6; }
.site-nav-link:hover, .site-nav-link.active, .site-menu > summary:hover, .site-menu[open] > summary { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.site-menu { position: relative; }
.site-menu > ul { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7); z-index: 60; }
.site-menu > ul a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 5px; color: var(--ink); font-size: 13px; text-decoration: none; }
.site-menu > ul a i { font-size: 10px; opacity: 0.6; }
.site-menu > ul a:hover { background: rgba(91, 163, 245, 0.14); }
.site-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-burger { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 16px; }
.site-burger:hover { background: rgba(255, 255, 255, 0.06); }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .site-header-right .site-burger { display: none; }
}

/* Drawer */
.site-drawer { position: fixed; inset: 0; z-index: 90; }
.site-drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.site-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 90vw); background: var(--panel); border-left: 1px solid var(--border); overflow-y: auto; padding: 12px 12px 24px; display: flex; flex-direction: column; animation: demo-fade-up 0.2s ease; }
.site-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 14px; }
.site-drawer-group { margin: 14px 12px 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.site-drawer-panel > a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--secondary); text-decoration: none; font-size: 14px; font-weight: 500; }
.site-drawer-panel > a:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
body.site-drawer-open { overflow: hidden; }

/* ------------------------------------------------------------------ hero */
.site-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(60% 80% at 15% 0%, rgba(255, 121, 51, 0.12), transparent 70%), radial-gradient(50% 70% at 95% 100%, rgba(91, 163, 245, 0.14), transparent 70%); }
.site-hero-inner { display: grid; gap: 40px; padding: 64px 0; }
.site-hero-inner.with-aside { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
.site-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; max-width: 18ch; }
.site-hero h1 .it { font-style: italic; color: var(--orange); }
.site-hero .lede { margin: 24px 0 0; max-width: 640px; font-size: 18px; line-height: 1.6; color: var(--secondary); }
.site-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.site-hero-aside { display: flex; justify-content: center; }

/* --------------------------------------------------------------- sections */
.site-section { padding: 56px 0; }
.site-section.raised { background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.site-section-head { margin-bottom: 32px; max-width: 760px; }
.site-section-head h2, .site-cta h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.site-section-head .lede { margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--secondary); }
.site-section h3.sub { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; margin-bottom: 14px; }

/* Prose */
.prose { font-size: 16px; line-height: 1.75; color: var(--secondary); max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; margin: 2em 0 0.6em; }
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.1rem; font-family: inherit; font-weight: 600; }
.prose h5, .prose h6 { color: var(--ink); font-size: 1rem; margin: 1.6em 0 0.5em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.3em 0; }
.prose blockquote { border-left: 3px solid var(--orange); padding: 0.2em 0 0.2em 1.1em; font-family: var(--serif); font-size: 1.15em; font-style: italic; color: var(--ink); }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--inset); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; }
.prose pre { background: var(--inset); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--ink); font-weight: 600; }
.prose.wide { max-width: none; }

/* Layout helpers */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.reverse > :first-child { order: 2; } }
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; padding: 0; list-style: none; }
.cards.cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cards.cols-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; transition: border-color 150ms ease; }
.site-section.raised .card { background: var(--raised); }
a.card:hover { border-color: var(--blue); }
.card-icon { color: var(--blue); font-size: 22px; }
.card h3 { font-size: 16px; font-weight: 600; }
.card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--secondary); }
.card .card-cta { margin-top: auto; padding-top: 6px; }
.card .pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; color: var(--secondary); }
.quotes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0; padding: 0; list-style: none; }
.quotes.cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.quote { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.quote.featured { border-color: rgba(255, 121, 51, 0.5); }
.quote .quote-mark { font-family: var(--serif); font-size: 36px; line-height: 0.6; color: var(--orange); }
.quote blockquote { margin: 0; flex: 1; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink); }
.quote footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: 12px; color: var(--muted); }
.quote footer strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.quote .stars { color: var(--orange); font-size: 12px; letter-spacing: 1px; }
.quote .chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(255, 121, 51, 0.15); color: var(--orange); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.faq-list { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow: hidden; }
.faq-list details + details { border-top: 1px solid var(--border); }
.faq-list summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 500; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); color: var(--blue); font-size: 18px; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list summary:hover { background: rgba(255, 255, 255, 0.04); }
.faq-list .faq-body { padding: 0 20px 18px; color: var(--secondary); line-height: 1.65; max-width: 72ch; }
.faq-list .faq-body p { margin: 0 0 0.8em; }
.faq-list .faq-body a { color: var(--blue); }
.faq-list .faq-body ul { padding-left: 1.4em; }
.people { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0; padding: 0; list-style: none; }
.person { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); text-align: center; color: inherit; text-decoration: none; }
a.person:hover { border-color: var(--blue); }
.person img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--raised); }
.person h3 { font-size: 15px; font-weight: 600; }
.person p { margin: 0; font-size: 13px; color: var(--secondary); }
.person .links { display: flex; gap: 10px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); font-size: 13px; }
.chips li img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; padding: 0; }
.stats > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.stats dd { margin: 0; font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--blue); }
.stats dt { margin-top: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.media-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 0; padding: 0; list-style: none; }
.media-cards.cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; transition: border-color 150ms ease; }
a.media-card:hover { border-color: var(--blue); }
.media-card img, .media-card .thumb-fallback { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--inset); }
.media-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.media-card .kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.media-card h3 { font-size: 15px; font-weight: 600; }
.media-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--secondary); }
.media-card .meta { font-size: 12px; color: var(--muted); }
.site-cta { padding: 56px 0; }
.site-cta-box { padding: 48px 24px; text-align: center; border: 1px solid rgba(255, 121, 51, 0.4); border-radius: 12px; background: rgba(255, 121, 51, 0.08); }
.site-cta .lede { max-width: 620px; margin: 12px auto 0; font-size: 16px; color: var(--secondary); }
.site-cta .site-actions { justify-content: center; margin-top: 24px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 32px; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; text-decoration: none; color: var(--secondary); }
.pagination a:hover { border-color: var(--blue); color: var(--ink); }
.pagination .current { background: var(--orange); color: #1a1612; border-color: var(--orange); font-weight: 600; }

/* Flash messages */
.site-flash-wrap { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.site-flash { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); font-size: 14px; }
.site-flash-success { border-color: rgba(74, 222, 128, 0.4); }
.site-flash-danger, .site-flash-error { border-color: rgba(248, 113, 113, 0.5); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field label .req { color: var(--orange); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field input[type="number"], .field input[type="date"], .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--inset); color: var(--ink); font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(91, 163, 245, 0.2); }
.field textarea { min-height: 140px; resize: vertical; }
.field .help { font-size: 12px; color: var(--muted); }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-error { color: var(--danger); font-size: 12px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--secondary); }
.checkbox input { margin-top: 4px; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--panel); }
.site-footer-grid { display: grid; gap: 40px; padding: 48px 0; }
@media (min-width: 768px) { .site-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.site-footer-brand p { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.6; color: var(--secondary); }
.site-footer h2 { margin-bottom: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer ul a { font-size: 14px; color: var(--secondary); text-decoration: none; }
.site-footer ul a:hover { color: var(--ink); }
.site-footer-legal { border-top: 1px solid var(--border); padding: 20px 0; font-size: 12px; color: var(--muted); }

/* Video facade sizing on content pages */
.story-frame.rounded { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }

@media (max-width: 767px) {
  .site-hero-inner { padding: 44px 0; }
  .site-hero-inner.with-aside { grid-template-columns: 1fr; }
  .site-section { padding: 40px 0; }
}
