/* The photograph keeps its original 3:2 frame at every viewport size. */
.hero {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding-block: 28px 40px;
  grid-template-columns: 42% 58%;
  min-height: 0;
  align-items: center;
}
.hero-copy { padding: 24px 40px 24px 48px; }
.hero h1 { font-size: clamp(64px, 6.6vw, 96px); }
.hero-photo {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 2;
  align-self: center;
}
.hero-photo img {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
}
.hero-photo figcaption { bottom: 20px; right: 16px; }
.hero .hero-motto { font-size: clamp(17px, 1.5vw, 22px); line-height: 1.4; font-weight: 500; color: var(--teal); max-width: 440px; margin-top: 22px; }
.hero .hero-motto + p { margin-top: 14px; }
@media (min-width: 1536px) {
  .site-header { padding-inline: max(48px, calc((100% - 1344px) / 2)); }
  .explore-menu { left: max(48px, calc((100% - 1344px) / 2)); right: max(48px, calc((100% - 1344px) / 2)); }
  .learning-pathways { padding-inline: max(0px, calc((100% - 1440px) / 2)); }
}
@media (max-width: 1150px) {
  .hero { padding-block: 16px 28px; }
  .hero-copy { padding: 22px 28px 22px 32px; }
  .hero h1 { font-size: clamp(52px, 7vw, 80px); }
}
@media (min-width: 761px) and (max-width: 900px) {
  .hero { grid-template-columns: 44% 56%; }
  .hero-copy { padding: 20px 22px 20px 28px; }
  .hero h1 { font-size: 7vw; }
}
@media (max-width: 760px) {
  .hero { display: flex; flex-direction: column; padding: 0; }
  .hero-copy { width: 100%; padding: 30px 28px 34px; }
  .hero h1 { font-size: clamp(48px, 9vw, 66px); line-height: 1.01; }
  .hero h1 br:first-child { display: none; }
  .hero p { max-width: 480px; }
  .hero-actions { flex-direction: row; align-items: center; }
  .hero-photo { aspect-ratio: 3 / 2; }
  .hero-photo figcaption { bottom: 12px; right: 10px; }
}
@media (max-width: 600px) {
  .hero-copy { padding: 28px 20px 30px; }
  .hero h1 { font-size: clamp(44px, 11.8vw, 66px); }
}

/* Preserve the original photography. Intro images keep their complete frame. */
.page-intro > img { height: auto; aspect-ratio: auto; max-height: 480px; object-fit: contain; }
.digital-intro { grid-template-columns: 1.12fr 1fr; gap: clamp(32px, 5vw, 80px); }
.digital-intro > img { width: min(100%, 440px); max-height: none; aspect-ratio: 2 / 3; justify-self: center; }
.prose .text-link { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .programme h2 { font-size: 24px; }
}
@media (max-width: 600px) {
  .digital-intro > img { width: min(100%, 320px); align-self: center; }
}

/* The ambient layer lives behind content and reserves no layout space. */
body { isolation: isolate; }
main, .site-footer, .nojs-navigation { position: relative; z-index: 1; pointer-events: none; }
/* Ordinary content passes hover/tap/click through to the notes behind it.
   Only actual site controls take priority over the musical interaction. */
:is(main, .site-footer, .nojs-navigation) :is(a, button, summary, input, select, textarea) { pointer-events: auto; }
/* Only links, controls and photographs hide the ambient layer. Preserve the
   original filled buttons, programme cards and coloured section backgrounds. */
main a:not(.button):not(.programme):not(.pathway-link):not(.instrument-tab),
main :is(button, summary, input, select, textarea) { background-color: var(--note-surface, var(--bg)); }
.site-footer :is(a, button), .nojs-navigation a { background-color: var(--bg); }
main img, .instrument-tabs { background-color: var(--bg); }
.instrument-explorer, .enquiry-link { --note-surface: var(--soft); }
.musical-notes {
  position: fixed;
  inset: 108px 12px 76px;
  z-index: 0;
  pointer-events: none;
  --travel-x: calc(100vw - 84px);
  --travel-y: calc(100svh - 260px);
  --pointer-x: 0px;
  --pointer-y: 0px;
  --pointer-turn: 0deg;
}
.note-float {
  position: absolute;
  top: 0;
  left: 0;
  perspective: 700px;
  transform: translate(calc(var(--travel-x) * var(--x0)), calc(var(--travel-y) * var(--y0))) rotate(var(--tilt));
  animation: note-roam var(--duration) var(--delay) cubic-bezier(.45, 0, .55, 1) infinite;
}
.note-depth {
  transform: translate3d(calc(var(--pointer-x) * var(--depth)), calc(var(--pointer-y) * var(--depth)), 0) rotateY(calc(var(--pointer-turn) * var(--depth))) scale(var(--note-scale));
  transition: transform 650ms ease-out;
}
.music-note {
  pointer-events: auto;
  width: 48px;
  min-height: 64px;
  padding: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  border-radius: 12px;
  touch-action: pan-y;
}
.music-note svg { width: 34px; height: 48px; fill: currentColor; opacity: var(--note-opacity); transition: opacity .2s, transform .2s; }
.note-float:nth-child(3n) .music-note svg { transform: rotate(12deg) scale(.88); }
.note-float:nth-child(3n + 1) .music-note svg { transform: rotate(-10deg); }
.note-name { font-size: 11px; line-height: 1.2; letter-spacing: .4px; opacity: 0; transition: opacity .2s; }
.music-note:hover svg, .music-note:focus-visible svg, .music-note.is-playing svg { opacity: .9; transform: rotate(0) scale(1.08); }
.music-note:hover .note-name, .music-note:focus-visible .note-name, .music-note.is-playing .note-name { opacity: 1; }
.music-note.is-playing { background: var(--soft); }
.note-float:has(.music-note:hover), .note-float:has(.music-note:focus-visible),
[data-motion=paused] .note-float, [data-page-hidden=true] .note-float { animation-play-state: paused; }
@keyframes note-roam {
  0%, 100% { transform: translate(calc(var(--travel-x) * var(--x0)), calc(var(--travel-y) * var(--y0))) rotate(var(--tilt)); }
  25% { transform: translate(calc(var(--travel-x) * var(--x1)), calc(var(--travel-y) * var(--y1))) rotate(calc(var(--tilt) + 14deg)); }
  50% { transform: translate(calc(var(--travel-x) * var(--x2)), calc(var(--travel-y) * var(--y2))) rotate(calc(var(--tilt) - 10deg)); }
  75% { transform: translate(calc(var(--travel-x) * var(--x3)), calc(var(--travel-y) * var(--y3))) rotate(calc(var(--tilt) + 7deg)); }
}
@media (min-width: 1700px) {
  .music-note { width: 50px; min-height: 70px; }
  .music-note svg { width: 40px; height: 54px; }
}
@media (max-width: 760px) {
  .musical-notes { inset: 90px 8px 70px; --travel-x: calc(100vw - 66px); --travel-y: calc(100svh - 230px); }
  .music-note { width: 44px; min-height: 58px; }
  .music-note svg { width: 30px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .note-float { animation: none; }
}

.teacher .teacher-subjects { color: var(--teal); font-weight: 600; margin-top: 0; }
#aine-doolan > img { object-position: center 35%; filter: grayscale(1); }
/* Long addresses and words must wrap inside narrow reading columns. */
main p, main blockquote { overflow-wrap: anywhere; }
.teacher > div { min-width: 0; }

#darragh-noonan > img { filter: grayscale(1); object-position: 65% center; }
