/* ============================================================
   ComoNEXT Landing – STYLE
   Palette e tipografia allineate a comonext.it (Open Sans,
   grigio #666769, arancio #f08600, rosso #b5101d).
   ============================================================ */

:root {
  --c-text: #666769;
  --c-dark: #2b2b2b;
  --c-ink: #333333;
  --c-orange: #f08600;
  --c-orange-light: #f7b733;
  --c-red: #b5101d;
  --c-red-dark: #8f0c17;
  --c-white: #ffffff;
  --c-light: #f5f5f4;
  --c-line: #e3e4e4;
  --c-muted: #9a9b9d;
  --grad-arc: linear-gradient(135deg, #b5101d 0%, #f08600 55%, #f7b733 100%);

  --font: "Open Sans", Arial, Helvetica, sans-serif;
  --fs-body: 1.0625rem;
  --lh-body: 1.7;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --arc: clamp(56px, 12vw, 140px);
  --shadow: 0 18px 50px rgba(43, 43, 43, .12);
  --header-h: 92px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--c-red); text-decoration: none; }
a:hover { color: var(--c-orange); }
h1, h2, h3, h4 { color: var(--c-ink); margin: 0 0 .6em; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.35rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
strong { color: var(--c-ink); font-weight: 600; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--c-ink); font-weight: 400; }
:focus-visible { outline: 3px solid var(--c-orange); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--c-ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Eyebrow: la barretta arancio di comonext.it ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 14px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-orange);
}
.eyebrow::before { content: ""; width: 6px; height: 22px; background: var(--c-orange); flex: none; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px;
  font: inherit; font-size: .92rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.1;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--c-red); color: #fff; border-color: var(--c-red); box-shadow: 0 8px 22px rgba(181, 16, 29, .28); }
.btn-primary:hover { background: var(--c-red-dark); border-color: var(--c-red-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-outline:hover { background: var(--c-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-text); border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-ghost:hover { color: var(--c-ink); }
.btn-sm { padding: 11px 22px; font-size: .8rem; }
.btn-lg { padding: 18px 38px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-color: var(--c-line); box-shadow: 0 6px 24px rgba(0, 0, 0, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); transition: height .25s; }
.site-header.is-scrolled .header-inner { height: 72px; }
.brand img { width: 194px; height: auto; transition: width .25s; }
.site-header.is-scrolled .brand img { width: 150px; }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(48px, 7vw, 88px); }
.bg-light { background: var(--c-light); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.compact { margin-bottom: 28px; }
.section-head.on-dark h2 { color: #fff; }
.center-actions { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy h1 { margin-bottom: .5em; }
.hero-copy .lead { margin-bottom: .9em; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { font-size: .9rem; color: var(--c-muted); }
.hero-media { position: relative; padding: 0 0 6% 8%; }
.hero-media img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 0 var(--arc) 0 var(--arc);
  box-shadow: var(--shadow);
}
/* Il segno: l'arco del logo, riportato dietro la foto (spunta dall'angolo arrotondato in basso a sinistra) */
.hero-ring {
  position: absolute; left: -24%; bottom: -13%;
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 330deg, #f7b733 0deg, #f08600 90deg, #b5101d 210deg, transparent 210deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%);
  mask: radial-gradient(circle, transparent 66%, #000 67%);
  z-index: 0;
}
.hero-ring::after {
  content: ""; position: absolute; inset: 11%; border-radius: 50%;
  background: conic-gradient(from 150deg, transparent 0deg 200deg, #f08600 260deg, #f7b733 330deg, transparent 330deg);
  -webkit-mask: radial-gradient(circle, transparent 84%, #000 85%);
  mask: radial-gradient(circle, transparent 84%, #000 85%);
  opacity: .8;
}

/* ---------- Pillar ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 36px); }
.pillar { padding: 32px 26px 28px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); position: relative; overflow: hidden; }
.pillar::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--grad-arc); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.pillar:hover::before { transform: scaleX(1); }
.pillar-icon { display: block; width: 52px; height: 52px; color: var(--c-orange); margin-bottom: 18px; }
.pillar h3 { font-size: 1.15rem; }
.pillar p { font-size: .98rem; margin: 0; }

/* ---------- Galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; grid-auto-flow: dense; }
.gallery-item { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--c-line); }
.gallery-item.span-2 { grid-column: span 2; aspect-ratio: 8.3 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px;
  color: #fff; font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent);
}

/* ---------- Split (testo + media) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-copy .btn { margin-top: 10px; }
.rounded-arc { border-radius: 0 var(--arc) 0 var(--arc); box-shadow: var(--shadow); }

/* Collage community */
.community-collage { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.community-collage img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.collage-main { grid-row: 1 / 3; aspect-ratio: 3 / 4; border-radius: 0 var(--arc) 0 0 !important; }
.collage-a { aspect-ratio: 1; }
.collage-b { aspect-ratio: 1; border-radius: 0 0 var(--arc) 0 !important; }

/* ---------- Numeri ---------- */
.numbers { position: relative; padding-block: clamp(72px, 10vw, 130px); background: var(--c-dark); color: #fff; overflow: hidden; }
.numbers-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: saturate(.6); }
.numbers::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43, 43, 43, .95), rgba(43, 43, 43, .55)); }
.numbers .container { position: relative; z-index: 1; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 0; }
.number { border-left: 3px solid var(--c-orange); padding-left: 22px; }
.number dt { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.number dd { margin: 10px 0 0; color: rgba(255, 255, 255, .78); font-size: 1rem; }

/* ---------- Video ---------- */
.video-frame { max-width: 1000px; margin-inline: auto; }
.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.is-playing img, .video.is-playing .video-play { display: none; }
.video-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, .05));
  border: 0; cursor: pointer; color: #fff; font: inherit;
}
.video-play-icon { width: 92px; height: 92px; border-radius: 50%; background: var(--c-red); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(181, 16, 29, .45); transition: transform .25s, background-color .25s; }
.video-play-icon svg { width: 44px; height: 44px; margin-left: 4px; }
.video-play:hover .video-play-icon { transform: scale(1.08); background: var(--c-orange); }
.video-play-label { font-weight: 600; letter-spacing: .04em; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }

/* ---------- Per chi è ---------- */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.5vw, 30px); }
.audience-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-line); display: flex; flex-direction: column; }
.audience-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.audience-body { padding: 24px 22px 26px; }
.audience-body h3 { font-size: 1.1rem; }
.audience-body p { margin: 0; font-size: .96rem; }

/* ---------- Innovativa ---------- */
.quote-title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); color: var(--c-red); font-weight: 800; }

