:root {
  --ink: #2b2b33;
  --muted: #6a6a73;
  --accent: #c4234a;
  --mist: #eef3f4;
  --line: #e4e4e8;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "MacronFix", "Jost", "Avenir Next", "Avenir", system-ui, sans-serif;
  --top: 64px;
}
/* Jost draws ō ū ā badly: use a system font just for Latin Extended-A */
@font-face {
  font-family: "MacronFix";
  src: local("Helvetica Neue"), local("Arial"), local("Liberation Sans"), local("DejaVu Sans"), local("Segoe UI");
  unicode-range: U+0100-017F;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top); }
body { margin: 0; font-family: var(--sans); font-weight: 300; color: var(--ink); line-height: 1.75; background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; }
strong { font-weight: 500; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: .75rem 2rem; text-decoration: none; font-weight: 400; letter-spacing: .03em; transition: background .25s, color .25s; }
.btn:hover { background: #fff; color: var(--accent); }
.btn.small { padding: .45rem 1.3rem; font-size: .95rem; }
.link { text-decoration: none; font-weight: 400; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- top bar ---------- */
.top { position: fixed; inset: 0 0 auto; height: var(--top); z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.5rem; color: #fff; transition: background .3s, color .3s, box-shadow .3s; }
.top.solid { background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(6px); }
.top a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.25rem; opacity: 0; transition: opacity .3s; }
.brand img { height: 34px; width: auto; }
.top.solid .brand { opacity: 1; }
.top nav { display: flex; gap: 2rem; }
.top nav a { font-weight: 400; position: relative; padding: .3rem 0; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--accent); transition: right .3s; }
.top nav a:hover::after, .top nav a.on::after { right: 0; }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 5rem 1.5rem 4rem; position: relative;
  background: linear-gradient(rgba(20,28,20,.35), rgba(20,28,20,.45)), #6f7d68 var(--hero, url(img/tatami.jpg)) center / cover; }
.hero h1 { display: flex; align-items: center; gap: 2rem; font-size: clamp(3rem, 9vw, 6.5rem); margin: 0 0 .8rem; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero h1 img { width: clamp(60px, 8vw, 100px); height: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.hero .tagline { font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 2.5rem; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero .down { position: absolute; bottom: 1.8rem; width: 22px; height: 22px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; transform: rotate(45deg); animation: bob 2s infinite; }
@keyframes bob { 50% { translate: 0 8px; } }

/* ---------- sections ---------- */
.block { padding: 7rem 0; }
.mist { background: var(--mist); }
.head { text-align: center; max-width: 720px; margin: 0 auto 4rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .2em; font-size: .85rem; font-weight: 400; margin: 0 0 .6rem; }
.head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.head .sub { margin-top: 1.5rem; color: var(--muted); }

details summary { cursor: pointer; color: var(--accent); font-weight: 400; list-style: none; margin: .8rem 0; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " +"; }
details[open] summary::after { content: " −"; }

/* ---------- corsi ---------- */
.course { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 3rem; background: var(--tint); }
.course:nth-of-type(even) .pic { order: 2; }
.course .pic img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.course .txt { padding: 3rem; }
.course h3 { font-size: 2rem; }
.course .intro p { margin: 0 0 .8rem; }
.tint-grigio  { --tint: #eeeff1; --mark: #9a9ca3; }
.tint-sabbia  { --tint: #f4efe6; --mark: #b5a383; }
.tint-azzurro { --tint: #e7f7fb; --mark: #6fb8c9; }
.tint-pesca   { --tint: #fcefe0; --mark: #d9a571; }
.hours { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .6rem; }
.hours li { border-left: 3px solid var(--mark); padding: .2rem 0 .2rem 1rem; display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; line-height: 1.5; }
.hours span { text-align: right; }
.hours small { color: var(--muted); grid-column: 1; }
.course .more { font-size: .95rem; }
.teacher { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,.08); }
.teacher img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.teacher p { margin: 0; line-height: 1.4; flex: 1; }

/* ---------- chi siamo ---------- */
.wide { width: 100%; aspect-ratio: 3/1; object-fit: cover; margin-bottom: 3.5rem; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.story p:first-child { margin-top: 0; }
.lead { font-family: var(--serif); font-size: 1.7rem; line-height: 1.3; margin: 0 0 1rem; }
blockquote { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; text-align: center; max-width: 820px; margin: 4rem auto; padding: 0; }
blockquote::before { content: ""; display: block; width: 50px; height: 1px; background: var(--accent); margin: 0 auto 2rem; }
.fade-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.slides { position: relative; display: block; width: 100%; aspect-ratio: 4/3; padding: 0; border: 0; background: #ddd; cursor: zoom-in; overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s ease-in-out; }
.slides img.on { opacity: 1; }

/* ---------- progetti ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.project { display: flex; flex-direction: column; }
.project img { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 1.5rem; }
.project h3 { font-size: 1.5rem; }
.project .testo { flex: 1; font-size: .97rem; }
.project .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 1rem; }

/* ---------- contatti ---------- */
#contatti { border-top: 1px solid var(--line); }
.contacts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3rem; }
.contacts h3 { font-size: 1.2rem; margin: 1.5rem 0 .3rem; }
.contacts h3:first-child { margin-top: 0; }
.contacts p { margin: 0; }
.contacts a { text-decoration: none; }
.box5x1000 { background: var(--mist); padding: 2rem; text-align: center; align-self: start; }
.box5x1000 p { margin: 0; }
.box5x1000 .big { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); margin: .2rem 0 .6rem; }
.map { width: 100%; height: 380px; border: 0; margin-top: 4rem; filter: grayscale(.4); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c9c9cf; text-align: center; padding: 3rem 1.5rem; font-size: .9rem; }
.foot p { margin: .2rem 0; }
.foot .name { font-family: var(--serif); font-size: 1.3rem; color: #fff; }
.social { display: flex; gap: 1.2rem; justify-content: center; margin-bottom: 1.2rem; }
.social a { color: #fff; }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10,10,12,.92); display: none; align-items: center; justify-content: center; z-index: 100; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 1rem; line-height: 1; }
.lightbox .close { top: .5rem; right: .8rem; }
.lightbox .prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity .8s ease, translate .8s ease; }
.js .reveal.seen { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .hero .down { animation: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .course, .story, .fade-boxes { grid-template-columns: 1fr; }
  .course:nth-of-type(even) .pic { order: 0; }
  .course .pic img { min-height: 0; aspect-ratio: 16/10; }
  .course .txt { padding: 2rem 1.5rem; }
  .story { gap: 0; }
  .projects, .contacts { grid-template-columns: 1fr; }
  .block { padding: 4.5rem 0; }
}
@media (max-width: 640px) {
  .top { padding: 0 1rem; }
  .brand { display: none; }
  .top nav { gap: 1.2rem; margin: 0 auto; font-size: .95rem; }
  .hero h1 { gap: 1rem; }
  .hours li { grid-template-columns: 1fr; }
  .hours span { text-align: left; }
}
.foot .areas { margin-top: 1rem; font-size: .8rem; color: #9a9aa2; }
