/* Photoshoot — base reset, typography, and the design-token system.
   :root is the default "Studio" theme: a neutral, Apple-Photo-Booth-inspired
   light look. One restrained accent (system blue) for selection, one vivid pop
   (the red shutter). Deliberately NONE of the AI-slop tells — no indigo/violet,
   no gradient text, no colored glows, no glassmorphism, no one-radius-for-all. */

:root {
  /* ---- color (neutral chrome + single blue accent + red shutter) ---- */
  --app-bg: #ececec;
  --app-bg-2: #e8e8e8;
  --toolbar-bg: #dcdcdc;
  --app-bg-accent: #007aff;
  --surface: #ffffff;
  --surface-2: #f4f5f5;
  --surface-3: #e9e9ea;
  --panel: #ffffff;
  --panel-border: rgba(0, 0, 0, 0.1);
  --text: rgba(0, 0, 0, 0.85);
  --text-dim: rgba(0, 0, 0, 0.6);
  --text-faint: rgba(0, 0, 0, 0.4);
  --accent: #007aff;
  --accent-2: #007aff;
  --accent-contrast: #ffffff;
  --btn-bg: rgba(0, 0, 0, 0.05);
  --btn-bg-hover: rgba(0, 0, 0, 0.09);
  --btn-text: rgba(0, 0, 0, 0.85);
  --btn-border: rgba(0, 0, 0, 0.12);
  --shutter: #ff3b30;
  --shutter-2: #e8362c;
  --shutter-ring: transparent;
  --shutter-glow: transparent;
  --tray-bg: rgba(0, 0, 0, 0.46);
  --tray-border: rgba(255, 255, 255, 0.16);
  --thumb-border: rgba(255, 255, 255, 0.65);
  --modal-bg: #ffffff;
  --modal-border: rgba(0, 0, 0, 0.12);
  --menu-bg: #ffffff;
  --menu-tile: #f0f0f1;
  --menu-tile-active: #e6f0ff;
  --countdown-color: #ffffff;
  --countdown-glow: rgba(0, 0, 0, 0.45);
  --flash-color: #ffffff;
  --viewfinder-frame: #1a1a1a;
  --viewfinder-inner: #0d0d0d;
  --scrollbar: rgba(0, 0, 0, 0.22);
  --focus-ring: #007aff;
  --danger: #ff3b30;
  --success: #34c759;

  /* traffic-light window controls */
  --tl-close: #ff5f57;
  --tl-min: #febc2e;
  --tl-zoom: #28c840;

  /* ---- length: a deliberate radius + 4/8 spacing system ---- */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 980px;
  --space: 16px;
  --space-lg: 24px;
  --border-width: 1px;
  --viewfinder-radius: 0px;
  --thumb-radius: 5px;

  /* ---- shadow: minimal. Cards rely on contrast, not drop-shadow.
         Only floating popovers/modals get a soft macOS-style shadow. ---- */
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.1);
  --shadow-inset: none;
  --shutter-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  --panel-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

  /* ---- font: the macOS system stack (SF Pro on Mac, Segoe UI on Windows).
         Never a webfont; never Inter. ---- */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", sans-serif;

  /* ---- textures (only ever set to data: URIs by validated themes) ---- */
  --app-bg-texture: none;
  --surface-texture: none;
  --viewfinder-texture: none;
  --tray-texture: none;

  /* ---- motion: ease-out, unhurried (every animation gets its time). ---- */
  --dur: 0.26s;
  --dur-slow: 0.46s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-drop: cubic-bezier(0.34, 1.2, 0.5, 1);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 13px;
  letter-spacing: 0.01px;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.012em;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: default;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

/* Web build: no OS window controls, so hide the traffic lights. */
html[data-platform="web"] .traffic {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 5px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 980px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
