/* Marketing site shell: header, footer, layout helpers shared by every public page.
   Tokens and components (buttons, fields, notices, popover) come from /assets/kerani.css; direction in DESIGN.md.
   Dial: ENERGY 1 / RHYTHM 2 / MOTION 1 (hover and focus only). */

.skip { position: absolute; left: 12px; top: -48px; background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; z-index: 10; color: var(--ink); }
.skip:focus { top: 8px; }

/* ---------- layout ---------- */
.wrap { padding-left: max(20px, calc((100% - 72rem) / 2 + 20px)); padding-right: max(20px, calc((100% - 72rem) / 2 + 20px)); }
main > section { border-top: 1px solid var(--rule); scroll-margin-top: 12px; }
main > section:first-child { border-top: 0; }
.section { padding-top: 64px; padding-bottom: 64px; }

h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
main a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--muted); border-radius: 2px; }
main a:not(.btn):hover { color: var(--accent); text-decoration-color: currentColor; }
code { overflow-wrap: anywhere; }

.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.lede { font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 38rem; }
.section-head { display: grid; gap: 10px; max-width: 40rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* inner pages open with a plain heading block: <section class="page-hero"><div class="wrap">eyebrow, h1, lede</div></section> */
.page-hero { padding-top: 56px; padding-bottom: 40px; }
.page-hero .wrap { display: grid; gap: 14px; justify-items: start; }
.page-hero .eyebrow { margin: 0; }
.page-hero h1, .page-hero .lede { max-width: 42rem; }

/* ---------- closing call to action ---------- */
.cta-band { background: var(--field); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-top: 56px; padding-bottom: 56px; }
.cta-band .wrap { display: grid; gap: 10px 48px; align-items: center; }
.cta-band p { color: var(--muted); max-width: 36rem; }
.cta-band .cta-row { margin-top: 14px; }

/* ---------- long-form text (legal pages) ---------- */
.prose { max-width: 44rem; line-height: 1.65; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: 20px; margin-top: 40px; }
.prose h3 { font-size: 16px; margin-top: 28px; }
.prose h2 + *, .prose h3 + * { margin-top: 10px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
main .prose a:not(.btn) { color: var(--accent); }
.prose table { display: block; overflow-x: auto; font-size: 14px; }
.prose th, .prose td { min-width: 8rem; }
.prose .muted { font-size: 14px; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { color: var(--ink); text-decoration: none; border-radius: var(--radius); min-height: 44px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.site-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.site-nav a[aria-current=page] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-nav .btn { padding: 0 14px; }
.site-nav .btn.primary:hover { color: var(--accent-ink); text-decoration: none; }
.nav-mobile { display: none; }
.head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.menu-toggle { display: none; padding: 0 12px; font-size: 14px; }
.site-head .menu-btn { padding: 0 10px; gap: 6px; font-size: 13px; }
.site-head .menu-btn .ic:last-child { width: 14px; height: 14px; color: var(--muted); }

@media (min-width: 861px) {
  .site-nav { flex: 1; margin-left: 12px; }
}
@media (max-width: 860px) {
  .head-cta, .head-signin { display: none; }
  .nav-mobile { display: block; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { flex-direction: column; padding-bottom: 8px; }
  .site-nav .nav-mobile .btn { margin-top: 4px; }
  /* Without script the links stay visible; with it they sit behind the Menu button. */
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); font-size: 14px; }
.foot-grid { display: grid; gap: 32px 48px; padding-top: 40px; padding-bottom: 32px; }
.foot-about { display: grid; gap: 10px; align-content: start; justify-items: start; }
.foot-about p { color: var(--muted); max-width: 26rem; }
.foot-group h2 { font-size: 14px; font-weight: 650; margin-bottom: 4px; }
.foot-group ul { list-style: none; margin: 0; padding: 0; }
.site-foot a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; border-radius: 2px; overflow-wrap: anywhere; }
.site-foot a:hover { color: var(--accent); text-decoration-color: currentColor; }
.site-foot .brand { text-decoration: none; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 24px; border-top: 1px solid var(--rule); padding-top: 4px; padding-bottom: 12px; color: var(--muted); }
.foot-base span { padding: 10px 0; }

@media (min-width: 700px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
@media (max-width: 699px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .cta-band .wrap { grid-template-columns: 1fr auto; }
  .cta-band h2, .cta-band p { grid-column: 1; }
  .cta-band .cta-row { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
@media (max-width: 560px) {
  .page-hero { padding-top: 36px; padding-bottom: 28px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .cta-row .btn { flex: 1 1 100%; }
}
