/* Executive Precision Design Tokens — Single Source of Truth */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Italic.ttf") format("truetype");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* === Core Palette (edit here to change theme colors) === */
  --fiamma-fucsia: #D62F79;

  /* Surfaces */
  --bg-canvas: light-dark(#F9EBDD, #1C1C1C);
  --surface: light-dark(#FFFFFF, #272727);
  --surface-subtle: light-dark(#F8F4EF, #333333);

  /* Text */
  --text-primary: light-dark(#1C1C1C, #F5F5F5);
  --text-secondary: light-dark(#574950, #C9C9C9);
  --text-inverse: #FFFFFF;

  /* Borders */
  --border-subtle: light-dark(#DFCEC3, #444444);
  --border-strong: light-dark(#A88981, #777777);

  /* Primary Action & Brand Accent */
  --action-primary: var(--fiamma-fucsia);
  --accent-primary: var(--fiamma-fucsia);

  /* Semantic Status (kept independent from brand accent) */
  --status-success: light-dark(#006948, #6ee7b7);
  --status-review: light-dark(#854d0e, #fde047);
  --status-correction: light-dark(#9a3412, #fdba74);
  --danger: light-dark(#ba1a1a, #f87171);

  /* === Derived Tokens (auto-computed from Core Palette) === */
  --border-hairline: color-mix(in srgb, var(--border-subtle) 55%, transparent);
  --accent-soft: var(--surface-subtle);
  --accent-border: var(--border-strong);
  --surface-translucent: color-mix(in srgb, var(--surface) 94%, transparent);
  --shadow-sm: 0 1px 3px light-dark(rgba(17, 24, 39, 0.03), rgba(0, 0, 0, 0.28)),
               0 4px 16px light-dark(rgba(17, 24, 39, 0.03), rgba(0, 0, 0, 0.22));
  --shadow-md: 0 10px 30px -4px light-dark(rgba(17, 24, 39, 0.06), rgba(0, 0, 0, 0.45)),
               0 4px 8px -2px light-dark(rgba(17, 24, 39, 0.03), rgba(0, 0, 0, 0.3));

  /* Typography */
  --font-display: "Manrope", "Inter", system-ui, -apple-system, sans-serif;
  --font-editorial: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  /* Spacing Scale (4, 8, 12, 16, 24, 32, 48, 64 px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-control: 8px;
  --radius-md: 12px;
  --radius-card: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Layout & Accessibility */
  --max-width: 1280px;
  --tap-target: 44px;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}
