/* ==========================================================================
   Page-specific compositions (mobile first)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home hero — copy on ivory, a 16:9 video window
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: clip; padding-block: var(--space-6) clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.hero .deco-sun { top: -6%; right: -14%; z-index: 0; }
.hero .deco-branch { display: none; top: 0; right: 0; z-index: 1; --branch-size: min(46vw, 22rem); }
.hero__grid { position: relative; z-index: 2; display: grid; gap: var(--space-7); }
.hero__copy { position: relative; }
.hero__title {
  margin-bottom: var(--space-5);
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  letter-spacing: -0.015em;
}
.hero__title .hero__place {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 0.72rem + 0.5vw, 1.05rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-terracotta-text);
}
.hero__lead { max-width: 30rem; margin-bottom: var(--space-6); }
.hero__media { position: relative; }
.hero .vertical-mark { display: none; }

/* --------------------------------------------------------------------------
   Inner pages hero
   -------------------------------------------------------------------------- */
.page-hero { position: relative; overflow: clip; padding-block: var(--space-6) var(--section-space); }
.page-hero .deco-sun { top: -18%; right: -22%; --sun-size: min(70vw, 30rem); }
.page-hero .deco-branch { display: none; top: 0; right: 0; --branch-size: min(38vw, 16rem); opacity: 0.85; }
.page-hero__inner { position: relative; z-index: 2; display: grid; gap: var(--space-7); }
.page-hero__title { margin-bottom: var(--space-4); font-size: var(--fs-h1); }
.page-hero__lead { max-width: 34rem; }
.page-hero .vertical-mark { display: none; }
.page-hero--plain .page-hero__inner { gap: var(--space-4); }
.page-hero--emblem .deco { display: none; }
.page-hero__media { width: 100%; max-width: 34rem; }
.page-hero__media--portrait { max-width: 22rem; }

/* --------------------------------------------------------------------------
   "Il Dojo" feature (home): one contained photo + text, image beside the copy
   -------------------------------------------------------------------------- */
.feature { display: grid; gap: var(--space-6); }
.feature__media { width: 100%; max-width: 22rem; margin-inline: auto; }
.feature__media .media { aspect-ratio: 4 / 3; }
.feature__body h2 { margin-bottom: var(--space-4); }
.feature__body p { max-width: 34rem; }

/* --------------------------------------------------------------------------
   Course page: emblem panel + one centred reading column, galleries at full width
   -------------------------------------------------------------------------- */
.course-body { display: grid; gap: var(--space-6); }          /* safeguarding: side title + main column */
.side-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-terracotta-text);
}
.course-text .prose { margin-inline: auto; }
.course-text .prose,
.course-text .lead-p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.course-text .lead-p {
  max-width: none;
  margin-bottom: 1.2em;
  padding-left: 0;
  border-left: 0;
  color: inherit;
}
.subject + .subject { margin-top: var(--space-8); }
.subject__title { font-size: var(--fs-h3); margin-bottom: var(--space-3); }
.subject .pgrid { margin-top: var(--space-6); }
.quote-block {
  position: relative;
  margin: var(--space-7) 0 0;
  padding: var(--space-6) 0 0 0;
  max-width: 40rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  line-height: 1.5;
}
.quote-block::before { content: ""; position: absolute; top: 0; left: 0; width: 3rem; height: 2px; background: var(--color-brand-terracotta); }

.emblem {
  --emblem-bg: var(--color-bg-soft);
  --motif-fill: var(--emblem-bg);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
  background: var(--emblem-bg);
  border-radius: var(--radius-medium);
}
.emblem--clay { --emblem-bg: var(--color-clay-soft); }
.emblem--sage { --emblem-bg: var(--color-sage-soft); }
.emblem::after { content: ""; position: absolute; inset: 0.9rem; border: 1px solid var(--color-border-strong); border-radius: calc(var(--radius-medium) - 0.5rem); pointer-events: none; }
.emblem__kanji {
  writing-mode: vertical-rl;
  font-family: var(--font-kanji);
  font-size: clamp(4.5rem, 3.4rem + 3.4vw, 7rem);
  line-height: 1.14;
  letter-spacing: 0.1em;
  color: var(--color-ink-green);
  opacity: 0.88;
  user-select: none;
}
.emblem__motif { width: 58%; height: auto; stroke: var(--color-ink-green); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }

