/* Studiolo Interactive: brand tokens and fonts.
   Logo: Cinzel Black with a Cinzel Decorative S, INTERACTIVE in Cinzel Medium (outlined SVGs in logo/; 16 Nov).
   Headings: Archivo. Text: Work Sans.
   Theme "Metropolitana", chosen 14 Nov 2026. Fonts are bundled (SIL OFL), no outside service. */

@font-face { font-family: "Cinzel";    src: url("fonts/cinzel-latin-400-normal.woff2") format("woff2");    font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel";    src: url("fonts/cinzel-latin-900-normal.woff2") format("woff2");    font-weight: 900; font-style: normal; font-display: swap; }
/* Cinzel Decorative (16 Nov): only for the first letter of an app's name, and the logo's S */
@font-face { font-family: "Cinzel Decorative"; src: url("fonts/cinzel-decorative-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel";    src: url("fonts/cinzel-latin-500-normal.woff2") format("woff2");    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel";    src: url("fonts/cinzel-latin-600-normal.woff2") format("woff2");    font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo";   src: url("fonts/archivo-latin-500-normal.woff2") format("woff2");   font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo";   src: url("fonts/archivo-latin-600-normal.woff2") format("woff2");   font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo";   src: url("fonts/archivo-latin-700-normal.woff2") format("woff2");   font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Colours (contrast on --paper: ink 14.7:1, red 5.3:1, muted 5.1:1) */
  --paper: #F6F1E8;      /* warm off-white page */
  --paper-raised: #FAF7F1;
  --ink: #221E1B;        /* text and STUDIOLO */
  --muted: #6E645A;      /* secondary text */
  --line: #DCD4C8;       /* rules and borders */
  --red: #B23A2A;        /* INTERACTIVE, buttons, links */
  --red-ink: #FFFFFF;    /* text on red (5.9:1) */

  /* Type */
  --font-logo: "Cinzel", "Trajan Pro", Georgia, serif;   /* logo, app names (TELA): capitals only */
  --font-initial: "Cinzel Decorative", "Cinzel", Georgia, serif;   /* an app name's first letter (16 Nov) */
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --text-base: 1.0625rem;  /* 17px */
  --leading: 1.6;
  --h1: clamp(2.25rem, 4vw + 1rem, 3.75rem);
  --h2: clamp(1.75rem, 2.5vw + 0.75rem, 2.5rem);
  --h3: 1.375rem;
  --app-name-tracking: 0.08em;

  --radius: 14px;
  --radius-button: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Night (16 Nov): "the studiolo at night", warmer and deeper, like a room lit by candles (was #1C1917 / #26221F) */
    --paper: #16120F;
    --paper-raised: #201B17;
    --ink: #F2E6D0;        /* candle-lit cream, 14.9:1 on --paper-raised */
    --muted: #AB9C8A;      /* 6.4:1 */
    --line: #3B322B;
    --red: #E0654D;        /* 5.0:1 */
    --red-ink: #16120F;
  }
}

/* Each app's accent (15 Nov, 20:10: fall colours, replacing the light pastels). Earthy, autumn tones of one depth, so
   no card outweighs another: oxblood, sienna, old gold, olive, pine, slate blue, aubergine, plum. An element with
   data-app="…" gets:
     --accent         the card's fill
     --accent-deep    text and marks on that fill (a pale tint of the same hue, about 5:1)
     --accent-quiet   greyed text on the fill (3.6:1 or more; large text only)
     --accent-soft    a pale wash of the hue (the opened card)
     --accent-strong  the hue as text on that wash or on the paper (7:1 or more)
   sRGB for the native apps (light mode):
     app       colour      fill     on fill  strong
     Mostra    red carpet  #B5121B  #FFDFDD  #9E0F18   (16 Nov; was oxblood #944A49, strong #7A3334)
     Tela      deep oxblood #7A1C22 #FFDFDD  #7A1C22   (16 Nov: the "Lapidario" red, #4A1418, redder; was sienna #944D24, strong #7B3606)
     Lux       old gold    #7D5E07  #F3E7CE  #664700
     Bottega   olive       #64682E  #E8EBD0  #4E5116
     Gioco     pine        #35705D  #D2F0E4  #1B5947
     Mosaico   slate blue  #406981  #D2ECFC  #295269
     Ripresa   aubergine   #6C5984  #EDE2FB  #56436C
     Rubato    plum        #84506E  #FADFED  #6B3A57 */
[data-app="mostra"]  { --hue: 22;  --chroma: .10; }   [data-app="tela"]    { --hue: 20;  --chroma: .08; }
[data-app="lux"]     { --hue: 85;  --chroma: .10; }   [data-app="bottega"] { --hue: 112; --chroma: .08; }
[data-app="gioco"]   { --hue: 170; --chroma: .07; }   [data-app="mosaico"] { --hue: 235; --chroma: .06; }
[data-app="ripresa"] { --hue: 305; --chroma: .07; }   [data-app="rubato"]  { --hue: 345; --chroma: .08; }
[data-app] { --accent: oklch(.50 var(--chroma) var(--hue)); --accent-deep: oklch(.93 .035 var(--hue));
             --accent-quiet: oklch(.84 .04 var(--hue)); --accent-soft: oklch(.95 .02 var(--hue));
             --accent-strong: oklch(.42 var(--chroma) var(--hue)); }
/* Tela (16 Nov): a deep oxblood, #7A1C22 (the "Lapidario" #4A1418 with more red), in the light. At night it would vanish into the dark paper, so
   there the rule below gives it the same hue, lighter, as it does for every app. */
[data-app="tela"] { --accent: #7A1C22; --accent-strong: #7A1C22; }
@media (prefers-color-scheme: dark) {
  [data-app] { --accent: oklch(.42 calc(var(--chroma) * .85) var(--hue)); --accent-deep: oklch(.93 .035 var(--hue));
               --accent-quiet: oklch(.82 .04 var(--hue)); --accent-soft: oklch(.27 .025 var(--hue));
               --accent-strong: oklch(.80 var(--chroma) var(--hue)); }
  [data-app="tela"] { --accent: oklch(.42 .085 20); --accent-strong: oklch(.72 .1 20); }
}

/* A try (16 Nov): the colour wheel. The seven apps sit round Rubato like a clock face, so each takes the colour a
   colour wheel has where its card's centre sits: on the desktop (the honeycomb turned), hue = 29 (Mostra's red, at
   the right) + the card's angle round Rubato, counterclockwise, in 60-degree steps, even to the eye (OKLCH hues).
   Rubato, at the centre, is blue. On a phone (not turned) every card keeps its colour, and they still go round the
   wheel in order, the other way. All at one depth (chroma .11), so no card outweighs another; Rubato's a little more.
     Tela 59 orange · Mosaico 119 olive gold · Ripresa 179 teal · Lux 239 azure · Gioco 299 violet · Bottega 359 rose
     Rubato 269 blue (centre) · Mostra keeps its red carpet (below)
   Delete this block (down to "end of the try") for the fall colours and Tela's oxblood again. */
[data-app] { --chroma: .11; }
[data-app="tela"]    { --hue: 59; }    [data-app="mosaico"] { --hue: 119; }   [data-app="ripresa"] { --hue: 179; }
[data-app="lux"]     { --hue: 239; }   [data-app="gioco"]   { --hue: 299; }   [data-app="bottega"] { --hue: 359; }
[data-app="rubato"]  { --hue: 269; --chroma: .13; }
[data-app="tela"] { --accent: oklch(.50 var(--chroma) var(--hue)); --accent-strong: oklch(.42 var(--chroma) var(--hue)); }
@media (prefers-color-scheme: dark) {
  [data-app="tela"] { --accent: oklch(.42 calc(var(--chroma) * .85) var(--hue)); --accent-strong: oklch(.80 var(--chroma) var(--hue)); }
}
/* end of the try */

/* Mostra (16 Nov): red-carpet red, #B5121B, its own colour whatever the other apps wear (was oxblood #944A49) */
[data-app="mostra"] { --hue: 25; --chroma: .19; --accent: #B5121B; --accent-strong: #9E0F18; }
@media (prefers-color-scheme: dark) {
  [data-app="mostra"] { --accent: oklch(.50 .18 25); --accent-strong: oklch(.74 .15 25); }
}

/* Base */
html { background: var(--paper); color: var(--ink); }
body { font-family: var(--font-text); font-size: var(--text-base); line-height: var(--leading); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
a { color: var(--red); }

/* An app's name, set like the logo: TELA, MOSAICO … In Cinzel Black, its first letter in Cinzel Decorative (16 Nov),
   pressed into the paper like letterpress: a light edge below each letter, a faint dark one above. */
.app-name { font-family: var(--font-logo); font-weight: 900; letter-spacing: var(--app-name-tracking); text-transform: uppercase;
            text-shadow: 0 1px 0 rgb(255 255 255 / .7), 0 -1px 0 rgb(0 0 0 / .07); }
.app-name::first-letter { font-family: var(--font-initial); }
@media (prefers-color-scheme: dark) {
  .app-name { text-shadow: 0 -1px 0 rgb(0 0 0 / .55), 0 1px 0 rgb(255 255 255 / .05); }
}

/* The logo: desktop lockup, swapped for the mobile one on narrow screens */
.logo { display: inline-block; line-height: 0; }
.logo img { height: 2.75rem; width: auto; }
.logo .logo-mobile { display: none; }
@media (max-width: 640px) {
  .logo .logo-desktop { display: none; }
  .logo .logo-mobile { display: inline; height: 2.5rem; }
}

.button { display: inline-block; font-family: var(--font-text); font-weight: 500; background: var(--red); color: var(--red-ink);
          padding: 0.75em 1.5em; border-radius: var(--radius-button); text-decoration: none; }
