/* =====================================================================
   tokens.css — the design system in one file.

   Change the brand here, once, and both surfaces follow. Two surfaces,
   two moods, one set of tokens:
     - The portal (model) uses a calm, light, spacious feel.
     - The dashboard (photographer) uses the same tokens at higher density.

   These are starting values. Make them your friend's — swap the accent,
   the font, the radius. Just keep using the variables instead of
   hardcoding colors all over the app.
   ===================================================================== */

:root {
  /* --- Color ------------------------------------------------------- */
  --ink:        #1a1a1a;   /* primary text */
  --ink-soft:   #6b6b6b;   /* secondary text */
  --line:       #e7e7e4;   /* hairlines, borders */
  --paper:      #ffffff;   /* surfaces / cards */
  --canvas:     #faf9f7;   /* page background — warm off-white */
  --accent:     #b08d57;   /* brand accent — a quiet gold; change freely */
  --accent-ink: #ffffff;   /* text on accent */
  --danger:     #b4493f;
  --ok:         #4a7c59;

  /* --- Type -------------------------------------------------------- */
  --font-sans:  ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: ui-serif, Georgia, "Times New Roman", serif;  /* for display headings */

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-lg:   1.25rem;
  --t-xl:   1.75rem;
  --t-2xl:  2.5rem;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold:   650;

  /* --- Spacing (8px rhythm) --------------------------------------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* --- Shape & depth ---------------------------------------------- */
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);

  /* --- Motion ------------------------------------------------------ */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --fast: 120ms;
  --base-speed: 220ms;
}

/* Base reset-ish */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- Reusable bits both surfaces share -------------------------------- */
.sp-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5);
}

.sp-btn {
  font: inherit;
  font-weight: var(--weight-medium);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.sp-btn:hover { transform: translateY(-1px); }
.sp-btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.sp-empty {
  color: var(--ink-soft);
  font-size: var(--t-sm);
  padding: var(--s-6);
  text-align: center;
}

/* --- Gallery (used by features/gallery/gallery.js) -------------------- */
.sp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
}
.sp-gallery__tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #efeee9;     /* placeholder while the image lazy-loads */
  cursor: pointer;
}
.sp-gallery__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--base-speed) var(--ease);
}
.sp-gallery__tile.is-loaded img { opacity: 1; }
.sp-gallery__tile.is-error { background: #f4e9e7; }