/* --------------------------------------------------------------------------
   Blog index + article
   -------------------------------------------------------------------------- */
.post-list { max-width: 62rem; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-border); }
.post-list__item { margin: 0; border-bottom: 1px solid var(--color-border); }
.post-list__link {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-6);
  color: var(--color-text);
  text-decoration: none;
}
.post-list__thumb { max-width: 12rem; }
.post-list__title { margin: 0 0 var(--space-2); font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); line-height: 1.22; transition: color var(--dur-1) var(--ease); }
.post-list__link:hover .post-list__title { color: var(--color-terracotta-text); }
.post-list__excerpt { margin: var(--space-2) 0 0; color: var(--color-text-muted); max-width: 40rem; }

.article-head { padding-block: var(--space-6) var(--space-7); }
.article-head__inner { max-width: 52rem; }
.article-title { font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem); margin-bottom: var(--space-4); }
.article-cover { margin-top: var(--space-6); }
.article-cover .media { aspect-ratio: 16 / 9; }
.article-body { padding-bottom: var(--space-7); }
.article-body .prose { margin-inline: auto; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.8; }
.article-body .prose figure { margin: 2.2em 0; }
.article-body .prose figure .media { border-radius: var(--radius-small); }
.article-body .prose figure img { height: auto; }
.article-foot { max-width: var(--container-text); margin-inline: auto; }
.article-foot h2 { font-size: var(--fs-h3); }

/* --------------------------------------------------------------------------
   Contatti
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--space-8); }
.contact-card { padding: clamp(1.5rem, 1rem + 2.5vw, 3rem); background: var(--color-bg-paper); border: 1px solid var(--color-border); border-radius: var(--radius-small); box-shadow: 6px 6px 0 var(--color-clay); }
.contact-card address { font-style: normal; margin-bottom: var(--space-5); font-size: var(--fs-lead); line-height: 1.5; }
.contact-card__label { margin: var(--space-5) 0 var(--space-1); font-size: var(--fs-h4); }
.contact-card p { margin-bottom: var(--space-3); }
.contact-card .btn-row { margin-top: var(--space-6); }
.directions { position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; min-height: 15rem; padding: var(--space-6); text-align: center; border-radius: var(--radius-small); background: var(--color-sage-soft); }
.directions::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../images/ui/waves-pattern.svg") repeat center / 22rem auto; opacity: 0.35; }
.directions p { margin-bottom: var(--space-4); }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound { position: relative; overflow: clip; padding-block: clamp(4rem, 3rem + 8vw, 9rem); text-align: center; }
.notfound .deco-enso { top: 50%; left: 50%; transform: translate(-50%, -50%); --enso-size: min(90vw, 34rem); opacity: 0.7; z-index: 0; }
.notfound__inner { position: relative; z-index: 1; }
.notfound h1 { max-width: 16ch; margin-inline: auto; }
.notfound .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   Dojo page banner + gallery pages
   -------------------------------------------------------------------------- */
.media--banner { aspect-ratio: 16 / 10; }

/* ==========================================================================
   v012 — PRANAVIA as master brand: hero, "il luogo", chapters 01 Dojo / 02 Studio,
   place pages (/dojo/, /studio/), course → place links, Spazi grouped by place.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home hero: one word ("Pranavia"), then what happens there, then where
   -------------------------------------------------------------------------- */
