/*
 * Paneo design tokens. Shared by the marketing site (web/), the editor and the screen view.
 *
 * Themes: dark is the default and lives in the plain :root block, because screens are always dark.
 * Light is an extra for the editor and the site: the OS preference applies it only when no
 * [data-theme] is set, and [data-theme="dark" | "light"] pins a theme with no media query.
 * The two light blocks below must stay identical (brand/tools/check.py enforces it).
 *
 * Screen view target is Safari 12: plain custom properties only, no color-mix, clamp, :is, @layer.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Theme-independent tokens ---- */
:root {
  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --text-xs: 0.75rem;   /* 12 */
  --text-sm: 0.875rem;  /* 14 */
  --text-md: 1rem;      /* 16 */
  --text-lg: 1.25rem;   /* 20 */
  --text-xl: 1.5rem;    /* 24 */
  --text-2xl: 2rem;     /* 32 */
  --text-3xl: 2.5rem;   /* 40 */
  /* Display sizes: read from across a room. The clock uses --text-display-xl. */
  --text-display-sm: 4rem;   /* 64 */
  --text-display-md: 6rem;   /* 96 */
  --text-display-lg: 9rem;   /* 144 */
  --text-display-xl: 12.5rem; /* 200 */

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --tracking-display: -0.03em;
  --tracking-tight: -0.01em;
  --tracking-caps: 0.08em;

  /* Spacing (4px base) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Motion: animate opacity and transform only */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 400ms;
  --duration-crossfade: 1200ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Layers */
  --z-tile: 1;
  --z-chrome: 10;
  --z-notification: 100;
}

/* ---- Dark (default) ---- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0b0e13;
  --color-surface: #141922;
  --color-surface-raised: #1c2330;
  --color-border: #2a3342;
  --color-text: #f3f5f8;
  --color-text-muted: #a3adbd;
  --color-text-subtle: #7c8799;
  --color-accent: #ff8f5e;
  --color-accent-hover: #ffa47c;
  --color-on-accent: #1a0e07;
  --color-success: #4ade80;
  --color-warning: #fbbf24;
  --color-danger: #f87171;
  --color-info: #60a5fa;
  --color-focus: #ffa47c;

  /* Calendar sources */
  --color-cal-1: #ff8f5e;
  --color-cal-2: #60a5fa;
  --color-cal-3: #4ade80;
  --color-cal-4: #c99afd;
  --color-cal-5: #fbbf24;
  --color-cal-6: #f78cc4;

  /* Tiles and overlays over photos (no blur on screens: a solid-alpha scrim instead) */
  --color-tile: rgba(11, 14, 19, 0.72);
  --color-tile-text: #ffffff;
  --color-tile-text-muted: #c9d1dc;
  --color-scrim: rgba(11, 14, 19, 0.72);
}

/* ---- Light (editor and site only) ---- */
[data-theme="light"] {
  color-scheme: light;
  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-border: #e3e5e8;
  --color-text: #12161d;
  --color-text-muted: #535d6c;
  --color-text-subtle: #6b7482;
  --color-accent: #c2410c;
  --color-accent-hover: #9a3412;
  --color-on-accent: #ffffff;
  --color-success: #15803d;
  --color-warning: #a16207;
  --color-danger: #b91c1c;
  --color-info: #1d4ed8;
  --color-focus: #c2410c;

  --color-cal-1: #c2410c;
  --color-cal-2: #1d4ed8;
  --color-cal-3: #15803d;
  --color-cal-4: #7e22ce;
  --color-cal-5: #a16207;
  --color-cal-6: #be185d;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --color-bg: #f7f7f5;
    --color-surface: #ffffff;
    --color-surface-raised: #ffffff;
    --color-border: #e3e5e8;
    --color-text: #12161d;
    --color-text-muted: #535d6c;
    --color-text-subtle: #6b7482;
    --color-accent: #c2410c;
    --color-accent-hover: #9a3412;
    --color-on-accent: #ffffff;
    --color-success: #15803d;
    --color-warning: #a16207;
    --color-danger: #b91c1c;
    --color-info: #1d4ed8;
    --color-focus: #c2410c;

    --color-cal-1: #c2410c;
    --color-cal-2: #1d4ed8;
    --color-cal-3: #15803d;
    --color-cal-4: #7e22ce;
    --color-cal-5: #a16207;
    --color-cal-6: #be185d;
  }
}
