/* leru — the header and footer every page shares (markup: apps/web/scripts/site-chrome.py).
   One frame width everywhere. The logo is live text in Leru Display; on hover it opens into "love you". */
@font-face { font-family: "Leru Display"; src: url("/leru-display.ttf?v=2") format("truetype"); font-display: block; }

:root {
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --bar-h: 72px;
  --ease-out: cubic-bezier(.2, .7, .1, 1);
}
.frame { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
[id] { scroll-margin-top: calc(var(--bar-h) + 16px); }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; color: var(--fg); text-decoration: none; letter-spacing: 0; line-height: 1; }
.brand:hover { text-decoration: none; }
.logo {
  display: inline-flex; align-items: flex-start; font: 400 46px/1.1 "Leru Display", var(--font);
  font-kerning: normal; white-space: pre;
}
.logo > span { display: block; }
/* "er" sits between l and u; on hover the gap opens to fit "ove yo". Numbers come from the Leru Display metrics
   (1000 units/em) so every gap between letter shapes is ~.035em, as in "leru": the -.06em pulls e/o up to the l
   (the font kerns l-e, not l-o), and the small margins even out o-v, v-e, y-o and o-u. */
.lg-mid { position: relative; width: .812em; margin-left: -.06em; clip-path: inset(-.5em 0 -.5em 0); transition: width .7s var(--ease-out); }
.lg-er { display: block; }
.lg-love { position: absolute; left: 0; top: 0; }
.lg-love > span:nth-child(2) { margin-left: -.004em; }
.lg-love > span:nth-child(3) { margin-left: .016em; }
.lg-love > span:nth-child(5) { margin-left: -.025em; }
.lg-love > span:nth-child(6) { margin-left: .021em; }
.lg-er { transition: opacity .25s ease, transform .35s var(--ease-out); }
.lg-love { opacity: 0; transform: translateY(.12em); transition: opacity .3s ease, transform .45s var(--ease-out); }
.brand:focus-visible .lg-mid { width: 2.684em; }
.brand:focus-visible .lg-er { opacity: 0; transform: translateY(-.12em); }
.brand:focus-visible .lg-love { opacity: 1; transform: none; transition-delay: .18s; }
@media (hover: hover) {
  .brand:hover .lg-mid { width: 2.684em; }
  .brand:hover .lg-er { opacity: 0; transform: translateY(-.12em); }
  .brand:hover .lg-love { opacity: 1; transform: none; transition-delay: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-mid, .lg-er, .lg-love { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- Header ---------- */
/* The frosted glass lives on ::before: a backdrop-filter on the header itself would trap the fixed mobile menu inside it. */
.site-header { position: sticky; top: 0; z-index: 40; border: 0; background: none; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 1px 0 var(--line); transition: opacity .4s var(--ease-out);
}
/* The landing's hero sits under a clear header that frosts once the page scrolls (site.js). */
.landing:not(.subpage) .site-header { position: fixed; inset: 0 0 auto 0; }
.landing:not(.subpage) .site-header:not(.is-scrolled)::before { opacity: 0; }
html.menu-open .site-header::before { opacity: 1; background: var(--bg); }

.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: var(--bar-h); }
.bar .brand { justify-self: start; }
.nav ul, .menu ul, .foot-cols ul { list-style: none; margin: 0; padding: 0; }
.bar > .nav ul { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); }
.bar > .nav li { margin: 0; }
.bar > .nav a {
  display: block; padding: 7px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 450; line-height: 1.2;
  color: var(--mute); text-decoration: none; transition: color .2s ease, background-color .2s ease;
}
.bar > .nav a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.bar > .nav a[aria-current="page"] { color: var(--bg); background: var(--fg); }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 10px; }

.site-header .lang, .site-footer .lang {
  display: inline-grid; place-items: center; min-width: 38px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .08em; color: var(--fg); text-decoration: none;
}
.site-header .lang:hover, .site-footer .lang:hover { border-color: var(--fg); }
.cta {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  background: var(--fg); color: var(--bg); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: transform .2s var(--ease-out), opacity .2s ease;
}
.cta:hover { color: var(--bg); opacity: .9; transform: translateY(-1px); text-decoration: none; }

