/* =========================================================
   Shotokan Enna — foglio di stile unico
   Materiali: legno (struttura) · carta washi (contenuto)
   inchiostro sumi (testo) · rosso sigillo (un solo accento)
   ========================================================= */

:root {
  /* --- colori --- */
  --sumi:        #14110e;   /* inchiostro */
  --sumi-2:      #3f382f;   /* testo secondario */
  --sumi-3:      #6d6459;   /* didascalie */
  --washi:       #f3efe6;   /* carta */
  --washi-2:     #e8e1d3;   /* carta in ombra */
  --hinoki:      #d8bd97;   /* legno chiaro */
  --keyaki:      #a5754a;   /* legno medio */
  --kuri:        #6a4529;   /* legno scuro */
  --kuri-deep:   #2f1e11;   /* legno notte */
  --shu:         #992b21;   /* rosso del sigillo */
  --line:        rgba(20, 17, 14, .14);
  --line-strong: rgba(20, 17, 14, .28);
  --line-light:  rgba(243, 239, 230, .22);

  /* fibra della carta: rumore grigio al 6%, cucito per ripetersi senza giunte */
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");

  /* --- tipografia --- */
  --display: "Zen Old Mincho", "Noto Serif JP", Georgia, "Times New Roman", serif;
  --body:    "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* --- misure --- */
  --max: 1140px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 128px);
}

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

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

body {
  margin: 0;
  background-color: var(--washi);
  background-image: var(--fiber);
  background-size: 160px 160px;
  color: var(--sumi);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .2vw, 1.06rem);
  line-height: 1.78;
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -.005em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: rgba(153, 43, 33, .16); }

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

/* ---------- impalcatura ---------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}
.wrap--narrow { max-width: 760px; }

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(44px, 6vw, 80px); }

/* ---------- materiali ---------- */
/* venatura verticale: pannelli e pareti */
.wood-v {
  background-color: var(--kuri);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.11) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 11px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 1px, transparent 1px 23px),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.28));
}
/* venatura orizzontale: travi, aste, listelli */
.wood-h {
  background-color: var(--keyaki);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(0,0,0,.30));
}

.paper {
  background: var(--washi);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 18px 40px -28px rgba(47, 30, 17, .55);
}

/* ---------- etichette e filetti ---------- */
.eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--sumi-3);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.eyebrow--light { color: rgba(243,239,230,.72); }
.eyebrow--light::after { background: var(--line-light); }

.kanji-num {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--keyaki);
  line-height: 1;
  display: block;
  margin-bottom: .9rem;
}

/* sigillo (hanko) */
.seal {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--shu);
  color: #fff;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  padding-top: 2px;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow: 0 6px 18px -10px rgba(153,43,33,.9);
}
.seal--sm { width: 34px; height: 34px; font-size: 1rem; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.5rem;
  font-family: var(--body);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid var(--sumi);
  background: var(--sumi);
  color: var(--washi);
  transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--shu); border-color: var(--shu); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--sumi); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--sumi); color: var(--washi); border-color: var(--sumi); }

.btn--light { background: var(--washi); color: var(--sumi); border-color: var(--washi); }
.btn--light:hover { background: var(--shu); color: #fff; border-color: var(--shu); }

.btn--outline-light { background: transparent; color: var(--washi); border-color: var(--line-light); }
.btn--outline-light:hover { background: var(--washi); color: var(--sumi); border-color: var(--washi); }

/* =========================================================
   TESTATA — una trave di legno sopra la carta
   ========================================================= */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sumi);
  color: var(--washi);
  padding: .8rem 1.2rem;
  z-index: 200;
}
.skip:focus { left: 8px; top: 8px; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 239, 230, .93);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.site-head::before {
  content: "";
  display: block;
  height: 6px;
  background-color: var(--keyaki);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(0,0,0,.34));
}
.site-head.is-stuck { box-shadow: 0 12px 30px -24px rgba(47,30,17,.8); }

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .9rem;
}

.brand { display: flex; align-items: center; gap: .85rem; }
.brand-seal {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--shu);
  color: #fff;
  font-family: var(--display);
  font-size: 1.2rem;
  border-radius: 3px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--display); font-size: 1.06rem; font-weight: 600; }
