/* ACCDB Studio — sito di supporto. Capitoli a colore pieno con i colori dell'icona.
   Font ospitato qui (licenza SIL OFL, vedi fonts/). */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* colori dell'icona */
  --indigo: #4048c0;      /* campo d'apertura, titolo dell'assistenza */
  --indigo-deep: #343a9e; /* la lente */
  --amber: #f5a623;       /* la lente, l'azione */
  --night: #1b1d3a;       /* inchiostro e capitoli scuri */
  --night-step: #26294d;
  --paper: #f7f7fb;
  --paper-step: #e9eaf4;
  --white: #ffffff;

  --ink: var(--night);
  --ground: var(--paper);
  --ground-step: var(--paper-step);

  /* cinque misure */
  --s-display: clamp(44px, 6.6vw, 104px);
  --s-head: clamp(24px, 2.4vw, 34px);
  --s-lead: 20px;
  --s-body: 18px;
  --s-small: 15px;

  --margin: 32px;
  --gutter: 24px;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14152b;
    --paper-step: #1e2040;
    --ink: #ecedf8;
    --night: #0d0e20;
    --night-step: #191b38;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--s-body)/1.55 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-thickness: 0.12em; } }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  padding-inline: var(--margin);
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--amber); color: #1b1d3a; z-index: 10; }
.skip:focus { top: 12px; }

/* pulsante: pillola piena, come la lente tagliata */
.button {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--amber); color: #1b1d3a; font-weight: 700; font-size: var(--s-body); text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button-dark { background: #1b1d3a; color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #fff; }
  .button-dark:hover { background: var(--indigo); }
}

