/* COG design system, v0.1. One file of tokens every COG screen imports.
   Base: a warm paper page that turns to night; the board is the one rich object, set in a warm mat like a framed picture. */
@font-face { font-family: "Newsreader"; font-weight: 400; src: url(/web/vendor/fonts/newsreader-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: italic; src: url(/web/vendor/fonts/newsreader-latin-400-italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Newsreader"; font-weight: 500; src: url(/web/vendor/fonts/newsreader-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Geist"; font-weight: 400; src: url(/web/vendor/fonts/geist-sans-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Geist"; font-weight: 500; src: url(/web/vendor/fonts/geist-sans-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Geist Mono"; font-weight: 400; src: url(/web/vendor/fonts/geist-mono-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Geist Mono"; font-weight: 500; src: url(/web/vendor/fonts/geist-mono-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Chalk"; font-weight: 500; src: url(/web/vendor/fonts/caveat-latin-500-normal.woff2) format("woff2"); font-display: swap; }

:root {
  /* paper: the light page */
  --paper: #f4f3ee;  --paper-2: #ecebe4;  --paper-line: rgba(26,23,20,.09);
  --ink: #1a1714;    --ink-2: #5c5852;    --ink-3: #8d8880;
  /* night: the dark sections */
  --night: #1c1917;  --night-2: #24201d;  --night-line: rgba(244,243,238,.08);
  --on-night: #f4f3ee; --on-night-2: #a8a39b; --on-night-3: #6f6a63;
  /* the board and its chalk */
  --board: #171a18;  --board-line: rgba(236,238,234,.07);
  --chalk: #eceeea;  --chalk-2: rgba(236,238,234,.62);
  --chalk-blue: #9cc4e4; --chalk-pink: #f2a7ae; --chalk-green: #a9d4a0;   /* working, wrong, right: on the board only */
  /* one accent, used rarely */
  --saffron: #e3a43a; --saffron-ink: #9a6512;   /* -ink: saffron as text on paper (4.6:1) */
  --sage: #8a9a7b;                               /* section labels */
  /* the mat a board sits in: warm chalk dust, out of focus */
  --mat: radial-gradient(120% 90% at 15% 10%, #c79a78 0%, transparent 55%),
         radial-gradient(90% 80% at 90% 85%, #a8775a 0%, transparent 60%),
         radial-gradient(60% 60% at 70% 20%, #d9c2a8 0%, transparent 70%), #8a6a55;

  /* type */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --chalkhand: "Chalk", cursive;
  --t-display: clamp(48px, 7vw, 88px);  --t-h1: clamp(36px, 4.6vw, 56px);  --t-h2: clamp(28px, 3vw, 36px);
  --t-h3: 22px;  --t-body: 17px;  --t-small: 14px;  --t-label: 12px;

  /* space, radius */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 160px;
  --r-control: 10px; --r-card: 16px; --r-mat: 20px; --r-pill: 999px;

  /* motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --d-instant: 100ms; --d-fast: 150ms; --d-base: 220ms; --d-slow: 320ms; --d-story: 480ms;
}

.cog-label { font: 500 var(--t-label)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
.cog-label b { font-weight: 500; color: var(--ink-3); margin-right: 10px; }
.cog-btn { appearance: none; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: var(--r-pill);
  font: 500 15px/1 var(--sans); cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: transform var(--d-instant) var(--ease), background var(--d-fast) var(--ease), color var(--d-fast) var(--ease); }
.cog-btn:active { transform: scale(.96); }
.cog-btn:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; }
.cog-btn.primary { background: var(--ink); color: var(--paper); }
.cog-btn.primary:hover { background: #2c2724; }
.cog-btn.quiet { background: transparent; color: var(--ink); border-color: var(--paper-line); }
.cog-btn.quiet:hover { background: var(--paper-2); }
.on-night .cog-btn.primary { background: var(--on-night); color: var(--night); }
.on-night .cog-btn.primary:hover { background: #fff; }
.on-night .cog-btn.quiet { color: var(--on-night); border-color: var(--night-line); }
.on-night .cog-btn.quiet:hover { background: var(--night-2); }
.cog-btn.small { height: 40px; padding: 0 16px; font-size: 14px; }

/* a board in its mat */
.cog-mat { position: relative; padding: 36px; border-radius: var(--r-mat); background: var(--mat); overflow: hidden; }
.cog-mat::before { content: ""; position: absolute; inset: 0; background: inherit; filter: blur(24px) saturate(.9); transform: scale(1.1); }
.cog-board { position: relative; border-radius: 12px; background: var(--board); border: 1px solid rgba(0,0,0,.4);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 30px 60px -30px rgba(0,0,0,.6); overflow: hidden; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; animation: none !important; } }

/* v2: one night of study. The page moves along this ramp as understanding grows. */
@font-face { font-family: "Geist"; font-weight: 600; src: url(/web/vendor/fonts/geist-sans-latin-600-normal.woff2) format("woff2"); font-display: swap; }
:root {
  --t-night: #0b0a09;  --t-late: #13111a;  --t-dawn: #2b2129;  --t-first: #6e4b3e;  --t-day: #f4f3ee;
  --on-dark: #f5f1ea; --on-dark-2: rgba(245,241,234,.72); --on-dark-3: rgba(245,241,234,.56);
  --on-day: #1a1714;  --on-day-2: #5c5852;   --on-day-3: #6f6a63;
  /* the teacher's light, by time of day */
  --light-night-core: #fff1d6; --light-night-glow: rgba(255,178,80,.22); --light-night-halo: rgba(255,170,70,.55);
  --light-day-core: #c27613;   --light-day-glow: rgba(227,164,58,.16);   --light-day-halo: rgba(227,164,58,.42);
}
