/* Home-only layout. The shared header and entry animation are managed separately. */
body[data-page="home"] {
  --home-heading-size: clamp(32px, 3.8vw, 48px);
  --home-heading-space-extra: clamp(28px, 3vw, 44px);
  --home-heading-marker: linear-gradient(105deg, #159fc6 0%, #29b7d8 52%, #67cce6 100%);
}
body[data-page="home"] main > .section-space {
  padding-top: calc(90px + var(--home-heading-space-extra));
}
body[data-page="home"] #featured-title {
  font-size: var(--home-heading-size);
  text-align: right;
}
body[data-page="home"] main h2 .home-heading-en,
body[data-page="home"] #featured-title .featured-title-description {
  display: block;
  margin-top: .5em;
  color: var(--ink);
  opacity: 1;
  font-size: clamp(12px, .42em, 18px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .06em;
}
body[data-page="home"] .opening-dates h2 .home-heading-en {
  color: #fff;
}
body[data-page="home"] .spark-opening {
  padding-top: 8px;
}


body[data-page="home"] .opening-summary {
  position: relative;
  z-index: 2;
  margin: -14px auto 26px;
  text-align: center;
  color: var(--ink);
}
body[data-page="home"] .opening-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 6.3vw, 50px);
  line-height: 1.4;
  font-weight: 900;
  letter-spacing: 0.04em;
}
body[data-page="home"] .opening-period {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 16px);
  margin: 0;
  font-size: clamp(22px, 5.3vw, 42px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.025em;
  font-variant-numeric: lining-nums tabular-nums;
}
body[data-page="home"] .opening-period time {
  white-space: nowrap;
}
body[data-page="home"] .opening-period small {
  margin-left: 0.3em;
  font-size: 0.44em;
  font-weight: 700;
  letter-spacing: 0.015em;
}
body[data-page="home"] .opening-period-dash {
  color: #6c55a3;
  font-size: 0.72em;
}
body[data-page="home"] .opening-venue {
  margin: 9px 0 0;
  font-size: clamp(12px, 1.5vw, 16px);
  line-height: 1.7;
  font-weight: 700;
  letter-spacing: 0.05em;
}
body[data-page="home"] .opening-venue > span {
  display: inline-block;
  margin-right: 0.35em;
  color: #6c55a3;
  font-style: italic;
}
body[data-page="home"] .home-theme {
  row-gap: clamp(10px, 1.5vw, 18px);
}
body[data-page="home"] .home-theme .theme-logo {
  padding: 0;
}
body[data-page="home"] .home-theme .theme-logo img {
  display: block;
  width: 85%;
  margin-inline: auto;
  height: auto;
  aspect-ratio: 2.1 / 1;
  object-fit: cover;
  object-position: 50% 52%;
}
body[data-page="home"] .home-theme .action-links {
  margin-top: 20px;
}
body[data-page="home"] .home-theme .action-link {
  grid-template-columns: 18px auto 18px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  gap: 9px;
  font-size: 14px;
}
body[data-page="home"] .home-theme .action-link-icon,
body[data-page="home"] .home-theme .action-link-arrow {
  width: 18px;
  height: 18px;
}
body[data-page="home"] .home-theme > h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--home-heading-size);
  line-height: 1.55;
}
body[data-page="home"] .theme-text > p {
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.9;
}
body[data-page="home"] .theme-text .theme-definition {
  margin-bottom: 22px;
}
/* Festival hours and venue share the visitor-card paper texture below. */
body[data-page="home"] .opening-dates {
  --opening-wave-height: clamp(56px, 7vw, 112px);
  isolation: isolate;
  overflow: hidden;
  background: var(--action-blue);
  /* Clip the paper and its texture together, using the footer curve at both ends. */
  --opening-wave-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23000' transform='translate(0 80) scale(1 -1)' d='M0 38C220-10 420-10 690 36S1190 80 1440 30V80H0Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("../../images/decorations/footer-wave.svg"), linear-gradient(#000, #000), var(--opening-wave-bottom);
  mask-image: url("../../images/decorations/footer-wave.svg"), linear-gradient(#000, #000), var(--opening-wave-bottom);
  -webkit-mask-size: 100% var(--opening-wave-height), 100% calc(100% - var(--opening-wave-height) * 2 + 2px), 100% var(--opening-wave-height);
  mask-size: 100% var(--opening-wave-height), 100% calc(100% - var(--opening-wave-height) * 2 + 2px), 100% var(--opening-wave-height);
  -webkit-mask-position: top, center, bottom;
  mask-position: top, center, bottom;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  padding-block: calc(var(--opening-wave-height) + clamp(24px, 3vw, 40px));
}
body[data-page="home"] .opening-dates > .wrap {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--max));
}
body[data-page="home"] .opening-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
body[data-page="home"] .opening-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0;
}
body[data-page="home"] .opening-day > span {
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 900;
  line-height: 1.5;
}
body[data-page="home"] .opening-day[data-weekday="friday"] { --day-color: #ffcf28; }
body[data-page="home"] .opening-day[data-weekday="saturday"] {
  --day-color: #6ecbff;
  --day-ink: #083b66;
}
body[data-page="home"] .opening-day[data-weekday="sunday"] { --day-color: #c44860; }
body[data-page="home"] .opening-day strong > .day-weekday {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 1.8em;
  height: 1.8em;
  padding: 0;
  margin-left: 0.38em;
  border: 0;
  border-radius: 50%;
  background: var(--day-color);
  color: var(--day-ink, #fff);
  font-size: 0.47em;
  line-height: 1;
  vertical-align: 0.14em;
  letter-spacing: 0;
  text-align: center;
}
body[data-page="home"] .day-weekday > span {
  display: block;
  line-height: 1;
  translate: 0 -.035em;
}
body[data-page="home"] .opening-day > .day-phase {
  justify-self: start;
  padding: 0;
  color: #fff;
}
body[data-page="home"] .home-heading-marker {
  position: relative;
  display: inline-block;
  isolation: isolate;
  box-sizing: border-box;
  max-width: 100%;
  padding: .1em .42em;
  color: #fff;
}
body[data-page="home"] .home-heading-marker::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--home-heading-marker);
  clip-path: inset(0);
}
body.page-motion-ready[data-page="home"] h2[data-page-state="waiting"] .home-heading-marker::before {
  clip-path: inset(0 100% 0 0);
}
body.page-motion-ready[data-page="home"] h2.page-reveal-arriving .home-heading-marker::before {
  animation: home-marker-sweep .8s cubic-bezier(.2,.65,.3,1) calc(var(--page-reveal-delay, 0ms) + 150ms) both;
}
@keyframes home-marker-sweep {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}
body.motion-paused[data-page="home"] .home-heading-marker::before {
  animation: none !important;
  clip-path: inset(0) !important;
}
@media (prefers-reduced-motion: reduce), print {
  body[data-page="home"] .home-heading-marker::before { animation: none !important; clip-path: inset(0) !important; }
}
body[data-page="home"] .opening-day .day-year {
  font-size: 0.45em;
  letter-spacing: 0;
}
body[data-page="home"] .opening-day > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
}
body[data-page="home"] .opening-day strong {
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0;
}
body[data-page="home"] .opening-day .day-hours {
  margin: 0;
  text-align: right;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body[data-page="home"] .opening-hours-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 26px 0 0;
  font-size: 13px;
  line-height: 1.6;
}
body[data-page="home"] .opening-hours-notes > div {
  display: flex;
  gap: 12px;
}
body[data-page="home"] .opening-hours-notes dt {
  font-weight: 700;
}
body[data-page="home"] .opening-hours-notes dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
body[data-page="home"] .opening-escape-note {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
}
body[data-page="home"] .opening-location {
  margin-top: 30px;
  padding-top: calc(26px + var(--home-heading-space-extra));
  border-top: 1px solid #ffffff66;
}
body[data-page="home"] .opening-location h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: var(--home-heading-size);
  font-weight: 900;
  line-height: 1.4;
}
body[data-page="home"] .opening-location-name {
  margin: 0;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.6;
}
body[data-page="home"] .opening-location-address {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
}
body[data-page="home"] .home-countdown-wrap {
  position: relative;
  z-index: 3;
  padding: 0 24px 30px;
}
body[data-page="home"] .home-countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 17px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
body[data-page="home"] .countdown-label,
body[data-page="home"] .countdown-unit {
  font-size: clamp(16px, 1.75vw, 22px);
  font-weight: 700;
  letter-spacing: 0.07em;
}
body[data-page="home"] .countdown-value {
  font-size: clamp(52px, 6.2vw, 82px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
body[data-page="home"]
  .home-countdown:not([data-state="before"])
  .countdown-value {
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing: 0.015em;
}

body[data-page="home"] .home-navigation {
  padding: calc(82px + var(--home-heading-space-extra)) 0 42px;
}
body[data-page="home"] .home-navigation h2 {
  margin: 0 0 28px;
  font-size: var(--home-heading-size);
}
body[data-page="home"] .home-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
body[data-page="home"] .home-page-box {
  --box-start: #ff3c72;
  --box-middle: #ff5454;
  --box-end: #ff6838;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 24px;
  min-height: 175px;
  overflow: hidden;
  padding: 30px 30px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    var(--box-start) 0%,
    var(--box-middle) 48%,
    var(--box-end) 100%
  );
  box-shadow: 0 12px 24px #18254a16;
  color: #fff;
  text-decoration: none;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
}
body[data-page="home"] .home-page-box--violet {
  --box-start: #c57bf0;
  --box-middle: #ac82f5;
  --box-end: #8c88fc;
}
body[data-page="home"] .home-page-box--green {
  --box-start: #91ef28;
  --box-middle: #50e33e;
  --box-end: #0cd84f;
}
body[data-page="home"] .home-page-box--amber {
  --box-start: #ffc347;
  --box-middle: #ffad29;
  --box-end: #ff9418;
}
body[data-page="home"] .home-page-box--cyan {
  --box-start: #46c7ef;
  --box-middle: #51afe8;
  --box-end: #5b97e1;
}
body[data-page="home"] .home-page-box--blue {
  --box-start: #628feb;
  --box-middle: #627ce5;
  --box-end: #6969da;
}
body[data-page="home"] .home-page-box::before,
body[data-page="home"] .opening-dates::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  background-image: url("../../images/decorations/washi-boxes.svg");
  background-size: 240px 240px;
}
body[data-page="home"] .home-page-box > span {
  position: relative;
  z-index: 1;
}
body[data-page="home"] .home-box-icon .icon {
  display: block;
  width: 46px;
  height: 46px;
  stroke-width: 1.65;
}
body[data-page="home"] .home-box-copy {
  min-width: 0;
}
body[data-page="home"] .home-box-copy strong {
  display: block;
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body[data-page="home"] .home-box-action {
  display: block;
  padding-inline-start: 1em;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 500;
}
body[data-page="home"] .home-box-arrow .icon {
  width: 30px;
  height: 30px;
  transition: transform 0.28s ease;
}
body[data-page="home"] .home-page-box:focus-visible {
  outline: 3px solid #101426;
  outline-offset: 5px;
}
@media (hover: hover) {
  body[data-page="home"] .home-page-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px #18254a24;
  }
  body[data-page="home"] .home-page-box:hover .home-box-arrow .icon {
    transform: translateX(4px);
  }
}
@media (max-width: 1000px) {
  body[data-page="home"] .home-page-box {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 17px;
    padding: 25px 22px;
  }
  body[data-page="home"] .home-box-icon .icon {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 800px) {
  body[data-page="home"] main > .section-space {
    padding-top: calc(65px + var(--home-heading-space-extra));
  }
}
@media (max-width: 760px) {
  body[data-page="home"] {
    --home-heading-size: clamp(26px, 7.5vw, 32px);
  }
  body[data-page="home"] main > .section-space {
    padding-top: calc(52px + var(--home-heading-space-extra));
  }
  body[data-page="home"] .home-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-page="home"] .home-navigation {
    padding: calc(32px + var(--home-heading-space-extra)) 0 16px;
  }
  body[data-page="home"] .home-navigation > .wrap {
    width: calc(100% - 24px);
  }
  body[data-page="home"] .home-navigation h2 {
    margin-bottom: 16px;
    font-size: var(--home-heading-size);
    line-height: 1.35;
  }
  body[data-page="home"] .home-page-box {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-rows: 26px auto;
    grid-template-areas: "icon icon" "copy copy";
    align-content: center;
    gap: 8px 6px;
    min-height: 118px;
    padding: 12px;
    border-radius: 14px;
  }
  body[data-page="home"] .home-box-icon {
    grid-area: icon;
  }
  body[data-page="home"] .home-box-icon .icon {
    width: 26px;
    height: 26px;
  }
  body[data-page="home"] .home-box-copy {
    grid-area: copy;
  }
  body[data-page="home"] .home-box-copy strong {
    font-size: clamp(13px, 3.4vw, 14px);
    line-height: 1.4;
    letter-spacing: 0;
  }
  body[data-page="home"] .home-box-action {
    padding-inline-end: 24px;
    font-size: 12px;
    line-height: 1.4;
  }
  body[data-page="home"] .home-page-box > .home-box-arrow {
    position: absolute;
    right: 12px;
    bottom: 12px;
  }
  body[data-page="home"] .home-box-arrow .icon {
    display: block;
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 600px) {
  body[data-page="home"] .spark-opening {
    padding-top: 8px;
  }
  body[data-page="home"] .home-countdown-wrap {
    padding: 7px 18px 25px;
  }
  body[data-page="home"] .home-countdown {
    gap: 7px 11px;
  }
  body[data-page="home"] .countdown-label,
  body[data-page="home"] .countdown-unit {
    font-size: 16px;
    letter-spacing: 0.02em;
  }
}
@media (max-width: 359px) {
  body[data-page="home"] .home-page-box {
    padding-inline: 10px;
  }
  body[data-page="home"] .home-box-copy strong {
    font-size: 11.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .home-page-box,
  body[data-page="home"] .home-box-arrow .icon {
    transition: none;
  }
}

@media (max-width: 1000px) {
  body[data-page="home"] .opening-days {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}
@media (max-width: 600px) {
  body[data-page="home"] .opening-day strong {
    font-size: clamp(25px, 7.2vw, 32px);
  }
  body[data-page="home"] .opening-day .day-hours {
    font-size: clamp(16px, 4.3vw, 19px);
  }
  body[data-page="home"] .opening-hours-notes {
    display: grid;
    gap: 6px;
  }
  body[data-page="home"] .opening-hours-notes > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 12px;
  }
}

/* The promotional film follows the featured events without loading a player eagerly. */
body[data-page="home"] .home-pr-video > .wrap {
  max-width: 1040px;
}
body[data-page="home"] .home-pr-video h2 {
  margin: 0 0 28px;
  font-size: var(--home-heading-size);
  line-height: 1.4;
}
.home-pr-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #101426;
  box-shadow: 0 12px 32px rgb(0 35 83 / 12%);
}
.home-pr-video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.home-pr-video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 4px;
}
.home-pr-video-link .icon {
  width: 18px;
  height: 18px;
}

