:root {
  --paper: #F5F4F2;        /* page bg — warm Vale white */
  --paper-card: #FFFFFF;    /* card bg */
  --ink: #1D1D1F;           /* primary text */
  --muted: #6E6E73;         /* secondary text */
  --hairline: rgba(0, 0, 0, 0.08);
  --accent: #0071E3;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body, #root { height: 100%; }

body {
  font-family:
    -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.font-display {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.font-serif {
  /* Used in the public page hero — keep an editorial moment but still SF for app */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  letter-spacing: -0.03em;
  font-weight: 600;
}

input, select, textarea, button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* Scrollbars — thin & subtle */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); background-clip: padding-box; border: 2px solid transparent; }

/* Liquid glass (Apple-style, on light bg) */
.glass {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.paper-panel {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.hairline, .hairline-ink { border-color: var(--hairline); }

/* Subtle dot grid for empty zones */
.dotgrid {
  background-image: radial-gradient(rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Placeholder fill — striped for image slots */
.placeholder-stripes {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.04) 0px,
    rgba(0,0,0,0.04) 1px,
    transparent 1px,
    transparent 8px
  );
}

/* No-grain — but a very subtle gradient on hero zones */
.grain {
  background:
    radial-gradient(circle at 0% 0%,   rgba(0,113,227,0.04), transparent 40%),
    radial-gradient(circle at 100% 80%, rgba(29,29,31,0.03), transparent 50%);
}

/* Drawer */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0);    opacity: 1;   }
}
.drawer-anim { animation: slideInRight 280ms cubic-bezier(0.22, 0.61, 0.36, 1); }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 220ms ease-out; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.pulse-dot { animation: pulseDot 1.8s ease-in-out infinite; }

/* Focus ring (Apple-style faint blue glow) */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.25);
}
button:focus-visible, [role="switch"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.25);
}

/* Subtle button press feel */
button { transition: background-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, opacity 140ms ease; }
button:active:not(:disabled) { transform: scale(0.98); }

/* Icon stroke — thin like SF Symbols */
[data-lucide], svg[stroke] { stroke-width: 1.5; }
