/* The brand «Notte» on the small pages of the site (pagina vera, fase 6a): privacy, grazie, the 404s and the pages the
   Worker writes itself. Loaded after e.css and e-pagine.css, on pages whose <html> carries data-tema="notte"; the home
   (casa.css) never loads it. Since phase 6 the deals page loads it too (after e.css, without e-pagine.css), followed by
   its own e-notte-offerte.css.
   1. E's custom properties take the home's values: the block below is the first block of casa.css (the brand's two
      colours and the neutrals of the night), plus Notte values for the names only E has. A test keeps the names both
      sheets share equal (test/pagine-e.test.mjs, «il marchio Notte sulle pagine piccole»): change the brand in casa.css and here together.
   2. The few rules E's components need on these pages, where e.css draws with a literal colour or uses a name that
      means something else in Notte (in E --barra is the bar's ground; in the home it is the white of the mark): the
      bar in the home's midnight with the home's mark, the still sky with the home's stars and no clouds, the one card as the
      home's lifted sign-up card, the reading column for the dark, the error bubble as the home's, the home's footer.
   Nothing here moves (no animation, no transition is added). */

[data-tema="notte"] {
  /* the two brand colours (casa.css) */
  --mezzanotte: #0A0F1F;
  --alba: #FFA63D; --alba-rgb: 255, 166, 61;
  --alba-chiara: #FFBE6B;
  --alba-scura: #F08F1F;
  /* neutrals of the night (casa.css) */
  --pagina: #0A0F1F; --carta: #141B32; --carta-2: #1C2542; --fondo: #060913;
  --inchiostro: #FFFFFF; --inchiostro-2: #A9B4CF;
  --barra: #FFFFFF; --barra-testo: #0A0F1F;
  --azione: #FFA63D; --azione-scura: #FFBE6B; --azione-vivo: #FFA63D; --azione-tenue: rgba(255, 166, 61, .14); --azione-testo: #0A0F1F;
  --risalto: #FFA63D; --risalto-testo: #0A0F1F;
  --cielo-1: #0A0F1F; --cielo-2: #0E1530; --cielo-3: #121B3A;
  --mare: #141B32; --terra: #26314F; --rotta: #FFA63D;
  --bordo: #222B49; --bordo-forte: #5A6894;
  --ombra-rgb: 0, 2, 10;
  --ombra-p: 0 0 0 1px rgba(255, 255, 255, .06), 0 6px 18px rgba(var(--ombra-rgb), .45);
  --ombra-su: 0 0 0 1px rgba(255, 255, 255, .07), 0 18px 40px rgba(var(--ombra-rgb), .6);
  --molla: cubic-bezier(.22, 1, .36, 1);
  --foglio: cubic-bezier(.32, .72, 0, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* the names only E has, in the night (none of them is a new colour: each is one of the home's) */
  --ombra-g: 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px rgba(var(--ombra-rgb), .5);
  --tinta-1: #1C2542; --tinta-2: #1C2542; --tinta-3: #141B32; --tinta-3-testo: #FFFFFF;
  --costa: #5A6894; --nuvola: #141B32;
  --banda-cielo: linear-gradient(160deg, #1A2346, #141B32 60%);
  /* the home's soft white for a long text: 12.2:1 on the reading column, softer than pure white */
  --lettura-testo: #D3DAEA;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- the still sky: the home's stars, no clouds */
[data-tema="notte"] .cielo {
  background:
    radial-gradient(1.2px 1.2px at 12% 9%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 31% 22%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1.4px 1.4px at 78% 6%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1px 1px at 91% 19%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1px 1px at 58% 13%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 34%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1px 1px at 94% 41%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(130% 60% at 50% 0%, #16204A 0%, transparent 70%),
    linear-gradient(180deg, var(--cielo-1) 0%, var(--cielo-2) 45%, var(--cielo-3) 72%, var(--pagina) 100%);
  background-size: 100% 1000px;
  background-repeat: no-repeat;
  background-color: var(--pagina);
}
[data-tema="notte"] .nuvola { display: none; }

/* ---------------------------------------------------------------- the bar: the home's midnight, the home's mark
   The bar is opaque midnight (--mezzanotte), as E's own bar is opaque. It was a glass first, 78% and then 94% midnight
   with a blur: wherever the blur is not drawn, words scrolling under it could be read through it (seen in Safari's
   engine and in Firefox as the tests run them; phase 6a's B2, phase 6's O1), and no rule can tell such an engine from
   one that draws the blur. Where the blur is drawn, the opaque bar cannot be told from that glass. No word shows. */
[data-tema="notte"] .barra {
  background: var(--mezzanotte); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 30px rgba(var(--ombra-rgb), .55);
}
[data-tema="notte"] .barra-marchio { color: #FFFFFF; }
[data-tema="notte"] .barra-logo { color: var(--alba); }
[data-tema="notte"] .pill--lingua { color: #FFFFFF; }
[data-tema="notte"] .barra .pill--azione { background: rgba(255, 255, 255, .08); color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
[data-tema="notte"] .barra .pill--azione:hover { background: rgba(255, 255, 255, .14); }
[data-tema="notte"] .barra :focus-visible { outline-color: var(--alba); }
/* the skip link as the home's: amber, midnight words */
[data-tema="notte"] .salta { background: var(--alba); color: var(--mezzanotte); font-weight: 800; }
[data-tema="notte"] .salta:focus-visible { outline-color: #FFFFFF; }

/* ---------------------------------------------------------------- the one card of a short page: the home's sign-up card */
[data-tema="notte"] .carta-pagina {
  background: radial-gradient(90% 70% at 100% 0%, rgba(var(--alba-rgb), .22) 0%, transparent 60%), linear-gradient(160deg, #1A2346, var(--carta) 60%);
  box-shadow: var(--ombra-su);
}
/* the card's sentences in the soft white of a long text: E's blue-grey measured 6.8:1 under the card's amber corner
   (root 404); the eyebrow stays the night's blue-grey */
[data-tema="notte"] .carta-pagina p { color: var(--lettura-testo); }
[data-tema="notte"] .carta-pagina .occhiello { color: var(--inchiostro-2); }
[data-tema="notte"] .carta-pagina .pill--azione {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 0 32px rgba(var(--alba-rgb), .4), 0 10px 24px rgba(var(--ombra-rgb), .5);
}
[data-tema="notte"] .carta-pagina .pill--azione:hover { background: var(--alba-chiara); }
/* the Worker's messages as the home's error bubble */
[data-tema="notte"] .carta-pagina .error-list li { background: #2A1F18; box-shadow: inset 4px 0 0 var(--alba), inset 0 0 0 1px rgba(var(--alba-rgb), .45); }
[data-tema="notte"] .carta-pagina .error-list[data-options] li { background: none; box-shadow: none; }
/* the six languages of the Worker's page and of the root 404: rows and pills one tone lighter than the card */
[data-tema="notte"] .carta-pagina > .lingue a { background: var(--carta-2); border-color: var(--bordo-forte); }
[data-tema="notte"] .carta-pagina > .lingue a:hover, [data-tema="notte"] .radice-lingue a:hover { border-color: var(--alba); }
[data-tema="notte"] .radice-lingue a { background: var(--carta-2); border: 1.5px solid var(--bordo); }

/* ---------------------------------------------------------------- the privacy notice: a long text in the dark */
[data-tema="notte"] .lettura { box-shadow: var(--ombra-su); color: var(--lettura-testo); }
[data-tema="notte"] .lettura h2, [data-tema="notte"] .lettura h3, [data-tema="notte"] .lettura strong { color: var(--inchiostro); }
[data-tema="notte"] .lettura a, [data-tema="notte"] .lettura a:visited { color: var(--alba); }
/* «In breve»: E's dashed frame becomes the home's quiet line (the home draws no dashed line; phase 6a's B1) */
[data-tema="notte"] .lettura-breve { background: var(--carta-2); border: 1px solid var(--bordo); }
[data-tema="notte"] .lettura-avviso { box-shadow: inset 4px 0 0 var(--alba); }
[data-tema="notte"] .lettura .lettura-indietro { color: var(--inchiostro); }
[data-tema="notte"] .lettura .lettura-indietro:hover { border-color: var(--alba); }
/* light text on a dark ground reads best in a shorter line: the column is narrowed from E's 42rem so that a line holds
   about 72 characters (measured at 1440 in it/de/fr: E's 42rem gave up to 87; 38rem up to 78; 36rem gives the numbers
   in the notes of pagine-notte) */
@media (min-width: 600px) { [data-tema="notte"] .lettura { max-width: 36rem; } }

/* ---------------------------------------------------------------- the home's footer: a deeper band, the languages in a
   line with dots, the current one in amber, white links */
[data-tema="notte"] .piede-sito {
  margin-top: 48px; padding: 28px 16px 40px; background: var(--fondo); color: var(--inchiostro-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); font-size: .875rem; text-align: left; justify-items: stretch; gap: 10px;
}
[data-tema="notte"] .piede-lingue ul { justify-content: flex-start; gap: 0; max-width: none; align-items: center; }
[data-tema="notte"] .piede-lingue li:not(:last-child)::after { content: "·"; margin: 0 .35em; }
[data-tema="notte"] .piede-lingue a,
[data-tema="notte"] .piede-lingue a:hover,
[data-tema="notte"] .piede-lingue a[aria-current] {
  min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none;
  color: #FFFFFF; font-size: inherit; font-weight: 450; text-decoration: none;
}
[data-tema="notte"] .piede-lingue a:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-tema="notte"] .piede-lingue a[aria-current] { color: var(--alba); font-weight: 750; }
[data-tema="notte"] .piede-lingue a[aria-current]::before { content: none; }
[data-tema="notte"] .piede-legale { max-width: none; gap: 6px; font-size: .875rem; color: var(--inchiostro-2); }
[data-tema="notte"] .piede-legale a, [data-tema="notte"] .piede-legale a:hover { color: #FFFFFF; }
/* a short page on a tall screen: the footer's band reaches the bottom (no strip of the page's midnight under it) */
[data-tema="notte"] body { display: flex; flex-direction: column; }
[data-tema="notte"] body > main { flex: 1 0 auto; }
@media (min-width: 900px) {
  [data-tema="notte"] .piede-sito { padding: 32px max(32px, calc(50vw - 600px)) 40px; }
}