/* Large pictograms remain fully inside each card in the normal grid flow. */
body[data-page="home"] .home-page-grid {
  row-gap: 30px;
  padding-top: 16px;
}
body[data-page="home"] .home-page-box {
  grid-template-columns: 104px minmax(0, 1fr) 28px;
  overflow: visible;
}
body[data-page="home"] .home-page-box::before {
  border-radius: inherit;
}
body[data-page="home"] .home-page-box > .home-box-icon {
  position: relative;
  grid-area: auto;
  top: auto;
  left: auto;
  margin: 0;
}
body[data-page="home"] .home-box-icon .icon {
  --icon-stroke-width: 1.1;
  width: 92px;
  height: 92px;
  filter: none;
}
@media (min-width: 761px) {
  body[data-page="home"] .home-box-copy {
    grid-column: 2;
  }
  body[data-page="home"] .home-box-arrow {
    grid-column: 3;
  }
}
body[data-page="home"] :is(.home-pr-video-link, .pamphlet-download) {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}
@media (max-width: 1000px) {
  body[data-page="home"] .home-page-box {
    grid-template-columns: 88px minmax(0, 1fr) 24px;
  }
  body[data-page="home"] .home-box-icon .icon {
    width: 78px;
    height: 78px;
  }
}
@media (max-width: 760px) {
  body[data-page="home"] .home-page-grid {
    row-gap: 24px;
  }
  body[data-page="home"] .home-page-box {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-rows: 72px auto;
    align-content: start;
    row-gap: 10px;
    min-height: 142px;
    padding-top: 14px;
  }
  body[data-page="home"] .home-page-box > .home-box-icon {
    grid-area: icon;
  }
  body[data-page="home"] .home-box-icon .icon {
    width: 64px;
    height: 64px;
  }
}