/* ---------- Mappa ---------- */
.distances { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 6px; }
.distances li { padding-left: 18px; position: relative; }
.distances li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--c-orange); }
.map { margin: 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px 20px 14px; box-shadow: var(--shadow); }
.map svg { width: 100%; height: auto; font-family: var(--font); }
.map-border { fill: none; stroke: var(--c-muted); stroke-width: 2; stroke-dasharray: 8 8; }
.map-country { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; fill: var(--c-muted); font-weight: 700; }
.map-road { fill: none; stroke: #d9d9d9; stroke-width: 10; stroke-linecap: round; }
.map-roadlabel { font-size: 12px; font-weight: 700; fill: var(--c-text); }
.map-rail { fill: none; stroke: #bfbfbf; stroke-width: 3; stroke-dasharray: 10 6; }
.map-link { stroke: var(--c-orange); stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .8; }
.map-city circle { fill: var(--c-ink); }
.map-city text { font-size: 16px; font-weight: 600; fill: var(--c-ink); }
.map-hub circle:last-of-type { fill: var(--c-red); }
.map-hub text { font-size: 19px; font-weight: 800; fill: var(--c-red); }
.map-hub .map-sub { font-size: 13px; font-weight: 400; fill: var(--c-text); }
.map figcaption { font-size: .85rem; color: var(--c-muted); margin-top: 10px; text-align: center; }

/* ---------- Form ---------- */
.form-section { position: relative; background: #fff; }
.form-section::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--grad-arc); }
.form-section .split { align-items: start; }
.form-photo { margin-top: 28px; }
.form { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px); box-shadow: var(--shadow); }
.form-title { font-size: 1.35rem; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--c-ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--c-ink);
  padding: 12px 14px; border: 1px solid #c9cacb; border-radius: 4px; background: #fff;
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px rgba(240, 134, 0, .2); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--c-red); }
.field-error { font-size: .82rem; color: var(--c-red); min-height: 1em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--c-red); }
.field-check label { font-weight: 400; font-size: .9rem; color: var(--c-text); }
.field-check .field-error { grid-column: 2; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn-block { margin-top: 8px; }
.form-status { margin: 14px 0 0; font-size: .95rem; min-height: 1em; }
.form-status.is-error { color: var(--c-red); font-weight: 600; }
.form-note { margin: 12px 0 0; font-size: .88rem; color: var(--c-muted); text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-light); border-top: 1px solid var(--c-line); padding-top: 56px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-legal { margin-top: 16px; font-size: .88rem; }
.footer-title { font-weight: 700; color: var(--c-ink); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; margin-bottom: 10px; }
.social { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--c-text); }
.site-footer a:hover { color: var(--c-red); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--c-line); padding-block: 18px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  display: flex; justify-content: center;
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s;
}
.cookie-banner.is-open { opacity: 1; transform: none; }
.cookie-inner {
  width: min(100%, 1000px); background: #fff; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
  padding: 20px 24px; display: flex; gap: 20px; align-items: center; border-top: 4px solid var(--c-orange);
}
.cookie-inner p { margin: 0; font-size: .9rem; flex: 1; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Thank-you ---------- */
.thankyou { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding-block: 60px; text-align: center; }
.thankyou-inner { max-width: 640px; }
.thankyou-mark { width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 50%; background: var(--grad-arc); display: grid; place-items: center; color: #fff; box-shadow: 0 14px 40px rgba(240, 134, 0, .35); }
.thankyou-mark svg { width: 48px; height: 48px; }
.thankyou-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .pillars, .audience { grid-template-columns: repeat(2, 1fr); }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 28px; }
}
@media (max-width: 900px) {
  :root { --header-h: 74px; }
  .brand img { width: 150px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .hero-media { max-width: 520px; margin-inline: auto; }
  .hero-media img { aspect-ratio: 4 / 4.4; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.span-2 { aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; }
}
@media (max-width: 600px) {
  .pillars, .audience, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-item.span-2 { grid-column: span 2; }
  .numbers-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .number { padding-left: 14px; }
  .number dt { font-size: 2rem; white-space: nowrap; }
  .number dd { font-size: .9rem; }
  .header-inner .btn-sm { padding: 9px 14px; font-size: .7rem; }
  .brand img { width: 128px; }
  .hero-actions .btn { width: 100%; }
  .btn-lg { padding: 16px 28px; }
  .community-collage { gap: 10px; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
