/* «La oficina viva» · sistema visual (20-nov-2026, dirección A elegida por Reinier).
   Va DESPUÉS de app.css y solo cambia el aspecto: ningún texto, ninguna página.
   Ficha: docs/superpowers/specs/2026-11-20-oficina-viva-design.md
   - Noche casi negra con un punto de verde (la marca), retícula fina y grano.
   - Menta eléctrica = luz y datos. Coral = solo la acción principal.
   - Superficies de cristal oscuro con filo de luz; blur solo en lo fijo (cabecera).
   - Movimiento con curva de muelle; al bajar, `animation-timeline: view()` donde exista.
   Contraste medido (WCAG): tinta/noche 16,9 · tinta-2/noche 8,1 · menta/noche 13,4 · coral/noche 7,2. */

:root, :root:not(.x) {
  --bg: #05090a;
  --surface: #0a1311;
  --surface-2: #0f1c19;
  --ink: #eaf4ef;
  --ink-2: #9db2a9;
  --line: #1b2c27;
  --brand: #6ff2bd;
  --brand-deep: #030b09;
  --brand-tint: #0e2620;
  --accent: #ff6a4d;
  --accent-ink: #0d1b16;
  --accent-deep: #ff8f78;
  --mint: #7cffc4;
  --warn-bg: #24150f;
  --warn-line: #5b3222;
  --warn-ink: #ffc4ad;
  --ok-bg: #0d241b;
  --danger: #ff8a80;
  --shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 30px 60px -32px rgb(0 0 0 / .9);
  --of-filo: rgb(255 255 255 / .075);
  --of-filo-luce: rgb(255 255 255 / .14);
  --of-vetro: linear-gradient(180deg, rgb(255 255 255 / .045), rgb(255 255 255 / .012));
  --of-molla: cubic-bezier(.32, .72, 0, 1);
  --of-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --head-h: 64px;
  color-scheme: dark;
}

/* ---------- Fondo: noche, retícula y grano (fijos, nunca repintan al bajar) ---------- */
html { background: var(--bg); scroll-padding-top: calc(var(--head-h) + 28px); }
/* 22-nov: el destello que cruza los botones salía por la derecha y la página se podía arrastrar de
   lado en el teléfono (/pro/ufficio, 413 px en una pantalla de 390). «clip» no crea un contenedor
   de scroll: la cabecera pegajosa sigue funcionando. */
