/* Kiokura's design tokens for the web, both appearances. The palette is the app's (the silver Fujifilm X100V:
   an aluminium plate, black leatherette, one red), from the design canvas's boards and the app's DESIGN.md.
   This is the only stylesheet with colour literals: styles.css composes these properties and adds none.

   ground      the page: plate silver in light, satin black in dark, lit from above (--ground-light)
   leaf        a raised white surface: the Page excerpt, the reading sheet of a document page
   band        black leatherette, for one section and the footer; lettering on it is stamped
   red         a date stamp, and the one mark that says the app is coming. Never small text.
   device      the frame the product pictures sit in */

:root {
  color-scheme: light dark;

  --font: system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --expanded: 125%;
  --condensed: 62.5%;

  --ground: #E6E7EA;
  --ground-light: linear-gradient(#F3F4F6, #E6E7EA 34rem);
  --ground-deep: #DCDDE1;
  --ink: #0D0D0E;
  --ink-secondary: #4B4E52;
  --hairline: rgba(13, 13, 14, .14);
  --engraved: 0 1px 0 rgba(255, 255, 255, .85);
  --selection: rgba(212, 20, 28, .18);

  --leaf: #FBFBFC;
  --leaf-edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --leaf-fold: rgba(13, 13, 14, .13);
  --leaf-shadow: 0 1px 2px rgba(13, 13, 14, .18), 0 18px 40px -8px rgba(13, 13, 14, .22);
  --print-shadow: 0 1px 1px rgba(13, 13, 14, .36), 0 6px 12px -3px rgba(13, 13, 14, .32);

  --band: #1B1B1D;
  --band-image: url("/media/leatherette.jpg");
  --band-ink: #E6E7E9;
  --band-ink-secondary: #A4A7AC;
  --band-hairline: rgba(230, 231, 233, .16);
  --band-inlay: inset 0 3px 6px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(255, 255, 255, .06);
  --stamped: 0 -1px 0 rgba(0, 0, 0, .7);

  --red: #D4141C;

  --bezel: #0B0B0C;
  --bezel-edge: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 0 0 1px rgba(13, 13, 14, .5);
  --device-shadow: 0 2px 4px rgba(13, 13, 14, .18), 0 28px 60px -12px rgba(13, 13, 14, .38);
  --screen: #E4E5E8;

  --radius-leaf: .3125rem;
  --radius-print: .1875rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E0E0F;
    --ground-light: linear-gradient(#1B1B1F, #0E0E0F 34rem);
    --ground-deep: #09090A;
    --ink: #E6E7E9;
    --ink-secondary: #A4A7AC;
    --hairline: rgba(230, 231, 233, .16);
    --engraved: 0 -1px 0 rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .2);
    --selection: rgba(240, 58, 63, .32);

    --leaf: #222225;
    --leaf-edge: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .05);
    --leaf-fold: rgba(0, 0, 0, .35);
    --leaf-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 18px 40px -8px rgba(0, 0, 0, .7);
    --print-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 1px rgba(0, 0, 0, .75), 0 6px 12px -3px rgba(0, 0, 0, .7);

    --band: #232326;
    --band-inlay: inset 0 3px 6px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .12);

    --red: #F03A3F;

    --bezel: #050506;
    --bezel-edge: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 1px rgba(255, 255, 255, .2);
    --device-shadow: 0 2px 4px rgba(0, 0, 0, .6), 0 28px 60px -12px rgba(0, 0, 0, .85);
    --screen: #0E0E0F;
  }
}

/* Increase Contrast, Reduce Transparency: the grain goes and secondary text takes the full ink. */
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  :root {
    --band-image: none;
    --ink-secondary: var(--ink);
    --band-ink-secondary: var(--band-ink);
  }
}

/* Paper: the light values whatever the appearance, no texture, no shadow. */
@media print {
  :root {
    --ground: #FFFFFF;
    --ground-light: none;
    --ground-deep: #FFFFFF;
    --ink: #0D0D0E;
    --ink-secondary: #4B4E52;
    --hairline: rgba(13, 13, 14, .3);
    --engraved: none;
    --leaf: #FFFFFF;
    --leaf-edge: none;
    --leaf-fold: transparent;
    --leaf-shadow: none;
    --band: #FFFFFF;
    --band-image: none;
    --band-ink: #0D0D0E;
    --band-ink-secondary: #4B4E52;
    --band-hairline: rgba(13, 13, 14, .3);
    --band-inlay: none;
    --stamped: none;
    --red: #D4141C;
  }
}
