/*
 * FF Horizon Studio – sito principale (ffhorizon.studio)
 *
 * Colori presi dal logo registrato: nero, rame, argento.
 * Titoli in Montserrat (geometrico, vicino alla scritta HORIZON del logo),
 * testo in Atkinson Hyperlegible Next (come le pagine delle app).
 * Tutti i caratteri sono nel sito: nessuna richiesta a servizi esterni.
 */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/AtkinsonHyperlegibleNext_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('../fonts/AtkinsonHyperlegibleNext_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Sfondi */
  --bg: #0a0a0b;
  --bg-band: #0f0f11;
  --surface: #141417;
  --line: #2a2a30;

  /* Testo */
  --text: #f3f3f4;
  --text-muted: #a8a8b0;

  /* Rame e argento del logo */
  --copper: #c98a62;
  --copper-light: #ebb894;
  --copper-dark: #8c4a2f;
  --copper-line: rgba(201, 138, 98, 0.35);
  --silver: #d6d6db;

  --grad-copper: linear-gradient(115deg, #b8774f 0%, #dba27a 30%, #f3cfb0 50%, #d0926a 72%, #b8774f 100%);
  --grad-copper-text: linear-gradient(100deg, #c98a62 0%, #f3cfb0 45%, #d39a72 70%, #b5764f 100%);
  --grad-silver-text: linear-gradient(180deg, #ffffff 0%, #e4e4e8 55%, #a9a9b0 100%);

  --font-display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 72rem;
  --measure: 40rem;
  --radius: 6px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* i link interni (es. #contatti) non finiscono sotto l'intestazione fissa */
[id] {
  scroll-margin-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ciò che lo script mostra o nasconde (anche dove un componente ha display: grid/flex) */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Su iPhone il taglio del body non basta: bagliori e riflessi che escono di lato
   allargherebbero la pagina, che si potrebbe scorrere verso destra. Il taglio va sul
   contenuto (l'intestazione fissa è fuori da main). */
main {
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--copper-light);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--copper-light);
  outline-offset: 3px;
  border-radius: 2px;
}

strong {
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 0.75rem;
}

h1 {
  font-weight: 400;
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h2 {
  font-weight: 400;
  font-size: clamp(1.65rem, 1.2rem + 1.7vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

h3 {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Testo in rame o argento come nel logo (con colore pieno se il gradiente non è supportato) */
.accent {
  color: var(--copper);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .accent {
    background: var(--grad-copper-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: var(--measure);
}

.muted {
  color: var(--text-muted);
}

/* ---------- Accessibilità: salta al contenuto ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--copper-light);
  color: #0a0a0b;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Intestazione ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 50px;
  height: 40px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.25;
}

.brand-name span {
  color: var(--copper);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--silver);
  text-decoration: none;
  padding: 0.4rem 0;
  display: inline-block;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: #ffffff;
  border-bottom-color: var(--copper);
}

/* cambio lingua: a destra del menu; su telefono accanto al nome, con il menu sotto */
.lang {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--silver);
  text-decoration: none;
  border: 1px solid #3a3a42;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

.lang:hover {
  color: #ffffff;
  border-color: var(--copper);
}

@media (max-width: 40rem) {
  .site-header {
    position: static;
  }
  .header-inner {
    gap: 0.4rem 1rem;
  }
  .brand-name {
    font-size: 0.78rem;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
  }
  .site-nav ul {
    justify-content: center;
    gap: 0.25rem 1.1rem;
  }
  .site-nav a {
    font-size: 0.82rem;
    letter-spacing: 0.03em;
  }
}

/* ---------- Pulsanti ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button-primary {
  background: var(--grad-copper);
  color: #0a0a0b;
  box-shadow: 0 0 0 1px rgba(243, 207, 176, 0.25) inset;
}

.button-primary:hover {
  color: #0a0a0b;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -10px rgba(219, 162, 122, 0.55);
}

.button-secondary {
  border: 1px solid #4a4a52;
  color: var(--text);
}

.button-secondary:hover {
  color: #ffffff;
  border-color: var(--silver);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero::before {
  /* bagliore rame dietro al logo */
  content: '';
  position: absolute;
  right: -10%;
  top: 5%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(201, 138, 98, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-logo img {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}

@media (max-width: 52rem) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-logo {
    order: -1;
  }
  .hero-logo img {
    max-width: 200px;
    margin: 0 auto;
  }
  .hero-text {
    text-align: center;
  }
  .hero-text .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-text .actions {
    justify-content: center;
  }
}

/* la linea dell'orizzonte */
.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper-dark) 15%, var(--copper-light) 50%, var(--copper-dark) 85%, transparent);
}

.horizon::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  top: -12px;
  height: 24px;
  background: radial-gradient(closest-side, rgba(235, 184, 148, 0.28), transparent);
  filter: blur(4px);
}

/* Hero delle pagine interne */
.page-hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.page-hero h1 {
  max-width: 18em;
}

/* ---------- Sezioni ---------- */

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-band {
  background: var(--bg-band);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: 1fr;
  }
}

.split p {
  max-width: var(--measure);
}

/* ---------- Schede ---------- */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr));
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--copper-line);
}

.card > :last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--text-muted);
}

