/* ==========================================================================
   The evening and the night. The clock in sky.js marks <html> with data-sky and
   writes the tokens on it, so grey by grey these rules only say what takes which
   token. Ink and greys only: by night the page is #0a0a0a, the black buttons are
   white and the light wash is white at 12%. By day none of this applies.
   ========================================================================== */

/* The main ones are registered so that the words changing sides (at dusk, or with the moon) is a fade, not a jump. */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #fff; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: #0a0a0a; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #767676; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #f2f2f2; }
@property --word { syntax: "<color>"; inherits: true; initial-value: #0000; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --on-ink { syntax: "<color>"; inherits: true; initial-value: #fff; }

@media (prefers-reduced-motion: no-preference) {
  :root { transition: --bg 0.6s ease, --fg 0.6s ease, --muted 0.6s ease, --surface 0.6s ease, --word 0.6s ease, --ink 0.6s ease, --on-ink 0.6s ease; }
}

/* Its pill, solid so its two rows don't add up where they meet. */
[data-sky] .loader { --surface: var(--pill); }

/* The work over the page. */
[data-sky] .f-focus,
[data-sky] .page-o .f-focus { background: var(--focus); }

/* A cut-out made for white. */
[data-sky] .media[data-ground="light"] { background: #fff; }

/* The buttons on the work. Over a picture what's under them decides the words (focus.js). */
[data-sky] .page-s .o-pill:not(.o-pill--dark),
[data-sky] .page-s .r-bar a { background: var(--wash); }
[data-sky] .page-s .o-top__nav,
[data-sky] .page-s .r-bar a { color: var(--word); }
[data-sky] .page-s .r-bar a[aria-current="page"] { color: var(--fg); }
[data-sky] .page-s .o-pill.is-dark:not(.o-pill--dark),
[data-sky] .page-s .r-bar a.is-dark[aria-current="page"] { color: #fff; }
[data-sky] .page-s .r-bar a.is-dark { color: rgb(255 255 255 / 0.72); }
[data-sky] .page-s .o-pill.is-light:not(.o-pill--dark),
[data-sky] .page-s .r-bar a.is-light[aria-current="page"] { color: #0a0a0a; }
[data-sky] .page-s .r-bar a.is-light { color: rgb(0 0 0 / 0.62); }

/* The black buttons, white from the dark greys on. */
[data-sky] .pill--dark,
[data-sky] .o-pill--dark,
[data-sky] .page-s .o-pill--dark,
[data-sky] .page-s .r-round,
[data-sky] .page-s .ab-contact .ab-cta,
[data-sky] .page-s .cv-sheet .ab-cta,
[data-sky] .hm-btn,
[data-sky] .ct-btn,
[data-sky] .hi-toast { background: var(--ink); color: var(--on-ink); }
[data-sky] .ct-btn[aria-disabled="true"] { background: var(--ink-busy); }
[data-sky] .page-s .wk-filters .pill[aria-pressed="true"],
[data-sky] .skip:focus { color: var(--bg); }

@media (hover: hover) {
  [data-sky] .page-s .o-pill:not(.o-pill--dark):hover,
  [data-sky] .page-s .r-bar a:hover { background: var(--wash-hover); color: var(--fg); }
  [data-sky] .page-s .o-pill.is-dark:not(.o-pill--dark):hover,
  [data-sky] .page-s .r-bar a.is-dark:hover { color: #fff; }
  [data-sky] .page-s .o-pill.is-light:not(.o-pill--dark):hover,
  [data-sky] .page-s .r-bar a.is-light:hover { color: #0a0a0a; }
  [data-sky] a.pill--dark:hover,
  [data-sky] .o-pill--dark:hover,
  [data-sky] .page-s .o-pill--dark:hover,
  [data-sky] .page-s .r-round:hover,
  [data-sky] .page-s .ab-contact .ab-cta:hover,
  [data-sky] .page-s .cv-sheet .ab-cta:hover,
  [data-sky] .hm-btn:hover,
  [data-sky] .ct-btn:hover { background: var(--ink-hover); }
  [data-sky] .player__btn:hover { background: var(--soft); }
}

/* The video player's lines. */
[data-sky] .player__scrub::-webkit-slider-runnable-track,
[data-sky] .player__level::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--fg) var(--p), var(--track) var(--p)); }
[data-sky] .player__scrub::-moz-range-track,
[data-sky] .player__level::-moz-range-track { background: linear-gradient(to right, var(--fg) var(--p), var(--track) var(--p)); }

/* Underlines. */
[data-sky] .ab-link,
[data-sky] .ab-clients a,
[data-sky] .hm-clients a,
[data-sky] .wk-empty a,
[data-sky] .f-doc__chapter a:not(.f-accent),
[data-sky] .page-n .e-proj__text a,
[data-sky] .page-n .f-doc__chapter a,
[data-sky] .page-n .n-footer a,
[data-sky] .page-s .f-proj__cta a { text-decoration-color: var(--underline); }

[data-sky] .ab-peek { box-shadow: 0 0 0 1px var(--ring), 0 12px 32px rgb(0 0 0 / 0.3); }

/* The form's examples, lighter than what's typed. */
[data-sky] .ct-field :is(input, textarea)::placeholder { color: var(--placeholder-text); }