.brand-sub { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sumi-3); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a {
  font-size: .9rem;
  color: var(--sumi-2);
  padding-block: .3rem;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--sumi); border-color: var(--shu); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%; margin-left: -9px;
  width: 18px; height: 1.5px;
  background: var(--sumi);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span { top: 50%; margin-top: -.75px; }
.nav-toggle span::before { top: -6px; margin-left: 0; left: 0; }
.nav-toggle span::after  { top: 6px;  margin-left: 0; left: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   HERO — parete di legno con kakejiku (rotolo) sospeso
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(72px, 11vw, 148px) clamp(72px, 10vw, 132px);
  overflow: hidden;
  background-color: var(--kuri-deep);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(216,189,151,.055) 0 2px, transparent 2px 13px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 1px, transparent 1px 29px),
    linear-gradient(165deg, #55351d 0%, #2f1e11 55%, #23150b 100%);
  color: var(--washi);
}
/* fotografia reale del pavimento del dōjō, in trasparenza */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-photo, none) center/cover no-repeat;
  opacity: .17;
  mix-blend-mode: soft-light;
}
/* luce radente, come da una finestra alta */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 80% at 78% -10%, rgba(216,189,151,.30), transparent 58%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 1.4rem + 4.4vw, 4.35rem);
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 1.5rem;
  max-width: 15ch;
}
.hero-lead {
  font-size: clamp(1.02rem, .98rem + .3vw, 1.16rem);
  color: rgba(243, 239, 230, .82);
  max-width: 54ch;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero-meta {
  margin-top: 2.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2.6rem;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(243, 239, 230, .62);
}

/* --- il kakejiku: elemento firma della pagina --- */
.kakejiku {
  position: relative;
  width: clamp(190px, 20vw, 250px);
  justify-self: end;
  padding: 2.6rem 1.4rem 2.2rem;
  background: linear-gradient(180deg, #f6f2e9, #e9e1d0);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.85);
  display: grid;
  justify-items: center;
  gap: 1.6rem;
}
/* aste di legno superiore e inferiore */
.kakejiku::before,
.kakejiku::after {
  content: "";
  position: absolute;
  left: -14px; right: -14px;
  height: 14px;
  background-color: var(--kuri);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.20) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255,255,255,.30), rgba(0,0,0,.45));
  border-radius: 2px;
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.9);
}
.kakejiku::before { top: -14px; }
.kakejiku::after  { bottom: -14px; }

.kakejiku-column {
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: clamp(1.9rem, 2.4vw, 2.5rem);
  letter-spacing: .22em;
  color: var(--sumi);
  line-height: 1;
}
.kakejiku-romaji {
  writing-mode: horizontal-tb;
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sumi-3);
  text-align: center;
}

/* =========================================================
   DIVISORIO SHOJI — luce filtrata da un telaio di carta
   ========================================================= */
.shoji {
  height: 46px;
  background:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 62px),
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, var(--washi-2), var(--washi));
  border-block: 1px solid var(--line);
}

/* =========================================================
   TITOLI DI SEZIONE
   ========================================================= */
.section-head { margin-bottom: clamp(2.4rem, 4vw, 3.6rem); max-width: 62ch; }
.section-head h2 {
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem);
  line-height: 1.22;
  font-weight: 400;
  margin-bottom: .9rem;
}
.section-head p { color: var(--sumi-2); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .eyebrow::after { display: none; }
.section-head--center .eyebrow::before {
  content: "";
  width: 26px; height: 1px; background: var(--line);
}

/* =========================================================
   LEZIONE — tre listelli di legno, in ordine reale
   ========================================================= */
.slats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.slat {
  background: var(--washi);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  position: relative;
  transition: background .3s ease;
}
.slat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background-color: var(--keyaki);
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 4px);
  opacity: .55;
  transition: opacity .3s ease;
}
.slat:hover { background: #f7f3ea; }
.slat:hover::before { opacity: 1; }
.slat h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: .2rem;
}
.slat .jp {
  font-family: var(--display);
  font-size: .9rem;
  color: var(--sumi-3);
  letter-spacing: .14em;
  display: block;
  margin-bottom: .9rem;
}
.slat p { color: var(--sumi-2); font-size: .97rem; margin: 0; }

