/* The public pages' own look (the home page, and the pages people reach from it while signed
   out: the Disclaimer & privacy notice): the page, its header with the sections, theme and
   language, Sign in and Create account, and its footer. lib/public_chrome.php writes the header
   and the footer; the home page's sections keep their own styles in index.php. */
/* ---- The page ---------------------------------------------------------------------- */
body.hp { --hp-h1: clamp(40px, 5.6vw, 64px); --hp-h2: clamp(30px, 3.6vw, 44px); --hp-lead: 18px;
  --hp-ease: cubic-bezier(.2, .8, .2, 1);
  background: var(--surface); color: var(--ink); font-size: var(--fs-h2); line-height: 1.55; }
:root[data-theme="dark"] body.hp { background: var(--canvas); }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
.hp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; box-sizing: border-box; }
.hp-skip { position: absolute; left: -9999px; }
.hp-skip:focus { top: 12px; left: 16px; z-index: 40; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--surface); }
.hp h1, .hp h2, .hp h3 { margin: 0; color: var(--ink); }
.hp h2 { font-size: var(--hp-h2); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
.hp h3 { font-size: var(--fs-h2); font-weight: 650; letter-spacing: -.005em; line-height: 1.3; }
.hp-sub { margin: 16px 0 0; max-width: 34em; color: var(--muted); font-size: var(--hp-lead); line-height: 1.55; text-wrap: pretty; }
section.hp-section { padding: 120px 0; }
section.hp-section + section.hp-section { border-top: 1px solid var(--line); }

/* Icons: a gif drawn in the colour of where it is, by masking currentColor with it. */
.hp-ic { display: inline-grid; width: 24px; height: 24px; flex: none; place-items: center; }
.hp-ic img { width: 100%; height: 100%; background: currentColor; object-position: -9999px 0;
  -webkit-mask: var(--gif) center / contain no-repeat; mask: var(--gif) center / contain no-repeat; }
:root[data-theme="dark"] .hp .hp-ic img { filter: none; }
.hp svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* The kit's buttons, a size up for the page's calls to action. */
.hp .btn.hp-big { min-height: 48px; padding: 0 22px; border-radius: 12px; font-size: var(--fs-h2); }
.hp .btn.hp-big img { width: 18px; height: 18px; }
.hp .btn.primary-off { cursor: default; opacity: .6; }

/* Things come up as they scroll into view, one after another (.is-in from the script below). */
.hp-rise { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--hp-ease), transform .8s var(--spring); transition-delay: calc(var(--i, 0) * 70ms); }
.hp-rise.is-in { opacity: 1; transform: none; }

/* ---- Header ------------------------------------------------------------------------ */
.hp-header { position: sticky; top: 0; z-index: 30; transition: background-color .25s, box-shadow .25s; }
.hp-header .hp-wrap { display: flex; align-items: center; gap: 16px; height: 72px; transition: height .35s var(--spring); }
.hp-header.is-scrolled { background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); }
:root[data-theme="dark"] .hp-header.is-scrolled { background: color-mix(in srgb, var(--canvas) 80%, transparent); }
.hp-header.is-scrolled .hp-wrap { height: 60px; }
.hp-brand { display: inline-flex; flex: none; }
.hp-brand img { display: block; width: auto; height: 34px; }
:root[data-theme="dark"] .hp-brand img { content: url("../../admin/assets/logo-landscape-dark.png"); }
/* The page's sections as a segmented row: its pill follows the section in view. */
.hp-nav.seg { margin: 0 auto; }
.hp-nav.seg a { padding: 5px 14px; font-size: var(--fs-small); }
.hp-actions { display: flex; flex: none; align-items: center; gap: 6px; }
.hp-actions .btn { white-space: nowrap; }
/* The header's buttons sit light on the bar: theme and Sign in as plain words and icons that
   take a soft face under the pointer, Create account a compact pill. The kit's raised faces
   were made for forms, and three of them in a row read as a toolbar. */
.hp-header .hp-actions :is(.btn.ghost, button.ghost), :root[data-theme="dark"] .hp-header .hp-actions :is(.btn.ghost, button.ghost) {
  min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: var(--ink-soft); font-size: var(--fs-small); font-weight: 600; }
.hp-header .hp-actions :is(.btn.ghost, button.ghost):hover, :root[data-theme="dark"] .hp-header .hp-actions :is(.btn.ghost, button.ghost):hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: none; color: var(--ink); }
.hp-header .hp-actions .btn:not(.ghost) { min-height: 34px; padding: 0 16px; border-radius: 999px; font-size: var(--fs-small); }
.hp-iconbtn.ghost { display: inline-grid; width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0 !important; place-items: center; }
.hp-iconbtn svg { width: 18px; height: 18px; }
.hp-menubtn { display: none !important; }

/* Theme and language, one button away, in a panel that springs open under it. */
.hp-pop { position: fixed; inset: auto; top: 64px; right: max(16px, calc((100vw - 1160px) / 2 + 28px)); left: auto; margin: 0;
  width: min(320px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  box-shadow: var(--pop-shadow); color: var(--ink); transform-origin: top right;
  opacity: 0; transform: translateY(-6px) scale(.96); transition: opacity .16s, transform .2s cubic-bezier(.4, 0, 1, 1), display .3s allow-discrete, overlay .3s allow-discrete; }
.hp-pop:popover-open { opacity: 1; transform: none; transition: opacity .18s, transform .5s var(--spring-bounce), display .5s allow-discrete, overlay .5s allow-discrete; }
@starting-style { .hp-pop:popover-open { opacity: 0; transform: translateY(-10px) scale(.92); } }
:root[data-theme="dark"] .hp-pop { background: var(--surface-soft); }
.hp-pop-label { display: block; margin: 0 0 8px; color: var(--muted); font-size: var(--fs-caption); font-weight: 600; }
.hp-pop-label:not(:first-child) { margin-top: 16px; }
.hp-pop .theme-switch { margin: 0; }
.hp-pop .lang-switch { display: flex; }
.hp-pop .lang-switch a { flex: 1 1 auto; text-align: center; }
/* The phone's menu: the sections, then theme and language, then the account. */
.hp-menu { top: 60px; right: 12px; width: min(340px, calc(100vw - 24px)); }
.hp-menu-links { display: grid; gap: 2px; margin: 0 0 4px; }
.hp-menu-links a { padding: 10px 12px; border-radius: 10px; color: var(--ink); font-size: var(--fs-h2); font-weight: 600; text-decoration: none; }
.hp-menu-links a:hover { background: var(--surface-soft); text-decoration: none; }
.hp-menu-acts { display: grid; gap: 8px; margin-top: 16px; }

/* ---- Footer ---- */
.hp-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: var(--fs-small); }
.hp-footer .hp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.hp-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hp-footer a { color: var(--ink-soft); }
.hp-credit { margin: 0; }
.hp-credit a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.hp-credit a:hover { text-decoration-color: currentColor; }

/* ---- Narrower ---- */
@media (max-width: 1080px) {
  .hp-nav.seg a { padding-inline: 10px; }
}
@media (max-width: 960px) {
  .hp-nav.seg, .hp-actions .hp-prefsbtn, .hp-actions .hp-signin { display: none; }
  .hp-menubtn { display: inline-grid !important; }
  .hp-actions { margin-left: auto; }
}
@media (max-width: 720px) {
  .hp-wrap { padding: 0 18px; }
  .hp-header .hp-wrap { height: 60px; }
  .hp-brand img { height: 30px; }
}
@media (max-width: 420px) {
  .hp-actions .hp-create { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hp-pop { transition: none; }
}
