/* Di Lupo Sistemi - foglio di stile principale
   Autore: Matteo Di Lupo */

:root {
  --navy: #0f2257;
  --navy-2: #172f73;
  --navy-ink: #0a173d;
  --accent: #f2a516;
  --accent-ink: #3b2600;
  --bg: #f5f6f9;
  --surface: #ffffff;
  --text: #1b2333;
  --muted: #5b6577;
  --line: #dfe3ea;
  --radius: 10px;
  --wrap: 1180px;
  --shadow: 0 1px 2px rgba(15, 34, 87, .06), 0 8px 24px rgba(15, 34, 87, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: "Barlow Condensed", "Barlow", sans-serif; line-height: 1.1; margin: 0 0 .5em; color: var(--navy-ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6em; display: block; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.4em; border-radius: 6px; font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffb933; }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border-color: var(--navy-2); color: var(--navy-2); }
.btn-outline:hover { background: var(--navy-2); color: #fff; }

/* Barra superiore */
.topbar { background: var(--navy-ink); color: #c7cfe3; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.lang { display: flex; gap: 4px; }
.lang a { padding: 2px 8px; border-radius: 4px; font-weight: 600; color: #c7cfe3; }
.lang a[aria-current] { background: var(--accent); color: var(--accent-ink); }

/* Intestazione */
.header { background: var(--navy); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 54px; width: auto; }
.year { font-family: "Barlow", sans-serif; font-size: .5em; font-weight: 600; letter-spacing: .08em; color: var(--accent); margin-left: .35em; vertical-align: super; }
.brand > span { border-left: 1px solid rgba(255,255,255,.25); padding-left: 12px; }
@media (max-width: 480px) { .brand > span { display: none; } }
.brand strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.5rem; letter-spacing: .02em; line-height: 1; }
.brand small { display: block; white-space: nowrap; font-size: .75rem; color: #aab5d3; letter-spacing: .06em; text-transform: uppercase; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; white-space: nowrap; padding: .55em .8em; color: #e3e8f5; text-decoration: none; font-weight: 500; border-radius: 6px; }
.nav a:hover, .nav a[aria-current] { color: #fff; background: rgba(255,255,255,.1); }
.nav .shop a { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); display: none; border-top: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 12px 16px; }
}

/* Hero */
.hero { background: linear-gradient(120deg, var(--navy-ink) 0%, var(--navy) 55%, var(--navy-2) 100%); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: #c7cfe3; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-media { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,.35); object-fit: cover; width: 100%; aspect-ratio: 3 / 4; max-height: 440px; }
.hero-media img:last-child { margin-top: 40px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero-media img { aspect-ratio: 4 / 5; }
}

/* Numeri */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 2.4rem; color: var(--navy); line-height: 1; }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
}

/* Sezioni */
.section { padding: 84px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section.alt { background: var(--surface); }

/* Due aree di attivita' */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.area { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.area img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.area-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.area-body ul { margin: 0 0 1.4em; padding-left: 1.2em; color: var(--muted); }
.area-body .btn { margin-top: auto; align-self: flex-start; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; margin-bottom: 12px; }
.tag-new { background: #fff1d6; color: #8a5a00; }
.tag-hist { background: #e4e9f7; color: var(--navy-2); }
@media (max-width: 860px) { .areas { grid-template-columns: 1fr; } }

/* Servizi */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.service svg { width: 34px; height: 34px; color: var(--navy-2); margin-bottom: 12px; }
.service p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 960px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }

/* Telai Cotton */
.cotton { background: var(--navy-ink); color: #c7cfe3; }
.cotton h2 { color: #fff; }
.cotton .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.cotton img { border-radius: var(--radius); width: 100%; max-height: 520px; object-fit: cover; }
.models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 24px 0 28px; }
.models a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 8px; background: rgba(255,255,255,.06); color: #fff; text-decoration: none; font-weight: 600; border: 1px solid rgba(255,255,255,.08); }
.models a:hover { background: rgba(255,255,255,.12); border-color: var(--accent); }
.models a span { color: var(--accent); }
.countries { font-size: .92rem; }
@media (max-width: 860px) { .cotton .wrap { grid-template-columns: 1fr; } }

/* Galleria lavori */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; opacity: .95; }
.gallery figure:first-child img { aspect-ratio: auto; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-column: 1 / -1; } }

/* Shop */
.shop-band { background: var(--accent); color: var(--accent-ink); }
.shop-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 36px; flex-wrap: wrap; }
.shop-band h2 { color: var(--accent-ink); font-size: 1.9rem; margin: 0 0 .2em; }
.shop-band p { margin: 0; }
.shop-band .btn { background: var(--navy-ink); color: #fff; }

/* Contatti */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.contact-card dt { color: var(--muted); font-size: .9rem; }
.contact-card dd { margin: 0; font-weight: 600; }
.map { border-radius: var(--radius); overflow: hidden; min-height: 320px; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Piede */
.footer { background: var(--navy-ink); color: #8f9bbb; font-size: .9rem; padding: 40px 0 24px; }
.footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { color: #c7cfe3; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; margin-top: 8px; font-size: .82rem; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr; } }

/* Segnaposto bozza */
.todo { background: #fff3c4; color: #6b4e00; padding: 0 4px; border-radius: 3px; }

/* ---- Pagine interne ---- */
.page-hero { background: linear-gradient(120deg, var(--navy-ink) 0%, var(--navy) 60%, var(--navy-2) 100%); color: #c7cfe3; padding: 56px 0 52px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); }
.page-hero .lead { color: #c7cfe3; }
.crumbs { font-size: .85rem; margin-bottom: 14px; }
.crumbs a { color: #aab5d3; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.prose { max-width: 75ch; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Componenti dell'impianto (pagine telai) */
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.part { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.part img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9ecf2; }
.part div { padding: 18px 20px 20px; }
.part h3 { font-size: 1.2rem; margin-bottom: .3em; }
.part p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Modelli di telaio */
.model-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.model-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s; }
.model-card:hover { transform: translateY(-3px); }
.model-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.model-card div { padding: 16px 18px 18px; }
.model-card h3 { margin: 0 0 .2em; }
.model-card span { color: var(--navy-2); font-weight: 600; font-size: .92rem; }
@media (max-width: 960px) { .model-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .model-cards { grid-template-columns: 1fr; } }

/* Prodotti */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; }
.product img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.product h3 { font-size: 1.15rem; margin-bottom: .3em; }
.product p { color: var(--muted); font-size: .93rem; margin: 0 0 .6em; }
.product a { font-weight: 600; font-size: .92rem; }
@media (max-width: 960px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .products { grid-template-columns: 1fr; } }

/* Passi del processo */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px 18px; border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: "Barlow Condensed", sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--navy-2); display: block; }
.step h3 { font-size: 1.1rem; margin: .2em 0 .3em; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Galleria a griglia */
.grid-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.grid-gallery figure { margin: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.grid-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grid-gallery figcaption { padding: 10px 14px; font-size: .9rem; color: var(--muted); }

/* Video */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.video { margin: 0; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.video figcaption { margin-top: 8px; color: var(--muted); }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

/* Download */
.dl-group { margin-bottom: 40px; }
.dl-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.dl-list li { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.dl-list li:first-child { border-top: 0; }
.dl-list .ext { flex: none; width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .75rem; background: #e4e9f7; color: var(--navy-2); text-transform: uppercase; }
.dl-list .ext.pdf { background: #fde4e1; color: #a1281b; }
.dl-list .info { flex: 1; min-width: 0; }
.dl-list .info b { display: block; }
.dl-list .info small { color: var(--muted); }
.dl-list .btn { padding: .5em 1em; flex: none; }
@media (max-width: 560px) { .dl-list li { flex-wrap: wrap; } .dl-list .btn { margin-left: 62px; } }

/* Social */
.social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.social a { display: inline-flex; align-items: center; gap: 8px; padding: .5em 1em; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--navy-2); font-weight: 600; background: var(--surface); }
.social a:hover { border-color: var(--navy-2); }

.note { background: #fff8e6; border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 6px; color: #5b4300; }
.center-cta { text-align: center; }
.center-cta .lead { margin: 0 auto 24px; }

/* Pagina scelta lingua */
.chooser { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(120deg, var(--navy-ink), var(--navy) 60%, var(--navy-2)); color: #c7cfe3; text-align: center; padding: 40px 20px; }
.chooser img { height: 150px; width: auto; margin: 0 auto 24px; }
.chooser h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.chooser .langs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 32px auto 28px; max-width: 640px; }
.chooser .langs a { padding: 18px 10px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); color: #fff; text-decoration: none; font-weight: 600; }
.chooser .langs a:hover { border-color: var(--accent); background: rgba(255,255,255,.12); }
.chooser .langs a b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.8rem; color: var(--accent); }
.chooser small { display: block; max-width: 60ch; margin: 0 auto; font-size: .9rem; }
@media (max-width: 560px) { .chooser .langs { grid-template-columns: 1fr 1fr; } }