/* =========================================================
   IL MAESTRO
   ========================================================= */
.figure-split {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.framed {
  position: relative;
  padding: 12px;
  background-color: var(--keyaki);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.13) 0 1px, transparent 1px 4px),
    linear-gradient(150deg, rgba(255,255,255,.24), rgba(0,0,0,.30));
  box-shadow: 0 34px 60px -40px rgba(47,30,17,.9);
}
.framed img { width: 100%; }
.framed figcaption {
  position: absolute;
  left: 12px; bottom: 12px; right: 12px;
  background: rgba(243,239,230,.94);
  color: var(--sumi-2);
  font-size: .78rem;
  letter-spacing: .04em;
  padding: .7rem .9rem;
}

.prose p { color: var(--sumi-2); }
.prose p + p { margin-top: 0; }
.prose .lead {
  font-family: var(--display);
  font-size: clamp(1.18rem, 1.05rem + .5vw, 1.45rem);
  line-height: 1.55;
  color: var(--sumi);
  margin-bottom: 1.4rem;
}

.quiet-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.quiet-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.2rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.quiet-list dt, .quiet-list .k {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sumi-3);
  padding-top: .28rem;
}
.quiet-list .v { color: var(--sumi-2); }


/* --- sezione Maestro: layout calibrato per fotografia orizzontale --- */
.figure-split--maestro {
  width: min(100% - (var(--gutter) * 2), 1280px);
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr);
  gap: clamp(2.25rem, 4vw, 4.25rem);
  align-items: start;
}
.framed--maestro {
  padding: 10px;
}
.framed--maestro img {
  width: 100%;
  aspect-ratio: 20 / 9;
  object-fit: cover;
  object-position: center;
}
.framed--maestro figcaption {
  position: static;
  background: rgba(243,239,230,.97);
  border-top: 1px solid rgba(20,17,14,.10);
  padding: .8rem .95rem .72rem;
  line-height: 1.45;
}
.figure-split--maestro .prose .lead {
  margin-bottom: 1rem;
}
.figure-split--maestro .prose p {
  line-height: 1.68;
}
.figure-split--maestro .quiet-list {
  margin-top: 1.35rem;
}
.figure-split--maestro .quiet-list li {
  padding: .72rem 0;
}

/* =========================================================
   LIGNAGGIO — banda scura, calligrafia
   ========================================================= */
.band {
  background-color: var(--kuri-deep);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(216,189,151,.05) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #40280f, #241609);
  color: var(--washi);
}
.band h2 { color: var(--washi); }
.band p { color: rgba(243,239,230,.78); }

.lineage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-light);
  margin-top: 3rem;
}
.lineage > div {
  background-color: rgba(20, 12, 6, .35);
  padding: clamp(1.6rem, 3vw, 2.2rem);
}
.lineage .jp {
  font-family: var(--display);
  font-size: 1.7rem;
  display: block;
  margin-bottom: .6rem;
  color: var(--hinoki);
}
.lineage h3 { font-size: 1.06rem; font-weight: 600; margin-bottom: .5rem; color: var(--washi); }
.lineage p { font-size: .93rem; margin: 0; }

/* =========================================================
   A CHI SI RIVOLGE
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f7f3ea, var(--washi));
  transition: border-color .3s ease, transform .3s ease;
}
.card:hover { border-color: var(--keyaki); transform: translateY(-3px); }
.card h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: .5rem; }
.card .age {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--shu);
  display: block;
  margin-bottom: .9rem;
}
.card p { font-size: .96rem; color: var(--sumi-2); margin: 0; }

/* =========================================================
   DŌJŌ KUN — cinque righe di inchiostro
   ========================================================= */
