/* The theme switch in the top bar, and the light theme it turns on (html.light).
   Dark stays the standard look; light turns the paper part of the page (products, product view) warm paper
   with near-black ink; the films and everything on them stay as they are. */

/* the switch: a thin track with a knob, after the languages */
.lang .theme{position:relative;width:34px;height:18px;margin-left:6px;border:1px solid currentColor;border-radius:9px;opacity:.8;
  background:none;color:inherit;cursor:pointer;transition:opacity .3s;flex:none;align-self:center}
.lang .theme:hover{opacity:1}
.theme::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:currentColor;
  transition:transform .5s cubic-bezier(.16,1,.3,1)}
html.light .theme::after{transform:translateX(16px)}
/* on phones the top bar has no room beside the languages: the switch sits just under them, at the right edge */
@media (max-width:560px){.lang{position:relative}
  .lang .theme{position:absolute;right:0;top:calc(100% + 12px);width:28px;height:15px;margin:0}
  .theme::after{top:2px;left:2px;width:9px;height:9px}html.light .theme::after{transform:translateX(13px)}}

/* a short, soft change of colour when switching, not on page load */
html.theming *,html.theming *::before,html.theming *::after{transition:background-color .6s,color .6s,border-color .6s,text-shadow .6s,filter .6s,opacity .6s !important}

/* ---- light ----
   The films never change: every video, its black edges and the words laid over it (the first screen,
   the catalog band with its filters, the top bar while it sits on the film) stay exactly as in the dark theme.
   Only the paper part of the page turns light: the product grid, the footer, the product view,
   and the top bar once it turns solid over them. */
html.light{--paper:#ECE8E1;--ink:#161514;--hair:rgba(22,21,20,.16);background:var(--paper)}
html.light body,html.light .pv{background:var(--paper);color:var(--ink)}
html.light .band{background:#000}
html.light .grain-page{display:none}   /* the page-wide grain belongs to the dark page, not to paper */

/* words that sit on the film keep the dark theme's light colour (the languages take theirs from the page) */
html.light .top .lang,html.light .stage{color:#EEEBE5}
/* the top bar over the paper: a solid paper strip, words in ink */
html.light .top.solid::before{background:var(--paper);box-shadow:0 1px 0 var(--hair)}
html.light .top.solid .word,html.light .top.solid .cat,html.light .top.solid .lang{color:var(--ink);text-shadow:none}
html.light .top.solid .cat::after{background:var(--ink);box-shadow:none}
html.light .top .word,html.light .top .cat,html.light .top .lang{transition:color .5s,text-shadow .5s}

/* products, footer and the product view, in ink without the glow that only works on black */
html.light .kind,html.light .name,html.light .price,html.light .empty,html.light .foot,html.light .foot a,
html.light .pv-arrow,html.light .pv-name,html.light .pv-close,html.light .pv-brand,html.light .buy{color:var(--ink);text-shadow:none}
html.light .name::after,html.light .pv-thumbs button.on::after{background:var(--ink);box-shadow:none}
html.light .pv-specs,html.light .pv-specs div{border-color:var(--hair)}
html.light .pv-colors a{border-color:rgba(22,21,20,.25)}html.light .pv-colors a:hover{outline-color:rgba(22,21,20,.35)}html.light .pv-colors a.on{outline-color:var(--ink)}
html.light .buy{border-color:var(--ink);box-shadow:none}
html.light .buy::before{background:var(--ink)}
html.light .buy:hover{color:var(--paper);border-color:var(--ink);box-shadow:none}
html.light .foot{border-color:var(--hair)}

/* the basket and the quantity stepper on paper */
html.light .step{border-color:rgba(22,21,20,.25)}
html.light .bag-tab{background:var(--paper);color:var(--ink);border-color:rgba(22,21,20,.45);box-shadow:0 0 22px rgba(22,21,20,.12)}
html.light .bag-tab:hover{border-color:var(--ink)}
html.light .bag{background:var(--paper);color:var(--ink);border-color:var(--hair)}
html.light .bag-shade{background:rgba(22,21,20,.35)}
html.light .bag-head,html.light .bag-foot,html.light .bag-line{border-color:var(--hair)}
html.light .bag-head h3,html.light .bag-line .n{color:var(--ink)}
