/* ==========================================================================
   Photographica — design token compatibility bridge.

   Mirrors the primitive tokens from the Tailwind v4 @theme block in
   frontend/src/styles/tokens.css as plain :root CSS Custom Properties so
   that legacy stylesheets (style.css, etc.) can use var(--oxblood-600)
   etc. while the codebase migrates to Tailwind utilities. Authoritative
   spec: docs/design-handoff/colors_and_type.css.

   When tokens change, update both this file AND tokens.css — keep them in
   sync. Eventually (once all legacy CSS is gone) this file can be deleted.

   The four web font families load via the Google Fonts <link> in
   code/templates/base/stylesheets.html. The wordmark is an inline SVG
   served from the masthead template, not a font.
   ========================================================================== */

:root {
	/* Rail — the tan gutter the white feed cards float on. */
	--rail: #ece7df;

	/* Paper — warm cream surfaces */
	--paper-50:  #fbf8f3;
	--paper-100: #f6f1e8; /* interactive-ground: hover states, drop zones, chip/pill backgrounds */
	--paper-200: #f0eae1; /* panel surface: rail blocks, editor wells, image placeholders, icon-button hover */
	--paper-300: #e5ded3;
	--paper-400: #d2bfa6;
	--paper-500: #cec2a1;

	/* Ink — warm browns, never pure black */
	--ink-900: #2a2520; /* heading text: story titles, section heads, strongest text weight */
	--ink-800: #3d362e; /* default body text: prose, labels, secondary buttons — warmer than ink-900 */
	--ink-700: #4a3f33;
	--ink-600: #68663f;
	--ink-500: #8c7651;
	--ink-400: #ab965e;

	/* Oxblood — signature link color */
	--oxblood-700: #5a0b0e; /* hover/pressed state of oxblood-600: button hover fills, link hover text */
	--oxblood-600: #6d0d11; /* primary action color: buttons, links, focus rings, selection halos, progress bars */
	--oxblood-500: #8a2a2f;
	--oxblood-300: #c77a7e;
	--oxblood-100: #f4e6e7;

	/* Dusk — navy chrome */
	--dusk-900: #1c2336;
	--dusk-800: #2a334c;
	--dusk-700: #43527a;
	--dusk-600: #5e73ab;
	--dusk-500: #7493e8;
	--dusk-200: #d1daf1;
	--dusk-100: #e6ecf7;

	/* Ember — community-feedback accent. Hue ~14°, warm-family pop.
	   See frontend/src/styles/tokens.css for the color-science rationale. */
	--ember-600: #d94a1a;
	--ember-500: #f25c2a;
	--ember-100: #fde6d9;

	/* Semantic */
	--warn-600:    #a35b1e;
	--warn-100:    #f6e8d6;
	--success-600: #4a7a3a;
	--success-100: #e2ecd6;
	--danger-600:  var(--oxblood-600);
	--danger-100:  var(--oxblood-100);

	/* Surfaces */
	--bg-page:      var(--dusk-200);
	--bg-surface:   #ffffff;
	--bg-panel:     var(--paper-200);
	--bg-panel-alt: var(--paper-100);
	--bg-masthead:  var(--dusk-700);
	--bg-selected:  var(--ink-400);
	--bg-hover:     var(--paper-100);

	/* Text */
	--fg-default:     var(--ink-800);
	--fg-muted:       var(--ink-600);
	--fg-subtle:      var(--ink-500);
	--fg-inverse:     #ffffff;
	--fg-inverse-mut: #d8ddeb;
	--fg-heading:     var(--ink-900);
	--fg-link:        var(--oxblood-600);
	--fg-link-hover:  var(--dusk-500);

	/* Borders */
	--border-default: var(--paper-300);
	--border-strong:  var(--paper-400);
	--border-subtle:  #ede6d9;
	--border-dashed:  var(--paper-300);

	/* Shadows */
	--shadow-xs: 0 1px 0 rgba(71, 63, 43, 0.04);
	--shadow-sm: 0 1px 2px rgba(71, 63, 43, 0.06), 0 1px 1px rgba(71, 63, 43, 0.04);
	--shadow-md: 0 2px 6px rgba(71, 63, 43, 0.08), 0 1px 2px rgba(71, 63, 43, 0.06);
	--shadow-lg: 0 8px 20px rgba(71, 63, 43, 0.10), 0 2px 4px rgba(71, 63, 43, 0.06);
	--shadow-photo: 0 1px 0 rgba(255,255,255,0.7) inset,
	                0 2px 8px rgba(42, 37, 32, 0.18);

	/* Focus ring */
	--focus-ring: 0 0 0 3px rgba(109, 13, 17, 0.25);

	/* Type families — OS system stack. No webfont download, no FOUT.
	   The slab-serif wordmark SVG is the only typography on the page
	   with character; everything else is the local OS sans. Hierarchy
	   comes from weight and size, not family. */
	--font-display: Verdana, Geneva, Tahoma, sans-serif;
	--font-body:    Verdana, Geneva, Tahoma, sans-serif;
	--font-ui:      Verdana, Geneva, Tahoma, sans-serif;
	--font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

	/* Type scale */
	--fs-xs:   0.75rem;
	--fs-sm:   0.875rem;
	--fs-base: 1rem;
	--fs-md:   1.0625rem;
	--fs-lg:   1.25rem;
	--fs-xl:   1.5rem;
	--fs-2xl:  1.875rem;
	--fs-3xl:  2.5rem;
	--fs-4xl:  3.25rem;
	--fs-hero: 4.5rem;

	/* Line heights */
	--lh-tight:   1.12;
	--lh-snug:    1.28;
	--lh-normal:  1.5;
	--lh-reading: 1.65;
	--lh-loose:   1.8;

	/* Weights */
	--fw-regular: 400;
	--fw-medium:  500;
	--fw-semi:    600;
	--fw-bold:    700;

	/* Letter spacing */
	--tracking-tight:  -0.015em;
	--tracking-normal: 0;
	--tracking-wide:   0.04em;
	--tracking-caps:   0.08em;

	/* Spacing */
	--space-0: 0;
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-7: 3rem;
	--space-8: 4rem;
	--space-9: 6rem;

	/* Column widths */
	--reading-col: 38rem;
	--wide-col:    52rem;
	--page-max:    72rem;

	/* Radii */
	--r-sm:   3px;
	--r-md:   6px;
	--r-lg:   10px;
	--r-pill: 999px;

	/* Motion */
	--ease-out:    cubic-bezier(0.2, 0.7, 0.2, 1);
	--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
	--dur-fast:    120ms;
	--dur-normal:  200ms;
	--dur-slow:    360ms;
}