.kun { border-top: 1px solid var(--line-strong); }
.kun-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 220px) 1fr;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: baseline;
  padding: clamp(1.4rem, 2.6vw, 2rem) 0;
  border-bottom: 1px solid var(--line);
}
.kun-row .n {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--keyaki);
  line-height: 1;
}
.kun-row .jp {
  font-family: var(--display);
  font-size: 1.06rem;
  line-height: 1.7;
}
.kun-row .romaji {
  display: block;
  font-family: var(--body);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sumi-3);
  margin-top: .35rem;
}
.kun-row .it { color: var(--sumi-2); }
.kun-row .it strong { font-weight: 500; color: var(--sumi); }

/* =========================================================
   CONTATTI
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-block + .contact-block { margin-top: 2.2rem; }
.contact-block h3 {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-family: var(--body);
  font-weight: 500;
  color: var(--sumi-3);
  margin-bottom: .6rem;
}
.contact-block a { border-bottom: 1px solid var(--line-strong); }
.contact-block a:hover { color: var(--shu); border-color: var(--shu); }

.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { text-align: left; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 500; color: var(--sumi); width: 42%; }
.hours td { color: var(--sumi-2); }
.hours caption {
  text-align: left;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sumi-3);
  padding-bottom: .6rem;
}

.map-frame {
  border: 12px solid transparent;
  background:
    linear-gradient(var(--washi), var(--washi)) padding-box,
    linear-gradient(150deg, var(--hinoki), var(--kuri)) border-box;
  aspect-ratio: 4 / 3;
  width: 100%;
}
.map-frame { position: relative; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; filter: saturate(.72) contrast(1.02); }

/* =========================================================
   GALLERIA — vetrina incorniciata in legno + etichetta museale
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: clamp(1.2rem, 2.5vw, 2rem);
  align-items: start;
}
.viewer {
  position: relative;
  padding: 14px;
  background-color: var(--kuri);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 4px),
    linear-gradient(150deg, rgba(255,255,255,.20), rgba(0,0,0,.34));
  box-shadow: 0 40px 70px -46px rgba(47,30,17,.95);
}
.stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1b1109;
}
.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* la fotografia si vede intera, come in una teca */
  opacity: 0;
  transition: opacity .7s ease;
}
.stage img.is-active { opacity: 1; }

.stage-nav {
  position: absolute;
  inset: auto 14px 14px auto;
  display: flex;
  gap: 6px;
}
.stage-nav button {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(243,239,230,.9);
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  color: var(--sumi);
  transition: background .2s ease, color .2s ease;
}
.stage-nav button:hover { background: var(--shu); color: #fff; }

.plaque {
  background: var(--washi);
  padding: 1.1rem 1.3rem;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
}
.plaque strong { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.plaque span { color: var(--sumi-2); font-size: .92rem; }
.plaque .count {
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--sumi-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.thumbs {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.thumbs button {
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  opacity: .55;
  transition: opacity .25s ease, border-color .25s ease;
  display: block;
}
.thumbs button img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.thumbs button:hover { opacity: .85; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--shu); }

/* =========================================================
   HEIJŌSHIN — la calligrafia appesa
   ========================================================= */
.scroll-split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: clamp(2.4rem, 6vw, 5rem);
  align-items: center;
}
.hanging {
  position: relative;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, #f8f5ee, #ece5d6);
  box-shadow: 0 34px 60px -40px rgba(47,30,17,.8);
  max-width: 380px;
  margin-inline: auto;
}
.hanging::before,
.hanging::after {
  content: "";
  position: absolute;
  left: -16px; right: -16px;
  height: 15px;
  background-color: var(--kuri);
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.20) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255,255,255,.30), rgba(0,0,0,.45));
  border-radius: 2px;
}
.hanging::before { top: -15px; }
.hanging::after { bottom: -15px; }
.hanging img { width: 100%; }

.romaji-block {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: .16em;
  line-height: 2;
  color: var(--shu);
  margin-bottom: 1.6rem;
  text-transform: uppercase;
}

/* =========================================================
   PRINCIPI ESTESI
   ========================================================= */
