/* The landing page's base: leon's tokens (brand/README.md), its fonts (brand/fonts), the type scale,
   the 12-column grid, buttons, links, the bar at the top and the footer. sections.css lays out each
   section; window.css draws leon's window. */
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-500-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Parchment, Sand, Iron, Umber, Oxide, Coal */
  --bg: #f5f0e7; --surface: #ebe3d7; --slab: #e4d9c9; --tonal: #e5ded3;
  --ink: #292521; --text: #3a342f; --muted: #65594f; --line: rgb(41 37 33 / .14);
  --action: #b64c32; --action-hover: #a0412a; --action-ink: #f5f0e7;
  --inv-bg: #292521; --inv-ink: #f5f0e7; --inv-muted: #a19c95; --coal: #1f1c19;
  --font: "Instrument Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --nav: 72px; --gut: 80px; --padt: 120px; --padb: 72px; --gap: 24px;
  --r: 8px; --r-sm: 6px;
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-in: cubic-bezier(.22, 1, .36, 1);
  --h1: clamp(40px, 3.3vw + 27px, 75px);
  --h2: clamp(30px, 1.9vw + 22.6px, 50px);
  --lead: clamp(18px, .25vw + 16.4px, 20px);
}
@media (max-width: 1023px) { :root { --gut: 48px; } }
@media (max-width: 639px) { :root { --nav: 56px; --gut: 24px; --padt: 96px; --padb: 48px; --gap: 12px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: var(--nav); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 4px; }

/* type: headings at 500, tight; never bold-and-big */
h1, h2 { font-weight: 500; letter-spacing: -.028em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.02; }
h2 { font-size: var(--h2); }
h3 { font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.lead { font-size: var(--lead); line-height: 1.5; }
.small { font-size: 14px; }
@media (max-width: 639px) { h3 { font-size: 18px; } }

/* the page's one width, and a 12-column grid on it */
.wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c6r { grid-column: 7 / span 6; }
@media (max-width: 1023px) { .grid { row-gap: 24px; } .grid > * { grid-column: 1 / -1; } }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* buttons: pills; one filled action, a tonal second */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 24px; border-radius: 999px;
  font: 500 16px/1 var(--font); white-space: nowrap; cursor: pointer; border: 0;
  transition: transform .15s var(--ease), background-color .15s var(--ease); }
.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: var(--tonal); color: var(--ink); }
.btn-secondary:hover { background: #ddd4c7; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: .09s; }
.btn .chev { width: 10px; height: 10px; transition: transform .15s var(--ease); }
.btn:hover .chev { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 639px) { .btn-row { flex-direction: column; align-self: stretch; } .btn-row .btn { width: 100%; } }

/* a text link with an arrow; its rule draws across on hover */
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-top: 8px; padding-bottom: 6px; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat;
  transition: background-size .25s var(--ease); }
.link:hover, .link:focus-visible { background-size: 100% 1px, 100% 1px; }
.link::after { content: "→"; transition: transform .15s var(--ease); }
.link:hover::after { transform: translateX(3px); }

/* the bar: fixed, opaque, a hairline under it, the same at every depth */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--nav); background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-bar { display: flex; align-items: center; gap: 24px; height: 100%; }
.skip { position: absolute; left: var(--gut); top: -100px; padding: 8px 16px; background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.nav-logo img { height: 24px; width: auto; }
.nav-links { display: flex; gap: 28px; margin-left: 64px; font-size: 15px; font-weight: 500; }
.nav-links > a, .nav-item > a { display: inline-flex; align-items: center; gap: 6px; height: var(--nav); color: var(--text); transition: color .15s var(--ease); }
.nav-links > a:hover, .nav-item > a:hover { color: var(--action); }
.nav-item > a svg { width: 10px; height: 10px; }
.nav-actions { margin-left: auto; display: flex; gap: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.nav-toggle svg { margin: auto; }

/* the Docs menu: three pictures of the docs' main parts, after 150ms of hover */
.nav-menu { position: fixed; inset: var(--nav) 0 auto; padding: 32px 0 40px; background: var(--bg); border-bottom: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: none; transition-delay: .15s, .15s, 0s; }
.nav-item:focus-within .nav-menu { transition-delay: 0s; }
.menu-card { display: flex; flex-direction: column; gap: 6px; transition: transform .15s var(--ease); }
.menu-card:hover { transform: translateY(-2px); }
.menu-card .pic { height: 200px; margin-bottom: 10px; border-radius: var(--r); overflow: hidden; background: var(--coal); }
.menu-card img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; transition: transform .6s var(--ease); }
.menu-card:hover img { transform: scale(1.03); }
.menu-card b { font-size: 20px; font-weight: 500; }

/* below 1024 the words go into a sheet the menu button opens */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .menu-open .nav-links { display: flex; position: fixed; inset: var(--nav) 0 0; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gut); background: var(--bg); font-size: 20px; }
  .menu-open .nav-links > a, .menu-open .nav-item > a { height: 56px; width: 100%; border-bottom: 1px solid var(--line); }
  .menu-open .nav-menu, .nav-item > a svg { display: none; }
}

/* the close and the footer: one slab on Sand, inset from the window */
.closing { margin: 0 8px 8px; padding: var(--padt) 0 var(--padb); background: var(--slab); border-radius: var(--r); }
/* the slab is inset 8px a side; its content keeps the page's lines */
.closing > .wrap { width: min(100% - 2 * var(--gut) + 16px, 1280px); }
/* one screen: the call at the top, the links and the legal row at the foot */
@media (min-width: 640px) { .closing { display: flex; min-height: calc(100svh - 8px); } .closing > .wrap { display: flex; flex-direction: column; justify-content: space-between; } }

.close-head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cmd { margin: 0; padding: 10px 18px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font: 16px/1.5 var(--mono); white-space: pre-wrap; user-select: all; }
.btn-xl { width: 100%; height: 88px; margin-top: 40px; padding: 0 40px; justify-content: space-between; font-size: 32px; letter-spacing: -.02em; }
.btn-xl .chev { width: 14px; height: 14px; }
.btn-xl:hover { transform: translateY(-2px); }
.foot { margin-top: 0; padding-top: 40px; border-top: 1px solid var(--line); row-gap: 40px; }
.foot .c4 p { margin-top: 16px; max-width: 32ch; color: var(--text); }
.foot-col { grid-column: span 2; }
.foot-col h3 { font-size: 13px; color: var(--muted); }
.foot-col ul { margin-top: 12px; display: grid; gap: 4px; }
.foot-col a { display: inline-block; padding: 6px 0; font-size: 15px; background: linear-gradient(currentColor, currentColor) 0 85% / 0 1px no-repeat; transition: background-size .25s var(--ease); }
.foot-col a:hover { background-size: 100% 1px; }
.links { margin-top: 64px; }
.legal { margin-top: 48px; font-size: 13px; color: var(--muted); }
@media (max-width: 1023px) { .foot-col { grid-column: span 6; } }
@media (max-width: 639px) {
  .closing { margin: 0; border-radius: 0; }
  .closing > .wrap { width: calc(100% - 2 * var(--gut)); }
  .foot { row-gap: 32px; }
  .foot-col { grid-column: 1 / -1; }
  .foot-col ul { display: flex; flex-wrap: wrap; column-gap: 24px; }
  .btn-xl { height: 56px; padding: 0 24px; font-size: 20px; }
  .cmd { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