/* Mobile menu: a plain <details>, so it works without JavaScript. */
.menu { display: none; position: static; margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.menu > summary { list-style: none; cursor: pointer; width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line); }
.menu > summary::-webkit-details-marker { display: none; }
.burger { position: relative; width: 18px; height: 10px; }
.burger i { position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px; background: var(--fg); transition: transform .3s var(--ease-out), top .3s var(--ease-out); }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 8.4px; }
.menu[open] .burger i:first-child { top: 4.2px; transform: rotate(45deg); }
.menu[open] .burger i:last-child { top: 4.2px; transform: rotate(-45deg); }
.menu[open] summary { margin: 0; }
.menu-panel {
  position: fixed; left: 0; right: 0; top: var(--bar-h); bottom: 0; z-index: 39; overflow-y: auto;
  padding: 18px var(--gutter) 32px; background: var(--bg); display: flex; flex-direction: column; gap: 22px;
  animation: menu-in .35s var(--ease-out);
}
.menu-panel ul { display: grid; gap: 0; }
.menu-panel li { margin: 0; border-bottom: 1px solid var(--line); }
.menu-panel nav a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 26px; font-weight: 300; letter-spacing: -.02em; color: var(--fg); text-decoration: none; }
.menu-panel nav a::after { content: "→"; font-size: 18px; color: var(--mute); }
.menu-panel nav a[aria-current="page"] { color: var(--accent); }
.menu-foot { display: flex; align-items: center; gap: 12px; }
.menu-foot .theme-switch:not([hidden]) { display: inline-flex; }
.cta.big { height: 52px; justify-content: center; font-size: 16px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1179px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar > .nav { display: none; }
  .menu { display: block; }
  .logo { font-size: 40px; }
}
@media (max-width: 599px) {
  :root { --bar-h: 64px; }
  .bar-end > .theme-switch, .bar-end > .lang { display: none; }
  .bar-end > .cta { height: 36px; padding: 0 14px; font-size: 14px; }
  .logo { font-size: 36px; }
}
@media (max-width: 359px) { .bar-end > .cta { display: none; } }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(80px, 10vw, 140px); padding: 56px 0 36px; border-top: 1px solid var(--line); color: var(--mute); font-size: 15px; }
.foot-top { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 64px; } }
.foot-brand .logo { font-size: 56px; }
.foot-tag { margin: 14px 0 6px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 300; letter-spacing: -.02em; color: var(--fg); line-height: 1.2; }
.foot-blurb { margin: 0 0 22px; max-width: 34ch; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 24px; }
.foot-h { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
.foot-cols li { margin: 0 0 9px; }
.site-footer .foot-cols a { color: var(--mute); text-decoration: none; overflow-wrap: anywhere; }
.site-footer .foot-cols a:hover { color: var(--fg); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; }
.foot-bottom p { margin: 0; }
.site-footer .foot-bottom .lang { min-width: 0; letter-spacing: 0; font-size: 13px; padding: 0 14px; }

/* ---------- Plain pages (support, legal, invite): one reading column in the shared frame ---------- */
.doc-page main.doc { max-width: calc(760px + 2 * var(--gutter)); padding: 0 var(--gutter); }
.doc-page main.doc > h1:first-child, .doc-page main.doc > :first-child h1 {
  font-size: clamp(42px, 6vw, 80px); font-weight: 220; line-height: .98; letter-spacing: -.045em; margin: clamp(56px, 8vw, 96px) 0 20px;
}
.doc-page main.doc h2 { font-size: clamp(22px, 2vw, 26px); font-weight: 400; letter-spacing: -.015em; margin-top: 48px; }
.doc-page main.doc .lead { font-size: clamp(18px, 1.6vw, 21px); }
html.menu-open { overflow: hidden; }
