/* ==========================================================================
   OBLIVET — tokens, reset, and ambient background
   ========================================================================== */

/* ==========================================================================
   OBLIVET — monochrome personal finance
   Pure HTML, CSS, and vanilla JavaScript. No frameworks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Foundations
   -------------------------------------------------------------------------- */
:root {
  --bg: #050505;
  --bg-raised: #080808;
  --bg-hover: #0d0d0d;
  --panel: #080808;
  --text: #f2f2f2;
  --text-soft: #c9c9c9;
  --muted: #8a8a8a;
  --muted-dim: #5c5c5c;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --line-strong: rgba(255, 255, 255, 0.18);
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --max-width: 1280px;
  --page-pad: clamp(20px, 4vw, 40px);
  --header-height: 72px;
  --ease: cubic-bezier(0.22, 0.75, 0.25, 1);
  --font-sans: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, p, dl, dd, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

canvas {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--white);
  color: var(--bg);
}

:focus-visible {
  outline: 1.5px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--bg);
  border-radius: 999px;
  background: #2b2b2b;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d3d3d;
}

/* Shared typographic atoms */
.micro-label {
  display: inline-block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ta-right {
  text-align: right !important;
}

/* --------------------------------------------------------------------------
   2. Ambient background
   Slow, GPU-friendly transforms only. Content stays crisp above it.
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 78% -14%, rgba(255, 255, 255, 0.05), transparent 62%),
    radial-gradient(900px 700px at -12% 42%, rgba(255, 255, 255, 0.028), transparent 58%),
    #050505;
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
  background: radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025) 45%, transparent 70%);
}

.orb--one {
  top: -32%;
  right: -8%;
  width: 62vw;
  height: 62vw;
  min-width: 520px;
  min-height: 520px;
  animation: drift-one 48s var(--ease) infinite alternate;
}

.orb--two {
  bottom: -42%;
  left: -18%;
  width: 58vw;
  height: 58vw;
  min-width: 480px;
  min-height: 480px;
  opacity: 0.4;
  animation: drift-two 62s var(--ease) infinite alternate;
}

.orb--three {
  top: 34%;
  left: 46%;
  width: 36vw;
  height: 36vw;
  min-width: 340px;
  min-height: 340px;
  opacity: 0.22;
  animation: drift-three 54s var(--ease) infinite alternate;
}

@keyframes drift-one {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-7%, 9%, 0) scale(1.08); }
}

@keyframes drift-two {
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to { transform: translate3d(9%, -7%, 0) scale(0.96); }
}

@keyframes drift-three {
  from { transform: translate3d(-4%, 0, 0) scale(0.94); }
  to { transform: translate3d(6%, -10%, 0) scale(1.06); }
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 5%, transparent 72%);
  mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 5%, transparent 72%);
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 0%, rgba(5, 5, 5, 0.35) 60%, rgba(5, 5, 5, 0.9) 100%),
    radial-gradient(ellipse 80% 70% at 50% 45%, transparent 35%, rgba(5, 5, 5, 0.65) 100%);
}

.ambient-noise {
  position: absolute;
  inset: -20%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}
