/* Laboratoriamo – stile del sito (ricostruito a mano, senza Avada; stessa base di nontemiamolamatematica) */
@font-face { font-family: "DM Sans"; src: url(/assets/fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/assets/fonts/dm-sans-italic.woff2) format("woff2"); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: "Syne"; src: url(/assets/fonts/syne-700.woff2) format("woff2"); font-weight: 700; font-style: normal; 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: "Syne"; src: url(/assets/fonts/syne-700-ext.woff2) format("woff2"); font-weight: 700; font-style: normal; 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 {
  --red: #be201c;
  --red-bright: #d62725;
  --ink: #212934;
  --black: #000;
  --grey: #898989;
  --line: #e2e2e2;
  --soft: #f9f9fb;
  --pink: #fcf0f0;
  --width: 1260px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Syne", "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-bright); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--black); line-height: 1.2; margin: 0 0 .6em; }
h1, h2 { word-spacing: .12em; }
h1 { font: 700 clamp(34px, 4.6vw, 54px)/1.1 var(--head); text-align: center; }
h2 { font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--head); }
h3, h4 { font-family: var(--head); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 48px, var(--width)); margin-inline: auto; }
.center { text-align: center; }
.narrow { width: min(100% - 48px, 860px); margin-inline: auto; }

/* pulsanti */
.btn { display: inline-block; padding: .65em 1.4em; border-radius: 12px; background: var(--red-bright); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.3; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--red); color: #fff; text-decoration: none; }
.btn-soft { background: var(--pink); color: var(--red-bright); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; padding: 1em 1.6em; }
.btn-soft:hover { background: #f8dede; color: var(--red); }

/* intestazione */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 104px; }
.brand img { width: 210px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 36px; margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.site-nav li { position: relative; }
.site-nav a { color: var(--black); font-weight: 500; font-size: 16px; padding: 8px 0; display: inline-block; }
.site-nav a:hover, .site-nav a.is-current { color: var(--red); text-decoration: none; }
.site-nav .btn-soft { color: var(--red-bright); font-weight: 500; padding: 1em 1.6em; }
.has-sub > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sub { position: absolute; left: -16px; top: 100%; min-width: 240px; flex-direction: column; gap: 0; padding: 10px 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); display: none !important; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex !important; }
.sub a { display: block; padding: 10px 20px; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--black); border-radius: 2px; }

/* sezioni */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.lead { font-size: 18px; max-width: 960px; margin-inline: auto; }
.kicker { color: var(--red); font-weight: 500; margin-bottom: .4em; }
.hero { padding: 56px 0 24px; }
.hero h1 { margin-bottom: 28px; }
.hero .lead { text-align: left; }
.pagehead { text-align: center; padding: 48px 0 16px; }
.pagehead .kicker { margin: 0 0 8px; font-size: 18px; }
.pagehead .tagline { font-style: italic; font-size: 18px; color: var(--black); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: 14px; }

/* album e video */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.tile { display: block; color: var(--ink); }
.tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; transition: transform .2s; }
.tile:hover img { transform: scale(1.02); }
.tile:hover { text-decoration: none; }
.tile strong { display: block; margin-top: 10px; color: var(--black); }
.tile span { font-size: 14px; color: var(--grey); }

/* contatti */
.contact { text-align: center; padding: 56px 0 120px; font-size: 20px; }
.contact p { margin-bottom: 1.2em; }
.contact a { font-weight: 500; }

