/* What every public page shares: fonts, colors, buttons, the header, the footer and the sale bar. The homepage adds
   public/home.css, the other pages public/site.css. The header is white; the homepage's starts clear over the video
   (.nav.overlay.clear) and turns white past it (public/home.js). */

@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #1d1d1b;
  --ink-2: #5f5f5c;
  --ink-3: #8c8c88;
  --soft: #3d3d3a;
  --line: #e7e6e2;
  --line-2: #d9d8d3;
  --paper: #fff;
  --card: #f7f7f5;
  --gold: #f4bd2f;
  --gold-hi: #ffcd45;
  --gold-deep: #c98f0c;
  --gold-ink: #8a5b00;
  --bull: #15a050;
  --bear: #e0443e;
  --blue: #0a84ff;
  --display: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: 60px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
section { position: relative; }
main, .foot { overflow-x: clip; } /* decorative lines run off the edge; no sideways scrolling on phones */
[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons: gold, with a darker edge underneath ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px 2px; border: 0; border-radius: 10px; cursor: pointer; white-space: nowrap;
  background: var(--gold); color: #1a1405; font: 500 16px/1 var(--sans); box-shadow: inset 0 -3px 0 var(--gold-deep), 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s, color 0.2s, border-color 0.2s; }
.btn:hover { background: var(--gold-hi); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--gold-deep); }
.btn-sm { height: 34px; padding: 0 14px 2px; font-size: 14px; border-radius: 8px; box-shadow: inset 0 -2px 0 var(--gold-deep); }
.btn-mid { height: 54px; min-width: 220px; padding: 0 28px 3px; font-size: 18px; }
.btn-big { height: 64px; min-width: 300px; padding: 0 32px 4px; font-size: 20px; border-radius: 12px; box-shadow: inset 0 -4px 0 var(--gold-deep), 0 10px 30px -10px rgba(244, 189, 47, 0.55); }

/* ---------- the sale bar (worker/public/sale.ts puts it above the header while a sale is on) ---------- */
.sale-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; padding: 11px 20px; text-align: center;
  font-size: 14px; line-height: 1.4; color: #1a1405; background: var(--gold); }
.sale-bar b { font-weight: 700; }
.sale-go { font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.sale-clock { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) { .sale-more { display: none; } }

/* ---------- the header ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); color: var(--ink); background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 0 var(--line);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.nav.overlay { margin-bottom: calc(-1 * var(--nav-h)); }
.nav.clear { color: #f3f2ee; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.clear.scrolled { background: rgba(14, 14, 13, 0.62); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.nav-row { display: flex; align-items: center; height: 100%; gap: 24px; }
.nav .wrap { height: 100%; } /* pages whose header has only the logo (worker/api.ts) */
.brand { display: flex; align-items: center; gap: 10px; height: 100%; font: 600 22px/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 32px; margin: 0 auto; font-size: 14px; font-weight: 500; }
.nav-links a { opacity: 0.92; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 0.6; }
.nav-links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--gold); }
.nav-links .only-menu { display: none; }
.nav-cta { display: flex; align-items: center; gap: 22px; }
.nav-signin { font-size: 14px; font-weight: 500; }
.nav-signin:hover { opacity: 0.65; }
.nav-menu { display: none; position: relative; width: 36px; height: 36px; margin-right: -8px; border: 0; background: none; color: inherit; cursor: pointer; }
.nav-menu i { position: absolute; left: 9px; right: 9px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease), top 0.25s var(--ease); }
.nav-menu i:first-child { top: 14px; } .nav-menu i:last-child { top: 21px; }
.nav.open .nav-menu i:first-child { top: 17.5px; transform: rotate(45deg); }
.nav.open .nav-menu i:last-child { top: 17.5px; transform: rotate(-45deg); }

/* ---------- the footer: black ---------- */
.foot { background: #000; color: #f3f2ee; }
.foot-band { display: flex; align-items: center; gap: 36px; padding-top: 64px; padding-bottom: 64px; border-bottom: 1px solid #1f1f1d; }
.foot-band-copy { flex: 1; }
.foot-band-copy b { display: block; font: 500 34px/1.12 var(--display); letter-spacing: -0.028em; }
.foot-band-copy span { display: block; margin-top: 10px; font-size: 18px; color: #a3a29d; }
.foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 32px; padding-top: 64px; padding-bottom: 64px; border-bottom: 1px solid #1f1f1d; }
.foot-cols h4 { margin: 0 0 18px; font-size: 15px; font-weight: 600; }
.foot-cols ul { margin: 0; padding: 0; list-style: none; }
.foot-cols li + li { margin-top: 13px; }
.foot-cols a { font-size: 15px; color: #a3a29d; transition: color 0.2s; }
.foot-cols a:hover { color: #fff; }
.foot-cols .foot-brand { display: flex; align-items: center; gap: 10px; align-self: start; font: 600 26px/1 var(--display); letter-spacing: -0.02em; color: #fff; }
.foot-brand img { width: 34px; height: 34px; border-radius: 9px; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 30px; padding-top: 28px; padding-bottom: 32px; font-size: 14px; color: #74736e; }

/* ---------- smaller screens ---------- */
@media (max-width: 1200px) {
  :root { --pad: 40px; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-cols .foot-brand { grid-row: 1; grid-column: 1 / -1; margin-bottom: 12px; }
}
@media (max-width: 1023px) {
  .nav-links, .nav-signin { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-menu { display: block; }
  .nav.open, .nav.clear.open { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--line); }
  .nav.open .nav-links { position: absolute; top: var(--nav-h); left: 0; right: 0; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--pad) 24px;
    background: #fff; box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.2); font: 500 26px/1 var(--display); letter-spacing: -0.02em; }
  .nav.open .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
  .nav.open .nav-links .only-menu { display: block; border-bottom: 0; }
}
@media (max-width: 720px) {
  :root { --pad: 20px; --nav-h: 60px; }
  .brand { font-size: 20px; }
  .brand img { width: 28px; height: 28px; }
  .nav-cta { gap: 12px; }
  .btn-mid { height: 52px; font-size: 17px; }
  .foot-band { flex-wrap: wrap; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
  .foot-band-copy b { font-size: 28px; }
  .foot-band-copy span { font-size: 16px; }
  .foot-band .btn { width: 100%; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
}
@media (max-width: 370px) { /* the smallest phones: the logo, the button and the menu still fit on one row */
  .nav-row { gap: 10px; }
  .brand { gap: 8px; font-size: 18px; }
  .brand img { width: 26px; height: 26px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-sm { padding: 0 10px 2px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
