/* HugFrom shared look: dark velvet (the inside of a ring box), gold, ivory paper, and liquid glass for floating controls. */
:root {
  --velvet-deep: #121012;
  --velvet: #2a2427;
  --sheen: #6a5c5c;
  --ink: #f8f3ed;
  --ink-2: rgba(248, 243, 237, .84);
  --ink-3: rgba(248, 243, 237, .64);
  --hair: rgba(248, 243, 237, .18);
  --gold: #e8c27c;
  --gold-deep: #b5873a;
  --paper: #f7f0e4;
  --paper-ink: #2c1a17;
  --rose: #ffa3a0;
  --good: #9fe0b4;
  --solid: #221d20;
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--velvet-deep); }
body {
  margin: 0; color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  /* shown until (or instead of) the WebGL velvet */
  background: radial-gradient(120% 80% at 70% 30%, #3a3236 0%, var(--velvet) 38%, var(--velvet-deep) 100%) fixed;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- velvet ---------- */
#velvet { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; opacity: 0; transition: opacity .9s ease; }
#velvet.on { opacity: 1; }
html.velvet-on body { background: transparent; }

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- liquid glass ---------- */
/* Light frost and a warm tint; Chromium adds real refraction and a lit rim from assets/hugfrom.js */
.glass {
  --r: 28px;
  position: relative; isolation: isolate; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 244, 236, .10), rgba(255, 244, 236, .03));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 244, .42),
    inset 0 -1px 0 rgba(255, 250, 244, .08),
    0 1px 1px rgba(10, 0, 3, .35),
    0 24px 50px -24px rgba(10, 0, 3, .8);
}
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 250, 244, .5), rgba(255, 250, 244, .05) 30%, rgba(255, 250, 244, 0) 60%, rgba(255, 250, 244, .18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass.lens { background: linear-gradient(180deg, rgba(255, 244, 236, .06), rgba(255, 244, 236, .015)); }
.glass.lens::before { display: none; }
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass.lens { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--solid); }
}

/* ---------- nav ---------- */
.nav { --r: 999px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.015em; white-space: nowrap; }
.brand-mark { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 250, 240, .35); }
.brand small { font-family: var(--text); font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: 999px; border: 0; text-decoration: none; font-weight: 600; font-size: 16px; cursor: pointer; white-space: nowrap; transition: transform .2s cubic-bezier(.2, .8, .2, 1), filter .2s; }
.btn:active { transform: scale(.97); }
/* polished gold, like the ring */
.btn-primary {
  color: #2b1406;
  background: linear-gradient(180deg, #f6dca6 0%, #e6bd72 48%, #cf9f4f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 252, 240, .9), inset 0 -1px 0 rgba(120, 70, 10, .35), 0 6px 18px -8px rgba(10, 0, 3, .9);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-glass { --r: 999px; color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  #velvet { transition: none; }
  .btn { transition: none; }
}
