/* niXomen — stile di index.html (ramo stay-tuned), stesso mondo di DESIGN.md "Il Manifesto". */
@font-face { font-family: "League Spartan"; src: url("/static/fonts/LeagueSpartan.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --paper: #ffffff; --ink: #111111; --ink-soft: #3a3a3d; --muted: #66666b;
  --red: #ff4a2e; --blue: #2b3bff; --sun: #ffc21a; --green: #00b67a; --pink: #ff5fa8;
  --display: "League Spartan", "Futura", "Avenir Next", -apple-system, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light; accent-color: var(--blue); caret-color: var(--red);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--sun); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 560px) { .wrap { padding: 0 18px; } }

header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
header img { width: 150px; }
.lang { font: 700 0.88rem var(--display); padding: 6px 12px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; }

main { flex: 1; display: flex; align-items: center; padding: clamp(24px, 5vw, 56px) 0 clamp(48px, 7vw, 96px); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
h1 { font: 800 clamp(3.4rem, 9vw, 6rem)/0.9 var(--display); letter-spacing: -0.04em; margin: 0 0 0.35em; text-wrap: balance; }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; color: var(--ink-soft); max-width: 30em; margin: 0; text-wrap: pretty; }
.lead strong { color: var(--ink); background: var(--sun); padding: 0 0.12em; border-radius: 4px; }
.apps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 1.4em 0 0; padding: 0; font: 800 1.15rem var(--display); }
.apps li { display: flex; align-items: center; gap: 9px; }
.apps li::before { content: ""; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--dot); }

/* etichetta con la descrizione rapida dell'app: mouse, tastiera (focus) e tocco */
.tip { position: relative; }
button.tip { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; }
.tip-label {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; white-space: nowrap; pointer-events: none;
  padding: 7px 11px; border-radius: 9px; background: var(--ink); color: var(--paper); font: 700 0.86rem/1.1 var(--display);
  opacity: 0; transform: translateX(-50%) translateY(3px) scale(0.97); transform-origin: 50% 100%;
  transition: opacity 150ms ease-out, transform 150ms var(--ease-out);
}
.tip-label::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.tip.is-open .tip-label { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.tips-instant .tip-label { transition-duration: 0ms; }
.planet .tip-label { bottom: calc(100% + 6px); }
/* vicino ai bordi l'etichetta si allinea al lato dell'icona invece di uscire dallo schermo */
.tip-start .tip-label { left: 0; transform: translateY(3px) scale(0.97); transform-origin: 0 100%; }
.tip-start.is-open .tip-label { transform: none; }
.tip-start .tip-label::after { left: 22px; }
.tip-end .tip-label { left: auto; right: 0; transform: translateY(3px) scale(0.97); transform-origin: 100% 100%; }
.tip-end.is-open .tip-label { transform: none; }
.tip-end .tip-label::after { left: auto; right: 16px; }
@media (prefers-reduced-motion: reduce) { .tip-label { transition: opacity 150ms ease-out; transform: translateX(-50%); } .tip.is-open .tip-label { transform: translateX(-50%); } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 2em; }
.button { display: inline-block; padding: 14px 24px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 1.05rem/1 var(--display); text-decoration: none; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.button:active { transform: scale(0.97); }
.mail { font: 700 1.05rem var(--display); }

/* manifesto: forme piatte, la tendina si trascina */
.poster { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; justify-self: end; }
@media (max-width: 900px) { .poster { justify-self: center; max-width: 500px; } }
.fig { position: absolute; animation: rise 800ms var(--ease-out) backwards; }
@keyframes rise { from { transform: translateY(22px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .fig { animation: none; } .button { transition: none; } }
.orbit { right: 4%; top: 2%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); }
.planet { position: absolute; width: 19%; transform: translate(-50%, -50%); }
.planet img { width: 100%; }
.wipe { left: 0; top: 40%; width: 64%; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; animation-delay: 80ms; --pos: 50%; }
.wipe span { position: absolute; inset: 0; }
.wipe .b { background: var(--blue); }
.wipe .a { background: var(--red); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.wipe .h { left: var(--pos); right: auto; width: 6px; margin-left: -3px; background: var(--ink); pointer-events: none; }
.wipe .h::after { content: ""; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 6px var(--ink); }
.wipe input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.wipe:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 4px; }
.bar { right: 0; bottom: 6%; width: 52%; animation-delay: 160ms; }
.bubble { position: relative; display: flex; justify-content: space-around; gap: 6%; padding: 9% 7%; border-radius: 22px; background: var(--green); }
.bubble i { flex: 1; padding-top: 6%; border-radius: 99px; background: var(--paper); }
.bubble::after { content: ""; position: absolute; left: 16%; bottom: -15px; border: 13px solid transparent; border-top: 16px solid var(--green); border-bottom: 0; }
/* Stereo: cubo mezzo pieno e mezzo a fili, la linea si trascina come la tendina */
.cube { left: 2%; top: 4%; width: 25%; aspect-ratio: 100 / 112; touch-action: pan-y; user-select: none; -webkit-user-select: none; animation-delay: 240ms; --pos: 50%; }
.cube svg, .cube .solid { position: absolute; inset: 0; width: 100%; height: 100%; }
.cube .wire path { fill: none; stroke: var(--blue); stroke-width: 2.5px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cube .solid { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cube .top { fill: var(--pink); } .cube .left { fill: var(--red); } .cube .right { fill: var(--blue); }
.cube .h { position: absolute; top: -3%; bottom: -3%; left: var(--pos); width: 4px; margin-left: -2px; border-radius: 2px; background: var(--ink); pointer-events: none; }
.cube input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cube:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 4px; }
.sel { display: block; width: 78%; padding-top: 7%; margin: 34px 0 0 8%; border-radius: 6px; background: var(--pink); }

footer { padding: 0 0 26px; font-size: 0.88rem; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); height: 18px; margin-bottom: 22px; }
.swatches span:nth-child(1) { background: var(--red); } .swatches span:nth-child(2) { background: var(--sun); }
.swatches span:nth-child(3) { background: var(--green); } .swatches span:nth-child(4) { background: var(--blue); }
.swatches span:nth-child(5) { background: var(--pink); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; }

@media (hover: hover) and (pointer: fine) {
  .button:hover, .lang:hover { background: var(--blue); }
  a:hover { text-decoration-thickness: 3px; }
  footer nav a:hover { text-decoration: underline; }
}