/* ---------- 1. apertura ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 100svh;
  background: var(--indigo); color: #fff;
  display: flex; flex-direction: column;
}
.lens {
  position: absolute; width: 120vh; aspect-ratio: 1; left: 86%; top: 55%;
  translate: -50% -50%; border-radius: 50%;
  border: 15vh solid var(--amber); background: var(--indigo-deep);
}
.bar {
  position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--margin);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: var(--s-lead); letter-spacing: -0.01em; }
.bar-links { display: flex; gap: 28px; }
.bar-links a { color: #fff; text-decoration: none; font-weight: 600; font-size: var(--s-body); }
@media (hover: hover) and (pointer: fine) { .bar-links a:hover { text-decoration: underline; } }

.hero-text {
  position: relative; z-index: 1; margin: auto 0; padding: 0 var(--margin) 8vh calc(8vw);
  max-width: 50vw;
}
.hero h1 { font-size: var(--s-display); line-height: 0.98; font-weight: 800; letter-spacing: -0.035em; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }
.hero-lede { margin-top: 32px; max-width: 27em; font-size: var(--s-lead); line-height: 1.5; }
.hero-act { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; font-size: var(--s-small); line-height: 1.45; }

/* ---------- 2. ricerca ---------- */
.search { background: var(--night); color: #fff; min-height: 92svh; padding: 120px 0 96px; }
.search .grid { row-gap: 0; }
.search-intro { grid-column: 1 / span 6; font-size: var(--s-lead); max-width: 34em; }
.query { grid-column: 1 / -1; position: relative; display: flex; align-items: center; margin-top: 56px; cursor: text; }
.query input {
  width: 100%; min-width: 0; border: 0; outline: 0; padding: 0; margin: 0; background: transparent; color: #fff;
  font: 800 var(--s-display)/1.05 var(--sans); letter-spacing: -0.04em; caret-color: transparent;
  -webkit-appearance: none; appearance: none;
}
.query input::-webkit-search-cancel-button { display: none; }
.query:focus-within { outline: 3px solid var(--amber); outline-offset: 8px; }
.caret { position: absolute; top: 12%; bottom: 12%; width: 0.1em; font-size: var(--s-display); background: var(--amber); left: var(--caret-x, 0); }
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

/* risposta: un frammento dell'app, a misura vera */
.answer {
  grid-column: 1 / span 6; margin-top: 48px; max-width: 600px;
  background: #fff; color: #1b1d3a; border-radius: 10px; padding: 14px; font-size: var(--s-small);
}
.answer-head { padding: 4px 8px 12px; font-weight: 700; }
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hits li {
  display: grid; grid-template-columns: 3em 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 6px; background: #f1f2f8;
}
.hits li:first-child { background: #dfe1f8; }
.hit-n { color: #5b5f7c; font-variant-numeric: tabular-nums; text-align: right; }
.hit-v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-f { color: #5b5f7c; font-size: var(--s-small); }
.hits mark { background: var(--amber); color: #1b1d3a; border-radius: 3px; padding: 0 2px; }
.hits .none { grid-template-columns: 1fr; color: #5b5f7c; }
.examples { grid-column: 1 / -1; margin-top: 56px; display: flex; gap: 12px; flex-wrap: wrap; }
.examples button {
  border: 0; background: var(--night-step); color: #fff; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: var(--s-body); font-weight: 600; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.examples button:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .examples button:hover { background: var(--indigo); } }

/* ---------- 3. funzioni ---------- */
.features { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--ground); }
.stage {
  position: sticky; top: 0; height: 100svh; background: var(--indigo);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.shot-frame { position: relative; width: 100%; max-width: 900px; aspect-ratio: 5 / 3; border-radius: 10px; overflow: hidden; background: #fff; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity 420ms ease; }
.shot.is-on { opacity: 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.reading { padding: 120px var(--margin) 160px 7%; max-width: calc(44ch + 8% + var(--margin)); }
.inline-shot { display: none; }
.reading h2 { font-size: var(--s-head); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.block { min-height: 50svh; padding-top: 12svh; }
.block:first-of-type { padding-top: 10svh; }
.block h3 { font-size: var(--s-head); line-height: 1.12; letter-spacing: -0.02em; font-weight: 750; }
.block p { margin-top: 16px; max-width: 44ch; }
.show { margin-top: 24px !important; }
.show button, .seg button {
  border: 0; cursor: pointer; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--ground-step); font-weight: 700; font-size: var(--s-small);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.show button:active, .seg button:active { transform: scale(0.96); }
.block.is-current .show button { background: var(--indigo); color: #fff; }
@media (hover: hover) and (pointer: fine) { .show button:hover, .seg button:hover { background: var(--amber); color: #1b1d3a; } }
.seg { display: inline-flex; gap: 4px; margin-top: 24px; padding: 4px; border-radius: 999px; background: var(--ground-step); }
.seg button { background: transparent; }
.seg button[aria-checked="true"] { background: var(--indigo); color: #fff; }

/* ---------- 4. file supportati ---------- */
.files { background: var(--amber); color: #1b1d3a; padding: 140px 0 160px; min-height: 90svh; }
.files-head { align-items: end; }
.files h2 { grid-column: 1 / span 8; font-size: var(--s-display); line-height: 0.98; letter-spacing: -0.04em; font-weight: 800; }
.files h2 .soft { color: #6d4a0e; }
.check { grid-column: 9 / -1; justify-self: end; text-align: right; }
.check p { margin-top: 12px; font-size: var(--s-small); max-width: 22em; }
.verdict {
  margin: 48px var(--margin) 0; padding: 24px 28px; border-radius: 10px;
  background: #1b1d3a; color: #fff; font-size: var(--s-lead); display: block;
}
.verdict b { color: var(--amber); }
.agenda { margin-top: 64px; }
.types { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 6px; }
.types button {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-height: 72px; padding: 0 20px; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  background: #f8c766; color: #1b1d3a;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.types button:active { transform: scale(0.98); }
.types b { font-size: var(--s-lead); }
.types span { font-size: var(--s-small); }
.types button[aria-selected="true"] { background: #1b1d3a; color: #fff; }
@media (hover: hover) and (pointer: fine) { .types button[aria-selected="false"]:hover { background: #fbd88f; } }
.bands { grid-column: 4 / -1; }
.bands ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bands li {
  display: grid; grid-template-columns: 7em 1fr auto; align-items: center; gap: 24px;
  min-height: 84px; padding: 14px 24px; border-radius: 8px; background: #fbd88f;
}
.bands li:nth-child(even) { background: #f9cd75; }
.bands li.is-match { background: #1b1d3a; color: #fff; }
.yr { font-size: var(--s-lead); font-weight: 800; font-variant-numeric: tabular-nums; }
.what { font-weight: 650; display: flex; flex-direction: column; }
.what small { font-size: var(--s-small); font-weight: 400; }
.ok { font-size: var(--s-small); font-weight: 600; text-align: right; }

/* ---------- 5. assistenza ---------- */
.support { padding-block: 140px 120px; background: var(--ground); row-gap: 32px; }
.support h2 { grid-column: 1 / span 4; font-size: var(--s-head); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.faq { grid-column: 5 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px var(--gutter); }
.qa h3 { font-size: var(--s-lead); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.qa p { margin-top: 8px; max-width: 34em; }

/* ---------- 6. contatti ---------- */
.contact { background: var(--night); color: #fff; padding-block: 56px; row-gap: 20px; align-items: start; }
.contact-lead { grid-column: 1 / span 5; font-size: var(--s-lead); line-height: 1.4; font-weight: 700; }
.contact-lead a { overflow-wrap: anywhere; }
.contact-note { grid-column: 7 / -1; font-size: var(--s-small); line-height: 1.5; }
.contact-note p { max-width: 40em; }
.contact-note .button { margin-top: 16px; min-height: 40px; padding: 0 18px; font-size: var(--s-small); background: var(--night-step); color: #fff; }
@media (hover: hover) and (pointer: fine) { .contact-note .button:hover { background: var(--indigo); } }

/* ---------- 7. chiusura ---------- */
.foot { background: var(--ground); padding-block: 64px 48px; row-gap: 32px; font-size: var(--s-small); line-height: 1.5; }
.foot a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { text-decoration: underline; } }
.foot-brand { grid-column: 1 / span 4; }
.foot-name { display: inline-flex; align-items: center; gap: 10px; font-size: var(--s-lead); font-weight: 800; letter-spacing: -0.01em; }
.foot-brand p { margin-top: 8px; }
.foot-nav { grid-column: 6 / span 3; display: flex; flex-direction: column; gap: 4px; }
.foot-meta { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 4px; }
.foot-meta a { overflow-wrap: anywhere; font-weight: 600; }
.fine { grid-column: 1 / -1; font-size: var(--s-small); line-height: 1.5; max-width: 60em; }

/* ---------- informativa ---------- */
.page-bar { background: var(--indigo); color: #fff; }
.page-bar .bar { padding-block: 20px; }
.prose { max-width: 760px; padding: 96px var(--margin) 120px; }
.prose h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1; font-weight: 800; letter-spacing: -0.04em; }
.prose .date { margin-top: 16px; }
.prose .short { margin-top: 48px; font-size: var(--s-head); line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
.prose h2 { font-size: var(--s-head); line-height: 1.15; letter-spacing: -0.02em; margin: 64px 0 12px; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; margin: 12px 0 0; }
.prose li { margin: 4px 0; }
.page-foot { background: var(--night); color: #fff; padding: 40px var(--margin); font-size: var(--s-small); }

/* ---------- movimento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(22px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
  .js .lens { animation: lens-in 1400ms var(--ease-out) both; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .shutter img { transform: scale(1.12); transition: transform 1500ms var(--ease-soft); }
  .js .is-in .shutter { clip-path: inset(0); }
  .js .is-in .shutter img { transform: none; }
  .bands ul:not([hidden]) li { animation: band-in 520ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 60ms); }
  .hits li { animation: band-in 360ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 50ms); }
  @supports (animation-timeline: scroll()) {
    .js .lens { animation: lens-in 1400ms var(--ease-out) both, lens-drift linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 100vh; }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes lens-in { from { transform: translateX(30vw) scale(0.9); } to { transform: none; } }
@keyframes lens-drift { to { scale: 1.18; } }
@keyframes band-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .stage { display: none; }
  .inline-shot { display: block; margin: 0 calc(-1 * var(--margin)) 28px; padding: 20px var(--margin); background: var(--indigo); }
  .inline-shot img { border-radius: 8px; aspect-ratio: 5 / 3; width: 100%; }
  .show { display: none; }
  .lens { width: 120vw; left: 50%; top: 58svh; translate: -50% 0; border-width: 15vw; }
  .hero-text { margin: 0; padding: 12svh var(--margin) 0; max-width: 46em; }
  .reading { padding: 72px var(--margin) 96px; max-width: none; }
  .block { min-height: 0; padding-top: 72px; }
  .block:first-of-type { padding-top: 40px; }
  .search-intro, .answer { grid-column: 1 / span 10; }
  .types { grid-column: 1 / -1; flex-direction: row; }
  .types button { flex: 1; }
  .bands { grid-column: 1 / -1; margin-top: 16px; }
  .files h2 { grid-column: 1 / -1; }
  .check { grid-column: 1 / -1; justify-self: start; text-align: left; margin-top: 32px; }
  .support h2, .faq, .contact-lead, .contact-note { grid-column: 1 / -1; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-nav { grid-column: 1 / span 6; }
  .foot-meta { grid-column: 7 / -1; }
}

/* ---------- telefono ---------- */
@media (max-width: 640px) {
  :root { --margin: 16px; --gutter: 12px; --s-lead: 18px; --s-body: 17px; --s-display: 12vw; --s-head: 22px; }
  .wide-only { display: none; }
  .bar-links { gap: 18px; }
  .brand span { display: none; }
  .lens { width: 130vw; left: 50%; top: 56svh; translate: -50% 0; border-width: 17vw; }
  .hero-text { margin: 0; padding: 9svh var(--margin) 0; max-width: none; }
  .hero h1 { font-size: 12vw; }
  .hero-lede { margin-top: 20px; font-size: 17px; max-width: 24em; }
  .hero-act { margin-top: 24px; position: relative; z-index: 1; }
  .hero-act span { display: none; }
  .hero { min-height: 100svh; }
  .search { padding: 80px 0 64px; min-height: 0; }
  .search-intro, .answer { grid-column: 1 / -1; }
  .query { margin-top: 32px; }
  .query input, .caret { font-size: 12vw; }
  .answer { margin-top: 28px; padding: 10px; }
  .hits li { grid-template-columns: 2.2em 1fr auto; padding: 10px; gap: 8px; }
  .examples { margin-top: 28px; }
  .examples button { flex: 1; }
  .files { padding: 88px 0 96px; }
  .files h2 { font-size: 9.2vw; }
  .types { position: sticky; top: 0; z-index: 1; background: var(--amber); padding-block: 8px; gap: 4px; }
  .types button { padding: 0 8px; min-height: 60px; }
  .types span { display: none; }
  .bands li { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px; }
  .bands .yr { grid-column: 1; }
  .bands .what { grid-column: 1 / -1; grid-row: 2; }
  .bands .ok { grid-column: 2; grid-row: 1; }
  .verdict { margin-inline: var(--margin); padding: 20px; font-size: 17px; }
  .support { padding-block: 88px 72px; }
  .faq { grid-template-columns: 1fr; gap: 32px; }
  .contact { padding-block: 48px; }
  .foot { padding-block: 48px 40px; }
  .foot-nav, .foot-meta { grid-column: 1 / -1; }
}
