/* ==========================================================================
   Design tokens — Figma variables, with the page neutrals swapped from
   Tailwind zinc to "Moss": a near-neutral green-gray surface with cream text
   (emerald / blue scales unchanged)
   ========================================================================== */

:root {
  /* Palette */
  /* Moss (muted): surfaces carry a faint green tint (OKLCH hue ~138°,
     chroma 0.004) and text a faint cream one. Product screenshots are mostly
     cool or neutral grays (often Tailwind zinc), so this keeps them reading
     as framed work instead of blending into the page. */
  --white: #ffffff;          /* icons on media (play button) */
  --moss-paper: #f9f8f5;     /* light page */
  --moss-50: #f0efeb;
  --moss-200: #dbdad6;       /* light border */
  --moss-250: #d2d2cf;
  --moss-300: #cbcac7;
  --moss-500: #787875;
  --moss-550: #71716e;       /* light secondary text: lightest moss gray at ≥ 4.5:1 */
  --moss-600: #4c4d4a;
  --moss-ink: #212220;       /* light text */
  --moss-700: #474844;
  --moss-750: #3e3f3c;
  --moss-800: #343532;
  --moss-900: #2e302e;       /* dark page */
  --moss-950: #222422;       /* dark sidebar */
  --cream: #fffcf7;          /* dark text */
  --cream-300: #d1cfcb;
  --cream-500: #9c9b98;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;

  /* Semantic colors — light */
  --bg-main: var(--moss-paper);
  --bg-sidebar: var(--white);
  --text-primary: var(--moss-ink);       /* 15.0:1 on the page */
  --text-secondary: var(--moss-550);     /*  4.6:1 on the page, 4.9:1 on the sidebar */
  --text-tertiary: var(--moss-550);      /*  same as secondary in light mode */
  --media-placeholder: var(--white);
  --border: var(--moss-200);
  --accent: var(--emerald-500);
  --link: var(--blue-700);
  --link-hover: var(--blue-800);  /* one step deeper */
  /* Scrollbar thumbs: one step from their own background, so the sidebar's
     and the content's scrollbars look equally subtle */
  --scrollbar-thumb: var(--moss-300);          /* on moss-paper */
  --scrollbar-thumb-sidebar: var(--moss-250);  /* on white */

  /* Social brand colors (icon hover). Each is ≥ 3:1 against the white sidebar. */
  --brand-dribbble: #ea4c89; /* 3.6:1 */
  --brand-twitter: #1a8cd8;  /* 3.6:1 — Twitter's deeper blue; #1da1f2 is only 2.8:1 on white */
  --brand-linkedin: #0a66c2; /* 5.7:1 */

  /* Typography */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-features: "cv02" 1, "cv03" 1, "cv04" 1, "cv11" 1;
  --text-md: 1rem;          /* 16px */
  --text-md-lh: 1.5rem;     /* 24px */
  --text-md-tracking: -0.004em;  /* -0.4% */
  --caption: 0.625rem;      /* 10px */
  --caption-lh: 1rem;       /* 16px */
  --caption-tracking: 0.01em;    /* +1% */

  /* Spacing scale (all multiples of 4/8) */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-4: 1rem;         /* 16px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-12: 3rem;        /* 48px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */

  /* Layout */
  --sidebar-width: 20rem;  /* 320px */
  --content-max: 60rem;    /* 960px */
  --text-inset: 0.5rem;    /* 8px — text optically inset from media edges */
  --col-text: 34rem;       /* 544px */
  --col-meta: 19rem;       /* 304px */
  --col-gap: 6rem;         /* 96px */
  --icon-box: 1.5rem;      /* 24px */
  --icon: 1.25rem;         /* 20px */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 560ms;

  /* Page transition: shared elements morph while the rest fades around them */
  --ease-morph: cubic-bezier(0.76, 0, 0.24, 1); /* ease-in-out quart */
  --dur-morph: 720ms;
  --dur-page-out: 240ms;
  --dur-page-in: 440ms;
  --delay-page-in: 360ms;

  color-scheme: light;
}

/* Semantic colors — dark */
:root[data-theme="dark"] {
  --bg-main: var(--moss-900);
  --bg-sidebar: var(--moss-950);
  --text-primary: var(--cream);          /* 13.0:1 on the page */
  --text-secondary: var(--cream-300);    /*  8.6:1 */
  --text-tertiary: var(--cream-500);     /*  5.6:1 on the sidebar */
  --media-placeholder: var(--moss-750);
  --border: var(--moss-700);
  --accent: var(--emerald-400);
  --link: var(--blue-300);
  --link-hover: var(--blue-200);  /* one step brighter */
  --scrollbar-thumb: var(--moss-700);          /* on moss-900 */
  --scrollbar-thumb-sidebar: var(--moss-800);  /* on the darker moss-950 */

  /* Social brand colors against the moss-950 sidebar */
  --brand-dribbble: #ea4c89; /* 4.4:1 */
  --brand-twitter: #1da1f2;  /* 5.5:1 — the classic bird blue */
  --brand-linkedin: #378fe9; /* 4.7:1 — LinkedIn's lighter blue; #0a66c2 is too dark here */

  color-scheme: dark;
}