.hero__title .hero__brand {
  display: block;
  font-size: clamp(3.4rem, 1.6rem + 5vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.hero__title .hero__claim {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.08rem + 1.15vw, 2.1rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--color-text);
}
.hero__title .hero__place { color: var(--color-brand-teal-deep); }

/* --------------------------------------------------------------------------
   Places wrapper: the threshold bar stays sticky only while the places are on screen
   -------------------------------------------------------------------------- */
.places { position: relative; }

/* --------------------------------------------------------------------------
   "Il luogo": the manifesto (three rooms, two places, one Pranavia)
   -------------------------------------------------------------------------- */
.intro-place { position: relative; overflow: clip; padding-block: clamp(2.5rem, 1.5rem + 3vw, 5rem); }
.intro-place__grid { display: grid; gap: var(--space-7); }
.intro-place__title {
  margin-bottom: var(--space-6);
  font-size: clamp(2.2rem, 1.45rem + 3.1vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.intro-place__title span { display: block; }
.intro-place__title em { font-style: italic; font-weight: 400; color: var(--color-brand-teal-deep); }
.intro-place__text { max-width: 36rem; }
.intro-place__text strong { font-weight: 600; }
.intro-place__text .is-dojo-word { color: var(--place-dojo-text); }
.intro-place__text .is-studio-word { color: var(--place-studio-text); }
.intro-place__media { width: min(100%, 20rem); margin: 0 0 0 auto; }
.intro-place__media .media { aspect-ratio: 4 / 5; }
.intro-place__media figcaption { margin-top: var(--space-3); font-size: var(--fs-small); color: var(--color-text-muted); }

/* --------------------------------------------------------------------------
   Chapters (home): 01 Dojo = full-bleed photograph + sticky head + index; 02 Studio = two staggered rooms
   -------------------------------------------------------------------------- */
.chapter { position: relative; }
.chapter--dojo { padding-block: var(--section-space); background-color: var(--color-bg-soft); background-image: var(--paper-grain); }
.chapter--studio { padding-block: var(--section-space); background-color: var(--place-studio-soft); background-image: var(--paper-grain); overflow: clip; }

.chapter__grid { display: grid; gap: var(--space-7); }
.chapter__head { position: relative; }
.chapter__num {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 var(--space-3);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--place-text);
}
.chapter__num span { font-family: var(--font-display); font-size: 1.6rem; font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; }
.chapter__title { margin-bottom: var(--space-5); font-size: clamp(3rem, 2rem + 4.4vw, 6rem); line-height: 1; letter-spacing: -0.015em; }
.chapter__kanji {
  position: absolute;
  top: 0;
  right: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-kanji);
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--place-accent) 38%, transparent);
  user-select: none;
}
.chapter__lead { max-width: 30rem; }
.chapter__head p:not(.chapter__num) { max-width: 32rem; }
.chapter__head .chapter__quote {
  position: relative;
  margin: var(--space-6) 0;
  padding-top: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem);
  font-style: italic;
  line-height: 1.5;
}
.chapter__head .chapter__quote::before { content: ""; position: absolute; top: 0; left: 0; width: 2.5rem; height: 2px; background: var(--place-accent); }
.chapter__cta { margin-top: var(--space-6); }

/* 02 Studio: two rooms, two photographs — staggered, never side by side */
.duo { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.duo__a { grid-column: 1 / 11; grid-row: 1; }
.duo__b { grid-column: 4 / 13; grid-row: 2; margin-top: -16%; z-index: 1; box-shadow: var(--shadow-soft); }
.duo .media { aspect-ratio: 3 / 2; }
.duo__caption {
  grid-column: 1 / 4;
  grid-row: 2;
  align-self: end;
  margin: 0;
  padding: 0 var(--space-3) var(--space-2) 0;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--place-text);
}
.chapter--studio .disciplines { margin-top: var(--space-6); }

/* --------------------------------------------------------------------------
   Place pages (/dojo/, /studio/) and course → place links
   -------------------------------------------------------------------------- */
