/* SempreVenda design system — shared tokens and reusable surfaces */
:root {
  /* Color */
  --paper: #f5f7f2;
  --surface: #ffffff;
  --ink: #101512;
  --lead-ink: #485149;
  --muted: #5d675f;
  --line: rgba(16, 21, 18, 0.13);
  --control-border: rgba(16, 21, 18, 0.15);
  --green: #07875a;
  --green-light: #13a871;
  --green-dark: #055f41;
  --charcoal: #101512;
  --selection: #b8f1d6;

  /* Typography */
  --font-sans: "Geist", Arial, sans-serif;
  --font-mono: "Geist Mono", monospace;
  --weight-regular: 400;
  --weight-display: 400;
  --weight-medium: 500;
  --weight-semibold: 650;

  /* Layout */
  --content-max: 1560px;
  --navbar-max: 1440px;
  --page-gutter: clamp(22px, 4.8vw, 78px);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Geometry: rounded rectangles, never pills */
  --radius-control: 8px;
  --radius-menu-item: 10px;
  --radius-panel-compact: 14px;
  --radius-panel: 18px;

  /* Motion and focus */
  --motion-fast: 180ms ease;
  --focus-ring: 3px solid rgba(7, 135, 90, 0.34);

  /* Liquid glass */
  --glass-border: rgba(255, 255, 255, 0.68);
  --glass-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(242, 248, 244, 0.25));
  --glass-filter: blur(28px) saturate(190%) contrast(106%) brightness(104%);
  --glass-shadow:
    0 1px 0 rgba(16, 21, 18, 0.08),
    0 18px 44px rgba(25, 46, 33, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  --glass-grain-opacity: 0.3;
}

.sv-icon {
  display: block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  overflow: visible;
}

/*
 * Reusable liquid-glass surface.
 * Add .sv-glass to a positioned container. Direct children remain above the
 * specular and grain layers. Pair with a radius token appropriate to its size.
 */
.sv-glass {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
}

.sv-glass::before,
.sv-glass::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.sv-glass::before {
  background:
    radial-gradient(ellipse 38% 150% at 12% -65%, rgba(255, 255, 255, 0.92), transparent 68%),
    radial-gradient(ellipse 34% 130% at 86% 165%, rgba(153, 245, 198, 0.2), transparent 72%),
    linear-gradient(100deg, rgba(255, 255, 255, 0.2), transparent 42%, rgba(255, 255, 255, 0.14));
}

.sv-glass::after {
  background-image:
    radial-gradient(circle, rgba(15, 24, 18, 0.3) 0 0.45px, transparent 0.75px),
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 0.5px, transparent 0.8px),
    radial-gradient(circle, rgba(47, 92, 65, 0.2) 0 0.4px, transparent 0.7px);
  background-position: 0 0, 1px 1px, 2px 0;
  background-size: 3px 3px, 4px 4px, 5px 5px;
  mix-blend-mode: soft-light;
  opacity: var(--glass-grain-opacity);
}

.sv-glass > * {
  position: relative;
  z-index: 1;
}