/* piè di pagina */
.site-footer { padding: 0 30px 30px; }
.footer-box { max-width: 1240px; margin: 0 auto; padding: 72px 40px 40px; border-radius: 6px; color: #fff; text-align: center; background: linear-gradient(160deg, #8c1412 0%, #b81c19 100%); }
.footer-cols { display: flex; justify-content: center; align-items: center; gap: 40px; max-width: 760px; margin: 0 auto 56px; text-align: left; }
.footer-cols p { margin: 0; }
.footer-logo { width: 190px; flex: none; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-box .btn { background: var(--red-bright); font-size: 14px; white-space: nowrap; }
.footer-box .btn:hover { background: #e83a38; }
.footer-box a:not(.btn) { color: #f4b8b6; }
.copy { font-size: 15px; margin-bottom: 2em; }
.legal { font-size: 12px; margin: 0; }

/* telefono */
@media (max-width: 900px) {
  .header-row { min-height: 84px; flex-wrap: wrap; }
  .brand img { width: 170px; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 12px; padding-bottom: 18px; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 0; }
  .has-sub > a::after { display: none; }
  .sub { position: static; display: block !important; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 48px 0; }
  .footer-cols { flex-direction: column; text-align: center; margin-bottom: 36px; }
  .footer-box { padding: 48px 22px 32px; }
  .site-footer { padding: 0 12px 12px; }
}

/* ===== componenti di Laboratoriamo ===== */
.topbar { background: linear-gradient(90deg, var(--red), var(--red-bright)); color: #fff; text-align: center; font-size: 13px; padding: 7px 12px; }
.topbar a { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 6px; }
.btn-white { background: #fff; color: var(--red-bright); }
.btn-white:hover { background: var(--pink); color: var(--red); }
.red { color: var(--red); }
h2.big { font-size: clamp(28px, 3.6vw, 44px); }

/* home */
.hero-home { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.hero-grid-flip { grid-template-columns: 1fr 1.1fr; }
.hero-home h1 { text-align: left; font-size: clamp(34px, 4.4vw, 52px); }
.photo-pair { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.photo-pair img { border-radius: 10px; width: 100%; object-fit: cover; }
.photo-pair .ph-a { aspect-ratio: 814/1178; }
.photo-pair .ph-b { aspect-ratio: 846/1000; margin-top: 18px; }
.hello { display: flex; align-items: center; gap: 12px; font-size: 17px; margin-bottom: 18px; }
.hello img { width: 32px; height: 32px; }
.hello-center { justify-content: center; }
.hero-cta { display: flex; align-items: center; gap: 28px; margin: 8px 0 24px; }
.hero-cta p { margin: 0; max-width: 260px; }
.play-link { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; }
.play { display: inline-block; width: 44px; height: 44px; border-radius: 50%; background: var(--red-bright); position: relative; flex: none; }
.play::after { content: ""; position: absolute; left: 17px; top: 14px; border-style: solid; border-width: 8px 0 8px 12px; border-color: transparent transparent transparent #fff; }
.play-big { width: 76px; height: 76px; border-radius: 16px; background: var(--pink); margin: 0 auto 24px; display: block; }
.play-big::after { left: 31px; top: 27px; border-color: transparent transparent transparent var(--red-bright); }
.band { background: linear-gradient(120deg, #8c1412 0%, #be201c 60%, #d62725 100%); color: #fff; padding: 56px 0; }
.band-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 40px; align-items: center; }
.band h2 { color: #fff; margin: 0; }
.band p { margin: 0; font-size: 17px; }
.logos { padding: 48px 0 72px; }
.logos-list { list-style: none; padding: 0; margin: 24px auto 0; width: min(100% - 48px, var(--width)); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 56px; }
.logos-list img { height: 72px; width: auto; max-width: 220px; object-fit: contain; }
.logos-square img { height: 120px; max-width: 140px; }

/* video */
.grid-video { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-width: 860px; margin: 0 auto; }
.tile-video { position: relative; }
.tile-video img { aspect-ratio: 950/1200; }
.tile-video .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* festa della matematica */
.festa { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.festa img { border-radius: 12px; width: 100%; }
.festa figure { margin: 0 0 28px; }
.festa figcaption { font: 700 20px/1.2 var(--head); color: var(--black); margin-bottom: 10px; }

/* scuola estiva */
.se-hero { background: linear-gradient(120deg, #8c1412 0%, #be201c 60%, #d62725 100%); color: #fff; padding: 56px 0; }
.se-hero h1 { color: #fff; text-align: left; }
.se-hero p { font-size: 18px; }
.se-prenota { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.se-prenota strong { font-size: 22px; }
.collab-logo { margin: 0 auto 24px; width: 96px; }
.se-when { font-size: 22px; margin: 16px 0; }
.stats { list-style: none; padding: 0; margin: 48px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 12px; color: var(--grey); }
.stats strong { display: block; font: 700 46px/1.1 var(--head); color: var(--red-bright); }
.accordion { max-width: 1000px; margin: 0 auto 56px; }
.accordion details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.accordion summary { cursor: pointer; font: 700 20px/1.3 var(--head); color: var(--red); list-style: none; display: flex; align-items: center; gap: 12px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before { content: "›"; display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--ink); color: #fff; border-radius: 3px; font: 700 16px/1 var(--font); transition: transform .15s; }
.accordion details[open] summary::before { transform: rotate(90deg); }
.accordion details p { margin: 12px 0 0 34px; }
.campo { position: relative; border-radius: 12px; overflow: hidden; background-size: cover; background-position: center; color: #fff; text-align: center; padding: 48px 24px; margin-bottom: 56px; }
.campo::before { content: ""; position: absolute; inset: 0; background: rgba(190, 32, 28, .9); }
.campo > * { position: relative; }
.campo h2 { color: #fff; }
.labs { display: grid; gap: 0; }
.lab { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.lab .kicker { font: 700 14px/1.3 var(--head); }
.lab h3 { font-size: 26px; }
.lab img { border-radius: 10px; width: 100%; }
.agenda { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.agenda-day { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.agenda-day h4 { font-size: 18px; margin-bottom: 14px; }
.agenda dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.agenda dt { font-weight: 700; color: var(--red); white-space: nowrap; }
.agenda dd { margin: 0; }
.dormire { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 32px; }
.dormire-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px; text-align: center; }
.dormire-contact { font: 700 18px/1.6 var(--head); }

@media (max-width: 900px) {
  .hero-grid, .hero-grid-flip, .band-row, .festa, .lab { grid-template-columns: 1fr; gap: 28px; }
  .hero-grid-flip > div:first-child { order: 2; }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .agenda { grid-template-columns: 1fr; }
  .lab img { order: -1; }
  .se-hero { padding: 36px 0; }
  .logos-list img { height: 54px; max-width: 160px; }
  .logos-square img { height: 90px; }
  .topbar { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tile img { transition: none; } }