/* scheda grande per i due servizi principali, con filo di rame in alto */
.pillar {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.pillar::before {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad-copper);
}

.pillar h3 {
  font-weight: 400;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.pillar .more {
  margin-top: auto;
}

.number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--copper);
  margin-bottom: 1.25rem;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--copper-light);
  padding-top: 0.5rem;
}

.more::after {
  content: '→';
  transition: transform 0.2s ease;
}

.more:hover::after {
  transform: translateX(4px);
}

/* elenco con piccolo triangolo di rame al posto del punto */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 1.75rem;
}

.ticks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text);
}

.ticks li + li {
  margin-top: 0.45rem;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.55em;
  width: 0;
  height: 0;
  border-left: 0.38rem solid transparent;
  border-right: 0.38rem solid transparent;
  border-bottom: 0.6rem solid var(--copper);
}

/* coppie di lingue */
.lang-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.lang-pairs li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--copper-line);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
}

.lang-pairs .arrow {
  color: var(--copper);
  margin: 0 0.35rem;
}

/* ambiti */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags + p {
  margin-top: 1.5rem;
}

.tags li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
}

/* passaggi numerati */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
}

.steps .card::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--copper);
  margin-bottom: 1rem;
}

/* schede delle app */
.app-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.app-card img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 14px;
}

.app-card h3 {
  margin-bottom: 0.4rem;
}

/* ---------- Contatti ---------- */

.contact {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: min(60rem, 140%);
  aspect-ratio: 2;
  transform: translate(-50%, -55%);
  background: radial-gradient(closest-side, rgba(201, 138, 98, 0.14), transparent 70%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  max-width: 44rem;
}

.contact .lead {
  margin-left: auto;
  margin-right: auto;
}

.contact .button {
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* email e WhatsApp affiancati, uno sotto l'altro su telefono */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 34rem;
  margin: 1.5rem auto 0;
}

/* ---------- Testi lunghi (privacy) ---------- */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 2.5rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.updated {
  color: var(--text-muted);
}

/* ---------- Piè di pagina ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: #070708;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  flex: 1 1 18rem;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.site-footer nav {
  flex: 0 1 auto;
  max-width: 46rem;
}

.footer-brand img {
  width: 40px;
  height: 32px;
  margin-top: 0.2rem;
}

.footer-brand p {
  margin: 0;
}

.footer-brand strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

.footer-note {
  flex-basis: 100%;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

/* ---------- Pagina 404 ---------- */

.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.not-found img {
  width: 120px;
  margin: 0 auto 2rem;
}

.not-found .lead {
  margin-left: auto;
  margin-right: auto;
}

.not-found .actions {
  justify-content: center;
}

.not-found .other-lang {
  margin-top: 2.5rem;
}

/* =====================================================================
 * Movimento e parti interattive (assets/js/sito.js)
 * Tutto si spegne se nel telefono o nel computer le animazioni sono ridotte.
 * ===================================================================== */

/* ---------- Alba sull'orizzonte: la linea si accende, il marchio sale ---------- */

@media (prefers-reduced-motion: no-preference) {
  .horizon {
    transform-origin: 50% 50%;
    animation: horizon-draw 1.6s cubic-bezier(0.22, 0.8, 0.24, 1) 0.1s both;
  }

  .horizon::after {
    animation: fade-in 1.4s ease 0.9s both;
  }

  /* un riflesso di luce percorre la linea una volta sola */
  .horizon::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 22%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 238, 222, 0.95), transparent);
    filter: blur(1px);
    opacity: 0;
    animation: horizon-sweep 2.4s cubic-bezier(0.45, 0, 0.25, 1) 1.5s both;
  }

  .hero::before {
    animation: glow-rise 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }

  .hero-logo img {
    animation: sunrise 2s cubic-bezier(0.2, 0.75, 0.25, 1) 0.35s both;
  }

  .hero-text > *,
  .page-hero .container > * {
    animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-text > :nth-child(2),
  .page-hero .container > :nth-child(2) { animation-delay: 0.12s; }
  .hero-text > :nth-child(3),
  .page-hero .container > :nth-child(3) { animation-delay: 0.24s; }
  .hero-text > :nth-child(4),
  .page-hero .container > :nth-child(4) { animation-delay: 0.36s; }
  .hero-text > :nth-child(5),
  .page-hero .container > :nth-child(5) { animation-delay: 0.48s; }
}