.place-hero .page-hero__title { font-size: clamp(3rem, 2rem + 4.4vw, 6rem); line-height: 1; }
.place-intro { display: grid; gap: var(--space-7); }
.place-intro__head h2 { margin-bottom: var(--space-4); }
.place-intro__head p { max-width: 30rem; color: var(--color-text-muted); }

.related-place { display: grid; gap: var(--space-6); }
.related-place__head h2 { margin-bottom: var(--space-3); font-size: var(--fs-h3); }

/* --------------------------------------------------------------------------
   Spazi: one gallery per place, same bento tiles
   -------------------------------------------------------------------------- */
.space-group + .space-group { margin-top: var(--space-8); }
.space-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-5); }
.space-group__head h2 { margin: 0; font-size: var(--fs-h3); }
.space-group__head .place-tag { margin: 0; }
.space-group__head p { margin: 0; color: var(--color-text-muted); font-size: var(--fs-small); }

/* --------------------------------------------------------------------------
   Breakpoints for the v012 compositions
   -------------------------------------------------------------------------- */
@media (min-width: 48em) {
  .gbento.gbento--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-place { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); align-items: start; }
  .place-intro { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); align-items: start; }
  .intro-place__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: var(--space-7); }
  .intro-place__media { width: 100%; max-width: 17rem; margin-top: var(--space-6); }
}
@media (min-width: 64em) {
  .gbento.gbento--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 14rem; }
  .intro-place__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; gap: var(--space-9); }
  .intro-place__media { max-width: 19rem; margin-top: var(--space-6); }

  /* the two columns share one height: the head sets it, the index rows spread evenly across it,
     so the list starts with the "01" label and ends with the "Entra nel Dojo" button */
  .chapter--dojo .chapter__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-9); align-items: stretch; }
  .chapter--dojo .chapter__head { display: flex; flex-direction: column; align-items: flex-start; }
  .chapter--dojo .chapter__cta { margin-top: auto; }
  .chapter--dojo .chapter__body { display: flex; flex-direction: column; }
  .chapter--dojo .chapter__body .disciplines { display: flex; flex: 1 1 auto; flex-direction: column; }
  .chapter--dojo .chapter__body .disciplines > li { display: flex; flex: 1 1 0; }
  .chapter--dojo .chapter__body .discipline { flex: 1 1 auto; }

  .chapter--studio .chapter__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-9); align-items: center; }
  .related-place { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* "the other place": a quiet link from /dojo/ to /studio/ and back */
.place-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-6);
  border-block: 1px solid var(--color-border-strong);
  color: var(--color-text);
  text-decoration: none;
}
.place-next .place-tag { grid-column: 1 / -1; margin: 0; }
.place-next__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.2; transition: color var(--dur-2) var(--ease); }
.place-next__arrow { width: 1.5rem; height: 1.5rem; color: var(--place-text); transition: transform var(--dur-2) var(--ease); }
.place-next:hover .place-next__title { color: var(--place-text); }
.place-next:hover .place-next__arrow { transform: translateX(6px); }
.intro-place .eyebrow { color: var(--color-brand-teal-deep); }

/* phones: the hero already shows the entrance, and the chapters carry the photography — keep the scroll short */
@media (max-width: 47.99em) {
  .intro-place__media { display: none; }
}

/* ==========================================================================
   v013 - calendario e orari dinamici: composizioni di pagina
   ========================================================================== */

/* course pages: "Orari del corso" is one card with the times of that course */
.course-schedule__card {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.5rem, 1rem + 2.2vw, 2.75rem);
  background: var(--color-bg-paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}
.course-schedule__head .place-tag { margin-bottom: var(--space-2); }
.course-schedule__head h2 { margin: 0; font-size: var(--fs-h3); }
.course-schedule__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }

/* /dojo/ and /studio/: the week of the place, under the list of disciplines */
.place-schedule .place-intro { padding-top: var(--space-7); border-top: 1px solid var(--color-border-strong); }
.place-schedule .place-intro__head .link-arrow { margin-top: var(--space-2); }
