/* Panora Life — Ember, the cream-and-orange theme (Craig, 2026-10-19: "I miss the cream and
 * orange"). The fourth family beside Grove, Sunrise and Glacier (js/sky.js), and the one
 * that follows light and dark:
 *
 *   light  Home on the cream page, dark warm type, solid cream cards, orange buttons;
 *   dark   a warm espresso sky with cream type, so the sky rules in css/sky.css apply.
 *
 * Light needs its own rules because every other family puts white type on a dark sky.
 * They hang off html.ember-light, which js/sky.js keeps true only for Ember in light.
 */

/* Home is a sky at every hour, as in Grove, Sunrise and Glacier (Craig, 2026-11-01: "align Ember and Slate
   with Grove, sunrise and Glacier so they are more beautiful and interesting"; decision 0082). The pages inside
   keep their light and dark looks, below. */
html[data-sky='ember'] #wins-home.sky {
  --sky-ink: #fff8ee;
}
html[data-sky='ember'] #wins-home.sky:not(.sky-night)::after {
  background: linear-gradient(
    180deg,
    rgba(120, 32, 10, 0.55) 0,
    rgba(120, 32, 10, 0.48) 170px,
    rgba(120, 32, 10, 0) 470px
  );
}
html[data-sky='ember'] #wins-home.sky-morning {
  --sky-bg:
    radial-gradient(90% 38% at 78% -6%, rgba(255, 214, 130, 0.34), rgba(255, 214, 130, 0) 70%),
    linear-gradient(180deg, #f8a44f 0%, #ef6f2e 32%, #c13a1c 64%, #571a22 100%);
}
html[data-sky='ember'] #wins-home.sky-afternoon {
  --sky-bg:
    radial-gradient(90% 38% at 78% -6%, rgba(255, 214, 130, 0.28), rgba(255, 214, 130, 0) 70%),
    linear-gradient(180deg, #f6993c 0%, #e7602a 32%, #b63419 64%, #4c171f 100%);
}
html[data-sky='ember'] #wins-home.sky-evening {
  --sky-bg:
    radial-gradient(90% 38% at 78% -6%, rgba(255, 214, 130, 0.2), rgba(255, 214, 130, 0) 70%),
    linear-gradient(180deg, #ea6a2d 0%, #b93a22 32%, #6a1f2c 64%, #25101e 100%);
}
html[data-sky='ember'] #wins-home.sky-night {
  --sky-bg: linear-gradient(180deg, #471a20 0%, #281116 45%, #120a0e 100%);
}
html[data-sky='ember'].on-home:has(#wins-home.sky-morning) body {
  background-color: #571a22;
}
html[data-sky='ember'].on-home:has(#wins-home.sky-afternoon) body {
  background-color: #4c171f;
}
html[data-sky='ember'].on-home:has(#wins-home.sky-evening) body {
  background-color: #25101e;
}
html[data-sky='ember'].on-home:has(#wins-home.sky-night) body {
  background-color: #120a0e;
}
html[data-sky='ember'] #wins-home.sky .welcome-card {
  --sky-deep: #7a2a12;
}

html[data-sky='ember'] #wins-home.sky {
  --sky-ink: #f4ecd8;
}

html[data-sky='ember'] .appbar {
  background: linear-gradient(100deg, #8a3a10 0%, #a8481a 50%, #c4561c 100%) !important;
}

html[data-sky='ember'] .appbar .homebtn,
html[data-sky='ember'] .appbar .homebtn span {
  color: #fdf3e3 !important;
}

/* The opening screen in Ember: espresso with the orange glow, cream type. */
html[data-sky='ember'] #splash {
  color: #f4ecd8;
  background:
    radial-gradient(70% 45% at 50% 44%, rgba(249, 110, 34, 0.36), rgba(249, 110, 34, 0) 70%),
    linear-gradient(180deg, #2c2022, #221a1c 35%, #181416 70%, #0f0d0e);
}

html[data-sky='ember'] #splash .sp-tag {
  color: #f4ecd8;
}

/* The swatch is Ember's own sky, orange to deep red (Craig, 2026-11-16: "ember needs to be
   orange"); it was the cream of the old page. */
.sky-pick .sw-ember {
  background:
    radial-gradient(90% 60% at 78% -6%, rgba(255, 214, 130, 0.45), rgba(255, 214, 130, 0) 70%),
    linear-gradient(180deg, #f8a44f, #ef6f2e 35%, #c13a1c 70%, #571a22);
  box-shadow: inset 0 0 0 1px rgba(43, 33, 24, 0.12);
}

html.ember-light .appbar {
  box-shadow: none;
}

/* ---------- inside the parts ---------- */
/* Light: the parts sit on cream too, not the cool grey-white. */
html.ember-light {
  --canvas: #f6eedf;
  --surface: #fffaf0;
  --surface-quiet: #f7eedd;
  --edge-strong: #dccdb2;
}

/* Dark: an espresso tint like the other families' (standard.css T3), and the orange a
   shade deeper with cream type on it (Craig, 2026-10-19: bright buttons in dark were too
   much in Grove and Glacier, so Ember gets the same quieter button). */
html[data-sky='ember']:not(.ember-light) {
  --canvas: #111012;
  --surface: #1c1a1c;
  --surface-quiet: #262325;
  --edge-strong: #3f3a3c;
}

/* The orange only while it is Ember's own accent (no other accent set). */
html[data-sky='ember']:not(.ember-light):not([data-accent]) {
  --accent: #b8521f;
  --accent-hi: #c45d28;
  --accent-lo: #a8481a;
  --accent-ink: #fdf3e3;
  --accent-text: #f0a070;
  --accent-wash: rgba(184, 82, 31, 0.18);
}