html, body { overflow-x: clip; }
body { background: transparent; color: var(--ink); isolation: isolate; }
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(60rem 40rem at 82% -8%, rgb(111 242 189 / .11), transparent 62%),
    radial-gradient(48rem 36rem at -10% 18%, rgb(30 120 92 / .14), transparent 60%),
    linear-gradient(rgb(255 255 255 / .028) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgb(255 255 255 / .028) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--bg);
  -webkit-mask-image: linear-gradient(#000, #000 70%, rgb(0 0 0 / .55));
          mask-image: linear-gradient(#000, #000 70%, rgb(0 0 0 / .55));
}
body::after {
  opacity: .045;
  background: url("img/grano.png") 0 0 / 64px 64px;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { color: #f4fbf7; }
h1 { font-weight: 650; letter-spacing: -.048em; line-height: 1.0; }
h2 { font-weight: 650; letter-spacing: -.038em; }
a { color: var(--brand); }
::selection { background: var(--mint); color: #03100c; }
:focus-visible { outline-color: var(--mint); }
.occhiello {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  font: 500 .6875rem/1.2 var(--of-mono); letter-spacing: .18em; color: var(--mint);
  background: rgb(124 255 196 / .06); box-shadow: inset 0 0 0 1px rgb(124 255 196 / .18);
}
.occhiello::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.mono { font-family: var(--of-mono); }
.guida, .nota, .aiuto { color: var(--ink-2); }

/* ---------- Cabecera: isla de cristal que flota ---------- */
.testata {
  top: 12px; margin: 12px auto 0;
  width: min(100% - 24px, var(--wrap));
  height: var(--head-h);
  padding: 0 10px 0 22px;
  border: 0; border-radius: 999px;
  background: rgb(7 14 12 / .78);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
          backdrop-filter: saturate(150%) blur(10px);
  box-shadow: inset 0 0 0 1px var(--of-filo), inset 0 1px 0 var(--of-filo-luce), 0 24px 60px -30px rgb(0 0 0 / .9);
}
@media (max-width: 900px) {
  .testata { background: rgb(7 14 12 / .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::after { display: none; }
}
@supports not (backdrop-filter: blur(1px)) { .testata { background: rgb(7 14 12 / .96); } }
/* 22-nov: velo de noche detrás de la isla (templates/base.html). Sin él, el texto que pasa por
   debajo asomaba por encima y a los lados de la cabecera al bajar en el teléfono. */
/* 22-nov: en las páginas que cambian la cabecera (sin la navegación de escritorio) el menú se ve
   también en el ordenador, a la derecha, después del enlace de la página. */
.testata:not(:has(> .nav)) .menu-mobile { display: block; }
.testata:not(:has(> .nav)) > .testata-link { margin-left: auto; }
.testata:not(:has(> .nav)) { gap: 12px; }
@media (max-width: 420px) { .testata-link { font-size: .875rem; } }
.testata-velo { position: fixed; z-index: 39; top: 0; left: 0; right: 0; height: calc(var(--head-h) + 22px); pointer-events: none;
  background: linear-gradient(var(--bg) 72%, rgb(5 9 10 / 0)); }
.marchio { color: #f4fbf7; }
.nav { gap: 6px; }
.nav a:not(.bottone) { padding: 8px 14px; border-radius: 999px; color: #c9d8d1; font-size: .9375rem; transition: transform .35s var(--of-molla), opacity .25s var(--of-molla); }
.nav a:not(.bottone):hover { color: #fff; background: rgb(255 255 255 / .06); }
.nav .bottone { min-height: 44px; margin-left: 8px; }
.testata-link { color: #c9d8d1; }
.testata-imprese { color: var(--mint); }
.menu-mobile > summary { border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--of-filo); color: #f4fbf7; }
.menu-mobile[open] > summary { background: rgb(255 255 255 / .08); }
.menu-mobile nav {
  top: calc(var(--head-h) + 10px); right: 0;
  background: rgb(8 15 13 / .94); border: 0; border-radius: 24px; padding: 12px;
  box-shadow: inset 0 0 0 1px var(--of-filo), inset 0 1px 0 var(--of-filo-luce), 0 40px 80px -30px rgb(0 0 0 / .95);
}
.menu-mobile nav a { color: #e3eee9; }
.menu-mobile nav a:hover { background: rgb(255 255 255 / .06); }
@media (prefers-reduced-motion: no-preference) {
  .menu-mobile[open] nav a { animation: of-sube .55s var(--of-molla) both; }
  .menu-mobile[open] nav a:nth-child(2) { animation-delay: .03s; } .menu-mobile[open] nav a:nth-child(3) { animation-delay: .06s; }
  .menu-mobile[open] nav a:nth-child(4) { animation-delay: .09s; } .menu-mobile[open] nav a:nth-child(5) { animation-delay: .12s; }
  .menu-mobile[open] nav a:nth-child(6) { animation-delay: .15s; } .menu-mobile[open] nav a:nth-child(7) { animation-delay: .18s; }
  .menu-mobile[open] nav a:nth-child(8) { animation-delay: .21s; }
}
.anteprima { background: #0c1f19; color: var(--mint); font-family: var(--of-mono); letter-spacing: .04em; }

/* ---------- Botones: píldora con filo de luz y empuje físico ---------- */
.bottone {
  border: 0;
  background: linear-gradient(180deg, #ff7d63, var(--accent));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -1px 0 rgb(0 0 0 / .12), 0 14px 34px -14px rgb(255 106 77 / .75);
  transition: transform .35s var(--of-molla), opacity .25s var(--of-molla);
}
.bottone:hover { background: linear-gradient(180deg, #ff8d75, #ff7356); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 18px 44px -14px rgb(255 106 77 / .9); }
.bottone:active { transform: scale(.975); }
.bottone-secondario, .bottone-pericolo { background: rgb(255 255 255 / .03); box-shadow: inset 0 0 0 1px var(--of-filo-luce); }
.bottone-secondario { color: var(--mint); }
.bottone-secondario:hover { background: rgb(124 255 196 / .08); box-shadow: inset 0 0 0 1px rgb(124 255 196 / .35); }
.text-button { color: var(--brand); }

/* ---------- Formularios: campos de cristal ---------- */
label { color: #e6f1ec; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=file], textarea, select {
  background: rgb(255 255 255 / .03); color: var(--ink);
  border: 1px solid var(--of-filo-luce);
  transition: transform .35s var(--of-molla), opacity .25s var(--of-molla);
}
input:hover, textarea:hover, select:hover { border-color: rgb(255 255 255 / .22); }
input:focus, textarea:focus, select:focus { background: rgb(124 255 196 / .035); border-color: var(--mint); box-shadow: 0 0 0 4px rgb(124 255 196 / .14), 0 0 24px -4px rgb(124 255 196 / .35); }
input::placeholder, textarea::placeholder { color: #7f948b; }
select option { background: #0a1311; color: var(--ink); }
.scelta { background: rgb(255 255 255 / .025); border: 1px solid var(--of-filo-luce); border-radius: 18px; transition: transform .35s var(--of-molla), opacity .25s var(--of-molla); }
.scelta:hover { border-color: rgb(124 255 196 / .4); }
.scelta:has(input:checked) { border-color: var(--mint); background: rgb(124 255 196 / .07); box-shadow: 0 0 30px -12px rgb(124 255 196 / .45); }
.scelta input { accent-color: var(--mint); }

/* ---------- Superficies: placa de cristal en bandeja (doble filo) ---------- */
.modulo, .scheda {
  background: var(--of-vetro), var(--surface);
  border: 0; border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--of-filo), inset 0 1px 0 var(--of-filo-luce), 0 0 0 6px rgb(255 255 255 / .018), 0 40px 80px -40px rgb(0 0 0 / .9);
}
.scheda-verde { background: linear-gradient(180deg, rgb(124 255 196 / .07), rgb(124 255 196 / .02)), var(--surface); }
.scheda-ambra { background: linear-gradient(180deg, rgb(255 140 100 / .08), rgb(255 140 100 / .02)), var(--surface); }
.errore { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }

/* ---------- Pie ---------- */
.pie {
  position: relative; background: linear-gradient(180deg, transparent, rgb(2 7 6 / .9) 120px), transparent;
  color: #a9bdb4; border-top: 1px solid var(--of-filo);
}
.pie::before { content: ""; position: absolute; left: 50%; top: -1px; width: min(60%, 620px); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--mint), transparent); opacity: .55; }
.pie a { color: #e9f4ef; }
.pie-griglia :is(h2, h3) { font: 500 .6875rem/1.2 var(--of-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mint); }
.pie-motto { color: #a9bdb4; }

@keyframes of-sube { from { opacity: .45; transform: translateY(10px); } }

/* ---------- Asistente del sitio (assistente.css usa el verde de marca sobre blanco) ---------- */
body .ass-bolla, body .ass-modulo button, body .ass-msg.utente { background: var(--mint); color: #03100c; }
body .ass-bolla * { color: #03100c; }
body .ass-bolla { box-shadow: 0 0 0 1px rgb(255 255 255 / .2) inset, 0 18px 40px -16px rgb(124 255 196 / .7); }
body .ass-rapida { background: rgb(255 255 255 / .04); color: var(--mint); border-color: rgb(124 255 196 / .4); }
body .ass-rapida:hover { background: rgb(124 255 196 / .1); }
body .ass-titolo small, body .ass-piede, body .ass-msg.nota { color: var(--ink-2); }
body .ass-piede a { color: var(--mint); }
body .ass-msg.assistente { background: rgb(124 255 196 / .08); color: var(--ink); }


/* Orden 028. Una entrada finita por objeto; lectura siempre visible. */
.of-luce {
  position: fixed; left: 0; top: 0; width: min(480px, 100vw); height: 480px;
  z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgb(124 255 196 / .055), transparent 70%);
}
.of-inclina { position: relative; }
.of-riflesso {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: linear-gradient(125deg, rgb(124 255 196 / .055), transparent 65%);
  opacity: 0; transition: opacity .3s var(--of-molla);
}
.of-inclinata > .of-riflesso { opacity: 1; }
.of-arrivo:focus-within { animation: none !important; }
:is(form, .modulo, .scheda:has(form), [role=alert], [role=status]),
:is(form, .modulo) :is(h2, .bottone, .of-inclina, .scheda) {
  animation: none !important; transform: none !important; translate: none !important;
}
:is(form, .modulo) h2 { background: none !important; -webkit-text-fill-color: currentColor !important; }
:is(form, .modulo) .bottone::before, :is(form, .modulo) .bottone::after { display: none !important; }
:is(form, .modulo) .of-riflesso { display: none; }
.of-arrivo-luce { position: relative; }
.contenuto h2.of-arrivo-luce::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 20%; max-width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent); opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .of-entrato { animation: of027-capitolo .65s var(--of-molla) var(--of-ritardo, 0ms) backwards; }
  .of-arrivo-schermo.of-entrato { animation-name: of027-schermo; animation-duration: .8s; transform-origin: center 70%; }
  .of-ufficio .of-ufficio-vista.of-entrato { animation-name: of027-telefono; }
  .of-arrivo-onda.of-entrato { animation-name: of027-onda; animation-duration: .75s; }
  .of-arrivo-risposta.of-entrato { animation-name: of027-risposta; }
  .of-arrivo-pannello.of-entrato { animation-name: of027-pannello; transform-origin: center bottom; }
  .of-arrivo-documento.of-entrato { animation-name: of027-documento; transform-origin: center top; }
  .of-arrivo-bento.of-entrato { animation-name: of028-bento; transform-origin: center bottom; }
  .of-arrivo-prezzo.of-entrato, .of-arrivo-luce.of-entrato { animation: none; }
  .contenuto h2.of-entrato::after { animation: of028-luce .7s var(--of-molla) both; }
  .hp-bottone { position: relative; }
  .hp-bottone::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit; background: rgb(255 255 255 / .12); }
  .hp-bottone:hover::after { opacity: 1; transition: opacity .25s var(--of-molla); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:is(.hp, .of-movimento) .of-inclina.of-inclina,
  body:is(.hp, .of-movimento) .of-inclina.of-inclina:hover {
    transform: perspective(1100px) rotateX(var(--of-rx, 0deg)) rotateY(var(--of-ry, 0deg));
    transition: transform .45s var(--of-molla);
  }
}
@keyframes of028-bento { from { transform: perspective(1400px) translateY(26px) rotateX(9deg) scale(.98); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes of028-luce { from { transform: scaleX(.2); opacity: 0; } 35% { opacity: .8; } to { transform: scaleX(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .of-inclina, .of-inclina:hover { transform: none !important; }
  .of-luce, .of-riflesso { display: none; }
}
@media (forced-colors: active) { .of-luce, .of-riflesso { display: none; } }

@keyframes of027-schermo {
  from { transform: perspective(1200px) translateY(32px) rotateX(12deg) rotateY(-8deg) scale(.96); opacity: .35; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-telefono {
  from { transform: perspective(1200px) translateY(32px) rotateY(-26deg) rotateX(12deg) rotateZ(3deg); opacity: .35; }
  to { transform: perspective(1200px) rotateY(-14deg) rotateX(4deg) rotateZ(3deg); opacity: 1; }
}
@keyframes of027-capitolo {
  from { transform: translateY(20px); opacity: .45; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-onda {
  from { transform: perspective(1000px) translateY(38px) rotateX(9deg); opacity: .4; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-risposta {
  from { transform: translateX(18px); opacity: .45; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-pannello {
  from { transform: perspective(1000px) rotateX(6deg) translateY(16px); opacity: .45; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-documento {
  from { transform: translateY(12px) scaleY(.96); opacity: .45; }
  to { transform: none; opacity: 1; }
}
@keyframes of027-accende {
  from { transform: scaleX(.3); opacity: 0; }
  40% { opacity: 1; }
  to { transform: scaleX(1); opacity: 0; }
}
@keyframes of027-collega {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: .45; }
}