.principle {
  padding: clamp(1.8rem, 3.4vw, 2.8rem) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(1rem, 3vw, 2.4rem);
}
.principle:first-of-type { border-top: 1px solid var(--line-strong); }
.principle .n {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--keyaki);
  line-height: 1;
}
.principle h3 {
  font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: .4rem;
}
.principle .gloss { display: block; color: var(--shu); font-size: .95rem; font-family: var(--body); font-weight: 500; margin-top: .3rem; }
.principle p { color: var(--sumi-2); margin-top: 1rem; }

/* venti precetti */
.nijukun {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line-strong);
}
.nijukun li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.nijukun { list-style: none; padding: 0; margin: 0; counter-reset: kun; }
.nijukun li::before {
  counter-increment: kun;
  content: counter(kun);
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--keyaki);
  font-variant-numeric: tabular-nums;
  padding-top: .2rem;
}
.nijukun .jp { font-family: var(--display); font-size: 1rem; line-height: 1.7; display: block; }
.nijukun .romaji { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--sumi-3); display: block; margin: .3rem 0 .5rem; }
.nijukun .it { color: var(--sumi-2); font-size: .95rem; }

/* =========================================================
   CHIAMATA FINALE + PIEDE
   ========================================================= */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 400; margin-bottom: 1rem; }
.cta-band p { max-width: 56ch; margin-inline: auto; margin-bottom: 2rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; }

.site-foot {
  background-color: var(--kuri-deep);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(216,189,151,.05) 0 2px, transparent 2px 15px),
    linear-gradient(180deg, #34200f, #1d1108);
  color: rgba(243,239,230,.72);
  font-size: .9rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-light);
}
.site-foot h3 {
  font-family: var(--body);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hinoki);
  margin-bottom: .9rem;
  font-weight: 500;
}
.site-foot .brand-name { color: var(--washi); }
.site-foot .brand-sub { color: rgba(243,239,230,.55); }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-foot a:hover { color: var(--washi); }
.foot-bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  color: rgba(243,239,230,.52);
}
.foot-emblem { width: 74px; opacity: .9; margin-bottom: 1rem; }

/* =========================================================
   MOVIMENTO — una sola idea: il contenuto emerge dalla carta
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* =========================================================
   ADATTAMENTO — tablet e telefono
   ========================================================= */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .kakejiku { justify-self: start; margin-top: 2.5rem; }
  .figure-split,
  .scroll-split,
  .contact-grid { grid-template-columns: 1fr; }
  .figure-split--maestro { width: min(100% - (var(--gutter) * 2), var(--max)); }
  .framed--maestro { max-width: 760px; width: 100%; justify-self: center; }
  .slats, .cards, .lineage { grid-template-columns: 1fr; }
  .lineage > div { padding-block: 1.6rem; }
  .nijukun { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .thumbs {
    grid-auto-flow: column;
    grid-auto-columns: 92px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
  }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--washi);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.2rem;
    box-shadow: 0 20px 40px -30px rgba(47,30,17,.9);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .9rem; justify-content: center; border-bottom: 1px solid var(--sumi); }

  .kun-row { grid-template-columns: 34px 1fr; }
  .kun-row .it { grid-column: 2; }
  .principle { grid-template-columns: 38px 1fr; }
  .quiet-list li { grid-template-columns: 1fr; gap: .2rem; }
  .plaque { flex-direction: column; gap: .4rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: .8rem 1.6rem; font-size: .74rem; }
}

/* =========================================================
   STAMPA
   ========================================================= */