@keyframes horizon-draw {
  from { transform: scaleX(0); opacity: 0; }
  25% { opacity: 1; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes horizon-sweep {
  0% { transform: translateX(-100%); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  /* finisce sul bordo destro della linea, non oltre */
  100% { transform: translateX(355%); opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glow-rise {
  from { opacity: 0; transform: translateY(22%) scale(0.85); }
  to { opacity: 1; transform: none; }
}

@keyframes sunrise {
  from { opacity: 0; transform: translateY(12%); filter: brightness(0.5) saturate(0.6); }
  55% { opacity: 1; }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sezioni che appaiono mentre si scorre ---------- */

.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-in {
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Bagliore rame che segue il puntatore sulle schede ---------- */

@media (hover: hover) and (pointer: fine) {
  .card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), rgba(235, 184, 148, 0.07), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
  }

  .card:hover::after {
    opacity: 1;
  }
}

/* ---------- Pulsanti a scelta (lingua, dimensione, tipo di richiesta) ---------- */

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.seg button,
.seg label {
  position: relative;
  font: 600 0.85rem/1 var(--font-display);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.seg button:hover,
.seg label:hover {
  color: var(--text);
}

.seg button[aria-pressed='true'],
.seg label:has(input:checked) {
  color: #0a0a0b;
  background: var(--grad-copper);
}

.seg label:has(input:focus-visible) {
  outline: 2px solid var(--copper-light);
  outline-offset: 2px;
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Schermata d'app in tre lingue ---------- */

.split-demo {
  align-items: center;
}

.loc-demo {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  position: relative;
  min-width: 0;
}

.loc-demo::before {
  /* il telefono sorge su un bagliore rame */
  content: '';
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(30rem, 120%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(201, 138, 98, 0.18), transparent 70%);
  pointer-events: none;
}

.phone {
  position: relative;
  width: min(19rem, 100%);
  aspect-ratio: 9 / 16.5;
  border-radius: 2.6rem;
  padding: 0.6rem;
  background: linear-gradient(160deg, #2c2c31, #111114 40%, #1b1b1f);
  box-shadow: 0 0 0 1px #3a3a42, 0 30px 60px -25px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.phone-screen {
  --ts: 1;
  height: 100%;
  border-radius: 2.1rem;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(201, 138, 98, 0.22), transparent 60%),
    #0b0b0d;
  padding: 0.8rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: calc(0.86rem * var(--ts));
  line-height: 1.35;
  transition: font-size 0.3s ease;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 0.72rem/1 var(--font-display);
  color: var(--text);
  padding: 0 0.6rem;
}

.phone-island {
  width: 5.2rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #000;
}

.notif {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem 0.8rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notif img {
  width: 2.1rem;
  height: auto;
  padding: 0.3rem;
  border-radius: 0.55rem;
  background: #0a0a0b;
}

.notif p,
.app-panel p {
  margin: 0;
}

.notif-title {
  font-weight: 700;
  color: var(--text);
}

.notif-body {
  color: var(--text-muted);
}

.app-panel {
  margin-top: auto;
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  padding: 1rem;
  border-radius: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.app-label {
  font: 600 0.68em/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.2em;
  color: var(--text);
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.9em;
}

.chip {
  font-weight: 700;
  font-size: 0.85em;
  color: #9fe0b0;
  background: rgba(120, 200, 140, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.app-button {
  margin-top: 0.5rem;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  font: 600 1em/1 var(--font-display);
  letter-spacing: 0.03em;
  color: #0a0a0b;
  background: var(--grad-copper);
  border-radius: 999px;
  padding: 0.7em 1.3em;
}

.loc-controls {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.stepper button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 1.1rem/1 var(--font-display);
  cursor: pointer;
}

.stepper button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.stepper output {
  min-width: 2.4rem;
  text-align: center;
  font: 600 0.85rem/1 var(--font-display);
  letter-spacing: 0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.loc-demo figcaption {
  position: relative;
  max-width: 24rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Esempi di traduzione ---------- */

.tx-demo {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  min-width: 0;
}

.tx-demo::before {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad-copper);
}

.tx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tx-tabs button {
  font: 600 0.82rem/1 var(--font-display);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tx-tabs button:hover {
  color: var(--text);
  border-color: var(--copper-line);
}

.tx-tabs button[aria-selected='true'] {
  color: #0a0a0b;
  background: var(--grad-copper);
  border-color: transparent;
}

.tx-item {
  display: grid;
  gap: 0.9rem;
}

.tx-item + .tx-item {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.tx-panels {
  display: grid;
}

.is-enhanced .tx-item {
  grid-area: 1 / 1;
}

.is-enhanced .tx-item + .tx-item {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.is-enhanced .tx-item.tx-off {
  visibility: hidden;
}

.tx-item p {
  margin: 0;
}

.tx-tag {
  display: block;
  font: 600 0.72rem/1.2 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.tx-src .tx-text,
.tx-final .tx-text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.35;
}

.tx-src .tx-text {
  color: var(--text);
}

.tx-literal .tx-text {
  color: var(--text-muted);
  background: linear-gradient(var(--copper-dark), var(--copper-dark)) no-repeat 0 58% / 100% 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.tx-final .tx-tag {
  color: var(--copper);
}

.tx-final .tx-text {
  color: var(--copper-light);
}

.tx-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--copper-line);
}

@media (prefers-reduced-motion: no-preference) {
  /* prima compare la versione parola per parola, poi viene barrata, poi arriva l'italiano */
  .is-enhanced .tx-item .tx-literal .tx-text {
    background-size: 0% 1px;
  }

  .is-enhanced .tx-item .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.4em);
  }

  .is-enhanced .tx-item .tx-note {
    opacity: 0;
  }

  .is-enhanced .tx-item.is-played .tx-literal .tx-text {
    transition: background-size 0.7s cubic-bezier(0.6, 0, 0.3, 1) 0.5s;
    background-size: 100% 1px;
  }

  .is-enhanced .tx-item.is-played .word {
    animation: rise-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(1.25s + var(--i, 0) * 0.09s);
  }

  .is-enhanced .tx-item.is-played .tx-note {
    animation: fade-in 0.8s ease 2.1s both;
  }
}

/* ---------- Modulo di richiesta ---------- */

.quote-form {
  text-align: left;
  margin: 2rem auto 0;
  max-width: 40rem;
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quote-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.qf-type {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.qf-type legend,
.qf-field > span,
.qf-field > legend {
  font: 600 0.8rem/1.3 var(--font-display);
  letter-spacing: 0.08em;
  color: var(--text);
  padding: 0;
  margin-bottom: 0.45rem;
}

.qf-type legend {
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.qf-field small {
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.qf-group,
.qf-common {
  display: grid;
  gap: 1.1rem;
}

.qf-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.1rem;
}

.qf-field {
  display: grid;
  min-width: 0;
}

.quote-form input:not([type='radio']):not([type='checkbox']),
.quote-form select,
.quote-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #3a3a42;
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  transition: border-color 0.2s ease;
}

.quote-form textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  border-color: var(--copper);
  outline: none;
}

.quote-form input:focus-visible,
.quote-form select:focus-visible,
.quote-form textarea:focus-visible {
  outline: 2px solid var(--copper-light);
  outline-offset: 1px;
}

.quote-form ::placeholder {
  color: #7a7a83;
}

/* stessa altezza per campi ed elenchi */
.quote-form input:not([type='radio']):not([type='checkbox']),
.quote-form select {
  min-height: calc(1.65em + 1.3rem + 2px);
}

/* su iPhone (Safari, Chrome e ogni altro browser usano lo stesso motore, WebKit) il
   campo data ha una larghezza minima sua (usciva dal riquadro) e un'altezza diversa
   dagli altri campi */
.quote-form input[type='date'] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  height: calc(1.65em + 1.3rem + 2px);
}

.quote-form input[type='date']::-webkit-date-and-time-value {
  text-align: left;
}

.qf-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.qf-checks legend {
  float: left;
  width: 100%;
}

.qf-checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.qf-checks input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--copper);
}

.qf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.qf-actions .button {
  cursor: pointer;
  font-size: 0.95rem;
}

.qf-actions .button-primary {
  border: 0;
}

.qf-actions .button-secondary {
  background: transparent;
  border: 1px solid #4a4a52;
}

.qf-note,
.qf-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.qf-status {
  color: var(--copper-light);
}

.qf-or {
  margin: 2.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Biglietto da visita digitale (/card/ e /en/card/) ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.card-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 20rem at 50% 7rem, rgba(201, 138, 98, 0.15), transparent 70%) no-repeat,
    var(--bg);
}

.card-top,
.card-main,
.card-footer {
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.card-home img {
  display: block;
  width: 40px;
  height: 32px;
}

.card-main {
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: 1.75rem;
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

/* il biglietto, come quello stampato: cartoncino nero e lamina rame */
.vcard {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 85 / 55;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(150deg, #1a1a1d 0%, #0c0c0d 45%, #050506 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 28px 50px -28px rgba(0, 0, 0, 0.95),
    0 12px 44px -22px rgba(201, 138, 98, 0.4);
}

/* riflesso di luce che passa sulla lamina */
.vcard::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 220, 0.16) 50%, transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
}

.vcard-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  /* stesse proporzioni del biglietto stampato (85x55 mm, margini di 1 cm) */
  padding: 10.5cqw;
  color: var(--copper);
}

.vcard-face p {
  margin: 0;
}

.vcard-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.65rem;
  font-size: 2.6cqw;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* nome e ruoli a sinistra, marchio a destra appoggiato sulla linea dell'orizzonte */
.vcard-main {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3cqw;
}

.vcard-mark {
  flex: none;
  width: 17.6cqw;
  height: auto;
  margin-bottom: -0.4cqw;
}

.vcard-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  font-size: 5.3cqw;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.vcard-role {
  margin-top: 1.3cqw !important;
  font-size: 0.72rem;
  font-size: 3cqw;
  line-height: 1.43;
}

.vcard-line {
  display: block;
  height: 1px;
  margin: 2.6cqw 0 3.2cqw;
  background: linear-gradient(90deg, transparent, var(--copper-light) 18%, var(--copper-light) 82%, transparent);
  opacity: 0.85;
}

.vcard-contacts {
  font-size: 0.72rem;
  font-size: 3cqw;
  line-height: 1.43;
}

/* testo «in lamina»: rame con riflessi, colore pieno dove il gradiente non è supportato */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .vcard-brand,
  .vcard-name,
  .vcard-role,
  .vcard-contacts {
    background: linear-gradient(100deg, #b5764f 0%, #f3cfb0 38%, #d39a72 62%, #9a5636 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .vcard {
    animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .vcard::after {
    animation: vcard-sheen 2.2s cubic-bezier(0.45, 0, 0.25, 1) 0.7s both;
  }
}

@keyframes vcard-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.card-intro {
  margin: 0;
  color: var(--text-muted);
  text-align: center;
}

.card-actions,
.card-share {
  display: grid;
  gap: 0.75rem;
}

.card-actions .button,
.card-share .button {
  width: 100%;
}

.card-share .button {
  cursor: pointer;
  background: transparent;
  border: 1px solid #4a4a52;
  font-size: 0.95rem;
}

.card-actions .button {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.1rem 0.75rem;
  text-align: left;
}

.card-actions .button:last-child {
  justify-content: center;
}

.card-detail {
  font-family: var(--font-text);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.92rem;
  opacity: 0.85;
}

.card-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.card-links li {
  border-bottom: 1px solid var(--line);
}

.card-links a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.25rem;
  color: var(--text);
  text-decoration: none;
}

.card-links a::after {
  content: '→';
  margin-left: auto;
  color: var(--copper);
  transition: transform 0.15s ease;
}

.card-links a:hover::after {
  transform: translateX(3px);
}

.card-links img {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.card-link-text {
  display: grid;
  min-width: 0;
}

.card-link-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.card-link-text small {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.card-qr summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem;
  border: 1px dashed #3a3a42;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--silver);
  text-align: center;
}

.card-qr summary::-webkit-details-marker {
  display: none;
}

.card-qr summary:hover {
  border-color: var(--copper);
  color: #ffffff;
}

.card-qr img {
  display: block;
  width: min(15rem, 80%);
  height: auto;
  margin: 1.25rem auto 0.75rem;
  border-radius: 12px;
}

.card-qr p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.card-footer {
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

.card-footer p {
  margin: 0.2rem 0;
}

.card-footer a {
  color: var(--text-muted);
}

.card-footer strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
}
