/* ===== Style options to try (html[data-theme]). The default site (no data-theme) is unchanged. ===== */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

html[data-theme] body { transition: background-color .5s ease, color .5s ease; }

/* ---------- A · Mediterranean: warm sand, terracotta accent, serif titles ---------- */
html[data-theme="med"] { --bg: #f3ece0; --ink: #2b211b; --accent: #c2512c; --soft: #e9dfcf; --muted: #b9ab98; }
html[data-theme="med"] body { background: var(--bg); color: var(--ink); }
html[data-theme="med"] .top .name, html[data-theme="med"] .view-what .rail > .card h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.02em; font-variation-settings: "opsz" 144, "SOFT" 50; }
html[data-theme="med"] .view-what .rail > .card h2 { font-size: clamp(26px, calc(var(--u) * 2.6), 40px); font-style: italic; font-weight: 500; color: var(--accent); }
html[data-theme="med"] .intro-text { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: clamp(20px, calc(var(--u) * 2.15), 32px); line-height: 1.3; }
html[data-theme="med"] .view-what .mini { color: var(--muted); }
html[data-theme="med"] .view-what .mini[aria-current="true"], html[data-theme="med"] .view-what .mini:hover { color: var(--accent); }
html[data-theme="med"] .view-what .mini[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
html[data-theme="med"] .card .desc { color: rgba(43,33,27,.78); }
html[data-theme="med"] .cases-box, html[data-theme="med"] .overlay.white .sheet { --card: var(--soft); background: var(--soft); }
html[data-theme="med"] .lang button[aria-pressed="true"], html[data-theme="med"] .link:hover { color: var(--accent); }
html[data-theme="med"] .logo-group .group-label { color: #9a8a76; }

/* ---------- B · Colour: each category fills the screen with its own colour ---------- */
html[data-theme="color"] { --c: #ff5a36; --on: #1a0d08; }
html[data-theme="color"][data-item="1"] { --c: #2f4bff; --on: #ffffff; }
html[data-theme="color"][data-item="2"] { --c: #ffd23f; --on: #1c1600; }
html[data-theme="color"] body:not(.intro-start) { background: var(--c); color: var(--on); }
html[data-theme="color"] body.intro-start { background: #fff; }
html[data-theme="color"] body:not(.intro-start) .top .name, html[data-theme="color"] .view-what .rail > .card,
html[data-theme="color"] .lang button[aria-pressed="true"], html[data-theme="color"] .bottom .link { color: var(--on); --card-ink: var(--on); }
html[data-theme="color"] .view-what .rail > .card h2 { font-size: clamp(30px, calc(var(--u) * 3.6), 56px); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; }
html[data-theme="color"] .view-what .mini { color: color-mix(in srgb, var(--on) 45%, transparent); }
html[data-theme="color"] .view-what .mini[aria-current="true"], html[data-theme="color"] .view-what .mini:hover { color: var(--on); }
html[data-theme="color"] .card .desc { color: color-mix(in srgb, var(--on) 82%, transparent); }
html[data-theme="color"] .cases-box { background: color-mix(in srgb, #fff 22%, transparent); }
html[data-theme="color"][data-item="1"] .view-what .rail > .card .logo img { filter: brightness(0) invert(1); }
html[data-theme="color"] .logo-group .group-label, html[data-theme="color"] .copy { color: color-mix(in srgb, var(--on) 60%, transparent); }
html[data-theme="color"] .rail { transition: none; }

/* ---------- C · Cinematic: dark (the chosen look) ---------- */
html[data-theme="cine"] { --bg: #000; --ink: #f1efea; --muted: #6b6b6b; background: #000; color-scheme: dark; }   /* pure black, also behind the phone's address bar and the bounce areas */
html[data-theme="cine"] body { background: var(--bg); color: var(--ink); }
html[data-theme="cine"] .top .name, html[data-theme="cine"] .view-what .rail > .card { color: var(--ink); --card-ink: var(--ink); }
/* the name: all caps, a bit smaller */
html[data-theme="cine"] body.no-cases .top .name { text-transform: uppercase; font-size: clamp(19px, calc(var(--u) * 2.2), 32px); font-weight: 800; letter-spacing: -.005em; }
html[data-theme="cine"] .view-what .rail > .card h2 { font-family: "Fraunces", Georgia, serif; font-weight: 400; font-size: clamp(30px, calc(var(--u) * 3.4), 52px); letter-spacing: -.02em; }
html[data-theme="cine"] .view-what .mini { color: #6f6f6f; }
html[data-theme="cine"] .view-what .mini[aria-current="true"], html[data-theme="cine"] .view-what .mini:hover { color: var(--ink); }
html[data-theme="cine"] .card .desc { color: rgba(241,239,234,.72); }
html[data-theme="cine"] .cases-box { background: rgba(255,255,255,.07); }
html[data-theme="cine"] .view-what .rail > .card .logo img { filter: brightness(0) invert(1); }
/* Cases logos (dark look): white at rest, a very light grey on hover (no colours; the opened case shows the logo in colour) */
html[data-theme="cine"] .cases-box .logo img { filter: brightness(0) invert(1) !important; }
html[data-theme="cine"] .cases-box .logo img, html[data-theme="cine"] .cases-box .logo .logo-text { transition: opacity .25s ease; }
@media (hover: hover) { html[data-theme="cine"] .cases-box .logo:hover img, html[data-theme="cine"] .cases-box .logo:hover .logo-text { opacity: .78; } }
html[data-theme="cine"] .logo-group .group-label, html[data-theme="cine"] .copy { color: #7a7a7a; }
html[data-theme="cine"] .lang button[aria-pressed="true"], html[data-theme="cine"] .link { color: var(--ink); }
html[data-theme="cine"] .intro-down { color: #e3cd4e; border-color: #e3cd4e; }
html[data-theme="cine"] .intro-down:hover { background: #e3cd4e; color: #000; }
html[data-theme="cine"] .overlay.white .sheet { --card: #161617; --card-ink: var(--ink); --card-muted: rgba(241,239,234,.72); background: #161617; color: var(--ink); }
html[data-theme="cine"] .overlay.white .sheet .logo-head img { filter: none; }   /* case page: the logo in colour (light version) */
/* ---------- picker to try the options (preview only) ---------- */
.theme-picker { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; display: flex; gap: 4px; padding: 5px;
  background: rgba(20,20,20,.88); border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font: 600 12px/1 var(--font); }
.theme-picker button { color: #bbb; padding: 9px 13px; border-radius: 999px; white-space: nowrap; }
.theme-picker button[aria-pressed="true"] { background: #fff; color: #111; }
@media (max-width: 600px) { .theme-picker { bottom: 10px; } .theme-picker button { padding: 8px 10px; font-size: 11px; } }

/* password field on the dark case page: light text on a dark field */
html[data-theme="cine"] .pw input { background: rgba(255,255,255,.06); color: #f1efea; border-color: rgba(241,239,234,.55); caret-color: #f1efea; }
html[data-theme="cine"] .pw input::placeholder { color: rgba(241,239,234,.5); }
html[data-theme="cine"] .pw input:focus { box-shadow: 0 0 0 3px rgba(241,239,234,.35); }
html[data-theme="cine"] .pw-go { background: #f1efea; color: #0d0d0e; }
/* when the browser fills in a saved password it paints the field light: keep it dark with light dots */
html[data-theme="cine"] .pw input:-webkit-autofill,
html[data-theme="cine"] .pw input:-webkit-autofill:hover,
html[data-theme="cine"] .pw input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1efea; caret-color: #f1efea;
  -webkit-box-shadow: 0 0 0 100px #232324 inset; box-shadow: 0 0 0 100px #232324 inset;
  transition: background-color 9999s ease 0s;
}
html[data-theme="cine"] .pw input:autofill { -webkit-text-fill-color: #f1efea; box-shadow: 0 0 0 100px #232324 inset; }
/* the case's close button on hover: light circle, dark X */
html[data-theme="cine"] .overlay .close:hover { background: var(--ink); border-color: var(--ink); color: #000; }
/* the case that is open: its logo in Explore cases turns yellow */
html[data-theme="cine"] .cases-box .logo.current img { filter: url(#tint-yellow) !important; opacity: 1 !important; }
html[data-theme="cine"] .cases-box .logo.current .logo-text { color: #e3cd4e; opacity: 1 !important; }