@media print {
  .site-head, .stage-nav, .thumbs, .hero-actions, .cta-actions { display: none; }
  body { background: #fff; color: #000; }
  .hero, .band, .site-foot { background: #fff !important; color: #000 !important; }
}

/* fotografia del pavimento reale del dōjō, usata come velatura nell'hero */
.hero { --hero-photo: url("../img/legno.webp"); }

/* ---------- utilità di sezione ---------- */
.tint-up   { background: var(--fiber) 0 0 / 160px 160px, linear-gradient(180deg, #efe9dd, var(--washi)); border-block: 1px solid var(--line); }
.tint-down { background: var(--fiber) 0 0 / 160px 160px, linear-gradient(180deg, var(--washi), #efe9dd); border-block: 1px solid var(--line); }
.framed    { margin: 0; }
.h-quiet   { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); font-weight: 400; line-height: 1.22; margin-bottom: 1.2rem; }
.hero--page { padding-block: clamp(56px, 8vw, 104px); }
.hero--page h1 { max-width: 20ch; }

/* i comandi della galleria vivono dentro la teca */
.stage-nav { inset: auto 12px 12px auto; }


/* =========================================================
   V2 — identità S.K.I. / fotografia reale / interfaccia chiara
   ========================================================= */
@media screen {
  :root {
    --sumi: #181818;
    --sumi-2: #393939;
    --sumi-3: #6c6965;
    --washi: #f7f4ef;
    --washi-2: #ece8e1;
    --hinoki: #e5ded3;
    --keyaki: #b99b7b;
    --kuri: #4a3425;
    --kuri-deep: #151515;
    --shu: #c51d28;
    --line: rgba(24,24,24,.11);
    --line-strong: rgba(24,24,24,.22);
    --line-light: rgba(255,255,255,.22);
  }

  body {
    background: var(--washi);
    background-image: none;
    color: var(--sumi);
  }

  .site-head {
    background: rgba(249,247,243,.94);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(24,24,24,.08);
    box-shadow: none;
  }
  .site-head::before { display:none; }
  .head-inner { min-height: 78px; }
  .brand { gap:.8rem; }
  .brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    background:#fff;
    box-shadow: 0 7px 22px rgba(0,0,0,.10);
  }
  .brand-name { font-weight:600; letter-spacing:.01em; }
  .brand-sub { color: var(--sumi-3); }
  .nav a { color:#222; }
  .nav a:not(.btn)::after { background:var(--shu); }
  .nav .btn { background:#171717; border-color:#171717; color:#fff; }
  .nav .btn:hover { background:var(--shu); border-color:var(--shu); }

  /* Hero: vera fotografia di ambiente, testo ad alto contrasto */
  .hero {
    min-height: min(790px, calc(100vh - 78px));
    display:flex;
    align-items:center;
    padding-block: clamp(86px, 12vw, 150px);
    background-color:#151515;
    background-image:
      linear-gradient(90deg, rgba(9,9,9,.88) 0%, rgba(9,9,9,.72) 37%, rgba(9,9,9,.28) 67%, rgba(9,9,9,.16) 100%),
      linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.24)),
      url("../img/dojo-akira-ito-wide.webp");
    background-size: cover;
    background-position: center;
    color:#fff;
  }
  .hero::before {
    background: linear-gradient(90deg, rgba(197,29,40,.16), transparent 28%);
    opacity:1;
    mix-blend-mode:normal;
  }
  .hero::after {
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.22));
  }
  .hero-grid { grid-template-columns:minmax(0,720px) 1fr; }
  .hero h1 {
    font-size: clamp(3rem, 2rem + 4.5vw, 5.6rem);
    line-height:1.02;
    max-width: 11.5ch;
    letter-spacing:-.025em;
    text-shadow: 0 2px 22px rgba(0,0,0,.30);
  }
  .hero-lead { max-width:58ch; color:rgba(255,255,255,.84); font-size:clamp(1.03rem,.98rem + .35vw,1.22rem); }
  .eyebrow--light { color:rgba(255,255,255,.72); }
  .hero-meta { color:rgba(255,255,255,.68); border-color:rgba(255,255,255,.20); }
  .kakejiku { display:none; }
  .shoji { display:none; }
  .hero .btn--light { background:#fff; color:#171717; border-color:#fff; }
  .hero .btn--light:hover { background:var(--shu); color:#fff; border-color:var(--shu); }
  .hero .btn--outline-light { border-color:rgba(255,255,255,.45); background:rgba(0,0,0,.12); }
  .hero .btn--outline-light:hover { background:#fff; color:#171717; }

  /* sezioni editoriali */
  .section { background:#f8f6f2; }
  .section:nth-of-type(even) { background:#fff; }
  .section-head h2, .community-copy h2 { font-size:clamp(2.1rem,1.5rem + 2.6vw,3.6rem); line-height:1.08; }
  .eyebrow { color:#7b7570; font-weight:700; }
  .eyebrow::before { content:""; width:28px; height:2px; background:var(--shu); flex:0 0 auto; }
  .eyebrow::after { opacity:.45; }
  .kanji-num { color:var(--shu); opacity:.72; }

  .slats { gap:1.15rem; }
  .slat {
    background:#fff;
    border:1px solid rgba(24,24,24,.08);
    box-shadow:0 18px 44px -38px rgba(0,0,0,.45);
    border-radius:14px;
    padding:clamp(1.5rem,3vw,2.25rem);
  }
  .slat::before { display:none; }
  .slat h3 { font-size:1.45rem; }

  .tint-up, .tint-down { background:#f1eee8 !important; }
  .framed {
    background:#fff;
    border:0;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 28px 70px -45px rgba(0,0,0,.55);
  }
  .framed::before, .framed::after { display:none; }
  .framed figcaption { background:#171717; color:rgba(255,255,255,.78); border:0; }

  .band {
    background-color:#171717;
    background-image:
      linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.64)),
      url("../img/legno.webp");
    background-size:cover;
    background-position:center;
  }
  .lineage > div { border-color:rgba(255,255,255,.14); }
  .lineage .jp { color:rgba(255,255,255,.22); }

  .cards { gap:1.15rem; }
  .card {
    background:#fff;
    border:1px solid rgba(24,24,24,.08);
    border-top:3px solid transparent;
    border-radius:14px;
    box-shadow:0 18px 44px -38px rgba(0,0,0,.45);
  }
  .card:hover { border-top-color:var(--shu); transform:translateY(-4px); }
  .age { color:var(--shu); font-weight:700; }

  /* vera foto della comunità */
  .community { background:#fff !important; }
  .community-grid {
    display:grid;
    grid-template-columns:minmax(280px,.88fr) minmax(320px,1.12fr);
    align-items:center;
    gap:clamp(2.2rem,6vw,6rem);
  }
  .community-photo {
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 32px 80px -52px rgba(0,0,0,.65);
    max-height:620px;
  }
  .community-photo img { width:100%; height:100%; max-height:620px; object-fit:cover; object-position:center 43%; }
  .community-copy p:not(.eyebrow) { max-width:58ch; color:var(--sumi-2); }
  .text-link { display:inline-flex; align-items:center; gap:.65rem; margin-top:.7rem; font-weight:700; border-bottom:1px solid var(--shu); padding-bottom:.25rem; }
  .text-link span { color:var(--shu); }

  .kun { background:#fff; border-radius:16px; border:1px solid rgba(24,24,24,.08); overflow:hidden; }
  .kun-row { border-color:rgba(24,24,24,.08); }
  .kun-row .n { color:var(--shu); }

  /* Contatti */
  .contact-temp { background:#f8f6f2 !important; }
  .contact-temp-grid { display:grid; grid-template-columns:1.15fr .85fr; gap:clamp(2rem,6vw,5.5rem); align-items:start; }
  .contact-note {
    background:#171717;
    color:#fff;
    border-radius:16px;
    padding:clamp(1.7rem,4vw,2.8rem);
    box-shadow:0 26px 60px -44px rgba(0,0,0,.65);
    border-top:4px solid var(--shu);
  }
  .contact-note-kicker { display:block; text-transform:uppercase; letter-spacing:.14em; font-size:.72rem; color:rgba(255,255,255,.56); margin-bottom:1rem; }
  .contact-note h3 { font-size:clamp(1.4rem,1.1rem + .8vw,2rem); margin-bottom:.8rem; }
  .contact-note p { color:rgba(255,255,255,.72); }
  .contact-note-status { display:inline-block; margin-top:1.2rem; padding:.45rem .7rem; border:1px solid rgba(255,255,255,.18); font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; }

  .cta-band .seal { display:none; }
  .section.band { background-color:#171717 !important; }
  .cta-band h2 { font-size:clamp(2.1rem,1.6rem + 2vw,3.3rem); }
  .cta-band::before { content:"S.K.I."; display:block; color:var(--shu); letter-spacing:.22em; font-weight:700; font-size:.78rem; margin-bottom:1rem; }

  .site-foot { background:#111; border-top:4px solid var(--shu); }
  .foot-emblem { width:82px; height:82px; border-radius:50%; background:#fff; }
  .foot-bottom { border-color:rgba(255,255,255,.12); }

  /* Principles page */
  .hero--page { min-height:460px; }
  .hero--page .wrap { max-width:900px; margin-left:max(var(--gutter), calc((100vw - var(--max))/2)); }
  .gallery { border-radius:18px; overflow:hidden; box-shadow:0 28px 70px -50px rgba(0,0,0,.6); }
  .plaque { background:#171717; color:#fff; }
  .principle, .precept { border-color:rgba(24,24,24,.10); }
}

@media screen and (max-width: 820px) {
  .head-inner { min-height:70px; }
  .brand-logo { width:44px; height:44px; }
  .hero { min-height:690px; background-position:64% center; }
  .hero { background-image:linear-gradient(180deg,rgba(8,8,8,.64) 0%,rgba(8,8,8,.80) 58%,rgba(8,8,8,.88) 100%),url("../img/dojo-akira-ito-wide.webp"); }
  .hero h1 { font-size:clamp(2.8rem,12vw,4.2rem); }
  .hero-grid { grid-template-columns:1fr; }
  .hero-meta { gap:.75rem 1.4rem; }
  .community-grid, .contact-temp-grid { grid-template-columns:1fr; }
  .community-photo { max-height:520px; }
  .community-photo img { max-height:520px; object-position:center 42%; }
}

@media screen and (max-width: 520px) {
  .brand-name { font-size:.92rem; }
  .brand-sub { font-size:.58rem; letter-spacing:.12em; }
  .brand-logo { width:40px; height:40px; }
  .hero { min-height:650px; padding-block:76px 70px; }
  .hero h1 { max-width:9ch; }
  .hero-meta { display:grid; grid-template-columns:1fr; }
  .slat, .card, .contact-note { border-radius:12px; }
}


/* V4 — Dōjō Akira-Ito · contatti e hero widescreen */
.contact-section { background:#f8f6f2; }
.contact-section .contact-grid { align-items:start; }
.hours .pending {
  display:inline-flex;
  align-items:center;
  padding:.32rem .62rem;
  border-radius:999px;
  background:rgba(197,29,40,.07);
  color:var(--shu);
  font-size:.84rem;
  font-weight:600;
}
.contact-status {
  margin-top:1.8rem;
  padding:1.05rem 1.15rem;
  border-left:3px solid var(--shu);
  background:#fff;
  display:grid;
  gap:.25rem;
  box-shadow:0 14px 34px -30px rgba(0,0,0,.4);
}
.contact-status strong { font-family:var(--display); font-size:1.04rem; }
.contact-status span { color:var(--sumi-3); font-size:.88rem; line-height:1.55; }
.map-frame { border-radius:18px; overflow:hidden; box-shadow:0 26px 60px -46px rgba(0,0,0,.62); }
.map-note { font-size:.86rem; color:var(--sumi-3); margin-top:.9rem; }

@media screen and (max-width: 680px) {
  .hours th, .hours td { display:block; width:100%; padding:.55rem 0; }
  .hours th { padding-top:1rem; border-bottom:0; }
  .hours td { padding-top:0; }
}


/* V4 — contatti diretti */
.contact-phone {
  display:inline-block;
  font-family:var(--display);
  font-size:clamp(1.35rem,1.1rem + .8vw,1.8rem);
  font-weight:600;
  margin:.15rem 0 .45rem;
}
.contact-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.1rem; }
.btn--whatsapp { background:#1f9d55; border-color:#1f9d55; color:#fff; }
.btn--whatsapp:hover { background:#167a42; border-color:#167a42; color:#fff; }
.map-link { margin-top:.45rem; }
@media screen and (min-width:821px) {
  .hero { background-position:center 48%; }
}
@media screen and (max-width:820px) {
  .hero { background-position:64% center; }
}
