/* =====================================================================
   WestTech standard  v1.0
   The shared design system for Jay West's apps (first used: Local Artist Registry).
   White theme, liquid glass: light translucent panels over a soft colored backdrop,
   background blur behind glass, and lifted 3D depth on panels and buttons.
   Docs: docs/WESTTECH-STANDARD.md. Copy this file as-is into another app, then
   override only the --wt-brand-* tokens.
   ===================================================================== */

:root {
  /* Brand (override per app) */
  --wt-brand: #d0202e;          /* primary action color */
  --wt-brand-2: #a3141f;        /* darker end of the brand gradient */
  --wt-brand-ink: #ffffff;      /* text on brand */
  --wt-glow-a: #ffd6dc;         /* backdrop color blobs */
  --wt-glow-b: #dbe7ff;
  --wt-glow-c: #fff1d6;

  /* Neutrals: always readable on glass */
  --wt-bg: #f4f5f8;
  --wt-ink: #0f172a;            /* body text, 15.9:1 on white */
  --wt-ink-2: #334155;          /* secondary text, 10.4:1 on white */
  --wt-muted: #556070;          /* hints, 6.3:1 on white */
  --wt-line: rgba(15, 23, 42, 0.09);
  --wt-ok: #15803d;
  --wt-warn: #a15c00;

  /* Glass */
  --wt-glass: rgba(255, 255, 255, 0.62);
  --wt-glass-strong: rgba(255, 255, 255, 0.82);
  --wt-glass-edge: rgba(255, 255, 255, 0.85);
  --wt-blur: 22px;
  --wt-sat: 170%;

  /* Depth */
  --wt-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06);
  --wt-shadow-2: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.10);
  --wt-shadow-3: 0 4px 8px rgba(15, 23, 42, 0.06), 0 24px 60px rgba(15, 23, 42, 0.14);
  --wt-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(15, 23, 42, 0.04);

  /* Shape and type */
  --wt-r-sm: 10px;
  --wt-r: 16px;
  --wt-r-lg: 24px;
  --wt-font: var(--wt-font-inter, "Inter"), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Page backdrop: soft color fields give the glass something to blur. */
.wt-body {
  margin: 0;
  min-height: 100vh;
  color: var(--wt-ink);
  font: 17px/1.6 var(--wt-font);
  background:
    radial-gradient(40vw 40vw at 8% -5%, var(--wt-glow-a) 0%, transparent 70%),
    radial-gradient(45vw 45vw at 100% 10%, var(--wt-glow-b) 0%, transparent 70%),
    radial-gradient(50vw 50vw at 40% 110%, var(--wt-glow-c) 0%, transparent 70%),
    var(--wt-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Glass surfaces */
.wt-glass {
  background: var(--wt-glass);
  -webkit-backdrop-filter: blur(var(--wt-blur)) saturate(var(--wt-sat));
  backdrop-filter: blur(var(--wt-blur)) saturate(var(--wt-sat));
  border: 1px solid var(--wt-glass-edge);
  border-radius: var(--wt-r);
  box-shadow: var(--wt-highlight), var(--wt-shadow-2);
}
.wt-glass-strong { background: var(--wt-glass-strong); }
.wt-lift { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.wt-lift:hover { transform: translateY(-2px); box-shadow: var(--wt-highlight), var(--wt-shadow-3); }

/* Browsers without backdrop blur get a solid, still-readable panel. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .wt-glass { background: rgba(255, 255, 255, 0.94); }
}

/* Buttons: lifted, pressable */
.wt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 700 16px/1 var(--wt-font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.wt-btn-primary {
  color: var(--wt-brand-ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--wt-brand) 88%, #fff) 0%, var(--wt-brand) 45%, var(--wt-brand-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(15, 23, 42, 0.2),
    0 8px 20px color-mix(in srgb, var(--wt-brand) 35%, transparent);
}
.wt-btn-glass {
  color: var(--wt-ink);
  background: var(--wt-glass-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: var(--wt-glass-edge);
  box-shadow: var(--wt-highlight), var(--wt-shadow-1);
}
.wt-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.wt-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.15); }
.wt-btn:disabled, .wt-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Inputs: frosted wells */
.wt-input {
  width: 100%; font: inherit; color: var(--wt-ink); padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.12); border-radius: var(--wt-r-sm);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wt-input:focus { outline: none; border-color: var(--wt-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wt-brand) 18%, transparent); }

/* Focus ring for everything interactive */
.wt-body :focus-visible { outline: 3px solid color-mix(in srgb, var(--wt-brand) 70%, #fff); outline-offset: 2px; }

/* Chips */
.wt-chip {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.8); border: 1px solid var(--wt-line); color: var(--wt-ink-2);
}

/* Sticky glass bar */
.wt-bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(var(--wt-blur)) saturate(var(--wt-sat));
  backdrop-filter: blur(var(--wt-blur)) saturate(var(--wt-sat));
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 var(--wt-line), 0 8px 24px rgba(15, 23, 42, 0.05);
}

@media (prefers-reduced-motion: reduce) {
  .wt-lift, .wt-btn { transition: none; }
  .wt-lift:hover, .wt-btn:hover { transform: none; }
}
