/* MartyAI Liquid Glass: tokens from the supplied light/dark studies. */

:root {
  color-scheme: light;
  --terracotta:#cf5c36;
  --midnight:#1d2426;
  --gold:#f9a826;
  --green:#4b7f52;
  --ivory:#f8f4e3;
  --cyan:#2ec4b6;
  --coral:#ff7f50;
  --font:'Albert Sans',sans-serif;
  --mono:'JetBrains Mono',monospace;
  --bg:#f8f4e3;
  --text:#1d2426;
  --muted:#555a50;
  --accent:#aa4325;
  --line:rgba(29,36,38,.14);
  --glass:rgba(255,255,250,.49);
  --glass-inner:rgba(255,255,250,.45);
  --edge:rgba(255,255,255,.88);
  --shadow:0 24px 70px rgba(88,58,31,.13);
  --blur:20px;
  --radius:28px;
  --panel:#faf8ef;
  --glow1:rgba(207,92,54,.25);
  --glow2:rgba(249,168,38,.32);
  --highlight:rgba(255,255,255,.8);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg:#1d2426;
  --text:#f8f4e3;
  --muted:#bbc0b8;
  --accent:#ff996f;
  --line:rgba(248,244,227,.16);
  --glass:rgba(46,55,56,.48);
  --glass-inner:rgba(248,244,227,.045);
  --edge:rgba(248,244,227,.29);
  --shadow:0 28px 80px rgba(0,0,0,.29);
  --panel:#30393a;
  --glow1:rgba(207,92,54,.32);
  --glow2:rgba(249,168,38,.19);
  --highlight:rgba(255,249,222,.22);
}

.glass {
  position:relative;
  background:var(--glass);
  border:1px solid var(--edge);
  border-bottom-color:var(--line);
  border-right-color:var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow),inset 0 1px 0 var(--highlight),inset 0 -1px 0 rgba(29,36,38,.06);
  backdrop-filter:blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter:blur(var(--blur)) saturate(150%);
}

.glass:before {
  content:'';
  position:absolute;
  inset:1px;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(130deg,var(--highlight),transparent 24%,transparent 75%,rgba(249,168,38,.1));
  opacity:.23;
}

.glass>* {
  position:relative;
}

body[data-material=liquid] .glass {
  border-width:1.5px;
  box-shadow:var(--shadow),inset 0 2px 2px var(--highlight),inset 1px 0 1px var(--highlight),inset 0 -2px 2px rgba(90,57,15,.06);
}

body[data-material=liquid] .float-chip {
  backdrop-filter:blur(30px) saturate(170%);
  -webkit-backdrop-filter:blur(30px) saturate(170%);
}

/* Opaque fallback from the studies; also use it when transparency is reduced. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--panel); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, body[data-material=liquid] .float-chip {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .glass::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
