/* ==========================================================================
   Layout — header, editorial menu, footer, containers
   Desktop header and footer sit on the approved mock's 1920px grid: every length
   is N × --u, where --u = the element's own width / 1920 (a container unit, so the
   scrollbar is excluded).
   ========================================================================== */

/* ---------- containers ---------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container-wide));
  margin-inline: auto;
}

.container--main {
  width: min(100% - 2 * var(--gutter), var(--container-main));
}

.container--text {
  width: min(100% - 2 * var(--gutter), var(--container-text));
}

.section {
  position: relative;
  padding-block: var(--space-section);
}

.section--tight {
  padding-block: var(--space-block);
}

.section--ground {
  background: var(--color-ground);
}

.section--navy {
  --focus: var(--color-white);
  background: var(--color-navy-deep);
  color: var(--color-white);
}

/* ---------- header (UI redesign: Editorial × Brush × Motion) ----------
   Transparent over the page; after 80px a frosted white band with a hairline, no shadow.
   Desktop (≥1024px) sits on the 1920 grid (N × --u). */

.site-header {
  position: fixed;
  top: var(--adminbar-h);
  right: 0;
  left: 0;
  z-index: 50;
  container-type: inline-size;
  border-bottom: 1px solid transparent;
  transition:
    transform var(--dur-large) var(--ease-out),
    background-color var(--dur-normal) ease,
    border-color var(--dur-normal) ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .88);
  border-bottom-color: rgba(4, 24, 39, .08);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - var(--adminbar-h)));
}

.site-header__inner {
  --u: calc(100cqw / 1920);
  --lines-shift: 5px;
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 8px 0 20px;
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  color: var(--color-ink);
}

/* The official logo image (inc/helpers.php itsg_logo()), used as delivered. */
.brand__logo {
  display: block;
  flex: none;
  line-height: 0;
}

.brand__img {
  display: block;
  width: auto;
  height: 26px;
}

/* The header shows the reverse logo (white lettering) only over a dark hero. */
.site-header .brand__img--reverse { display: none; }

.site-header .brand__tagline {
  font-family: var(--font-en);
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #33424f;
}

/* Navigation: a small index number over each label; a brush stroke is drawn under the label
   on hover / focus, and stays for the current page. */
.global-nav {
  display: none;
}

.global-nav__list {
  display: flex;
}

.global-nav__link {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 8px 0;
  color: var(--color-hero-ink);
}

.global-nav__num {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .24em;
  color: #7a8894;
  transition: color var(--dur-micro) var(--ease-out);
}

.global-nav__label {
  position: relative;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .12em;
}

.global-nav__label::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -7px;
  left: -3px;
  height: 7px;
  background: var(--color-brand);
  -webkit-mask: var(--mask-brush-line) center / 100% 100% no-repeat;
  mask: var(--mask-brush-line) center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-normal) var(--ease-out);
}

.global-nav__link[aria-current="page"] .global-nav__num { color: var(--color-brand-text); }

.site-header .header-cta {
  display: none;
}

/* MENU: two lines of different length, never a three-line hamburger. Hover evens them out;
   open turns them into an X. */
.menu-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin-left: auto;
  padding: 0 12px;
  color: var(--color-hero-ink);
}

.menu-button__label,
.global-menu__close-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .3em;
}

.menu-button__lines,
.global-menu__close-lines {
  position: relative;
  display: block;
  width: 40px;
  height: 12px;
}

.menu-button__lines span,
.global-menu__close-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur-normal) var(--ease-out);
}

.menu-button__lines span:first-child { top: 0; }

.menu-button__lines span:last-child {
  bottom: 0;
  transform: translateX(19%) scaleX(.62);
}

.menu-button[aria-expanded="true"] .menu-button__lines span:first-child {
  transform: translateY(var(--lines-shift)) rotate(45deg) scaleX(.8);
}

.menu-button[aria-expanded="true"] .menu-button__lines span:last-child {
  transform: translateY(calc(var(--lines-shift) * -1)) rotate(-45deg) scaleX(.8);
}

.global-menu__close-lines span { top: calc(50% - 1px); }
.global-menu__close-lines span:first-child { transform: rotate(45deg) scaleX(.8); }
.global-menu__close-lines span:last-child { transform: rotate(-45deg) scaleX(.8); }

/* Over a dark page hero (e.g. /service/movie/) the transparent header turns white. */
.has-dark-hero .site-header:not(.is-scrolled) {
  --focus: var(--color-white);
}

.has-dark-hero .site-header:not(.is-scrolled) :is(.brand__logo, .brand__tagline, .global-nav__link, .header-cta, .menu-button) {
  color: var(--color-white);
}

.has-dark-hero .site-header:not(.is-scrolled) .global-nav__num { color: rgba(255, 255, 255, .7); }

.has-dark-hero .site-header:not(.is-scrolled) .brand__img--default { display: none; }

.has-dark-hero .site-header:not(.is-scrolled) .brand__img--reverse { display: block; }

@media (max-width: 479px) {
  .site-header .brand__tagline { display: none; }
}

@media (max-width: 359px) {
  .menu-button__label { display: none; }
}

@media (min-width: 1024px) {
  .site-header__inner {
    --lines-shift: calc(6 * var(--u));
    height: calc(120 * var(--u));
    padding: 0;
  }

  .site-header :is(.brand, .global-nav, .header-cta, .menu-button) { position: absolute; }

  /* The official logo is 6.7 : 1; 40 units tall it ends well before the navigation at 588. */
  .site-header .brand {
    top: 0;
    left: calc(82 * var(--u));
    height: 100%;
    gap: calc(34 * var(--u));
  }

  .site-header .brand__img { height: calc(40 * var(--u)); }

  .site-header .brand__tagline {
    font-size: max(10px, calc(12.5 * var(--u)));
    font-weight: 600;
    line-height: calc(19 * var(--u));
    color: #22303b;
  }

  .global-nav {
    top: 0;
    left: calc(588 * var(--u));
    display: flex;
    align-items: center;
    height: 100%;
  }

  .global-nav__list { gap: calc(46 * var(--u)); }

  .global-nav__link {
    gap: calc(7 * var(--u));
    padding: calc(12 * var(--u)) 0;
  }

  .global-nav__num { font-size: max(9px, calc(11 * var(--u))); }

  .global-nav__label {
    font-size: max(13px, calc(16 * var(--u)));
    letter-spacing: .14em;
  }

  .global-nav__label::after {
    bottom: calc(-9 * var(--u));
    height: max(5px, calc(8 * var(--u)));
  }

  .site-header .header-cta {
    top: 50%;
    right: calc(262 * var(--u));
    display: inline-flex;
    width: calc(232 * var(--u));
    min-height: calc(54 * var(--u));
    transform: translateY(-50%);
    font-family: var(--font-en);
    font-size: max(11px, calc(14 * var(--u)));
    font-weight: 600;
    letter-spacing: .22em;
  }

  .header-cta .arrow { width: calc(18 * var(--u)); }

  .menu-button {
    top: 50%;
    right: calc(70 * var(--u));
    gap: calc(18 * var(--u));
    min-height: calc(56 * var(--u));
    margin: 0;
    transform: translateY(-50%);
  }

  .menu-button__label { font-size: max(10px, calc(12.5 * var(--u))); }

  .menu-button__lines {
    width: calc(46 * var(--u));
    height: calc(14 * var(--u));
  }

  .menu-button__lines span { height: max(1.5px, calc(2 * var(--u))); }
}

/* The nav needs the full desktop width; between 1024 and 1279px it moves into the menu. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .global-nav { display: none; }
}

/* ---------- fullscreen menu (UI redesign §6) ---------- */

html.is-menu-open {
  overflow: hidden;
}

.global-menu {
  --focus: var(--color-white);
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-navy-deep);
  color: var(--color-white);
}

.global-menu__inner {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  padding: var(--adminbar-h) var(--gutter) 32px;
  overflow: hidden;
}

/* The supplied red × blue brush art (paper removed), cut by the screen edge. */
.global-menu__brush {
  position: absolute;
  right: -46vw;
  bottom: -10vh;
  z-index: -1;
  width: 150vw;
  aspect-ratio: 1672 / 941;
  background: url("../art/brush-strokes-1200.webp") center / contain no-repeat;
  opacity: .9;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 34%), linear-gradient(90deg, transparent, #000 30%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent, #000 34%), linear-gradient(90deg, transparent, #000 30%);
  mask-composite: intersect;
}

.global-menu__words {
  position: absolute;
  right: -2vw;
  bottom: 4vh;
  z-index: -1;
  font-family: var(--font-en);
  font-size: 23vw;
  font-weight: 800;
  line-height: .86;
  letter-spacing: -.03em;
  text-align: right;
  white-space: nowrap;
  color: rgba(255, 255, 255, .045);
  pointer-events: none;
}

.global-menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.global-menu__brand .brand__img {
  height: clamp(24px, 2.1vw, 40px);
}

.global-menu__close {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin-right: -12px;
  padding: 0 12px;
}

.global-menu__nav {
  align-self: center;
  padding: 20px 0 32px;
}

.global-menu__list {
  display: grid;
  gap: 2px;
}

.global-menu__link {
  display: inline-grid;
  grid-template-columns: 2.8em auto;
  align-items: baseline;
  column-gap: 10px;
  padding: 3px 0;
}

.global-menu__num {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .55);
  transition: color var(--dur-micro) ease;
}

.global-menu__en {
  position: relative;
  isolation: isolate;
  font-family: var(--font-en);
  font-size: clamp(30px, 9vw, 44px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: .02em;
}

/* A thin brush runs behind the word on hover: red, or blue on every other item. */
.global-menu__en::after {
  content: "";
  position: absolute;
  top: 54%;
  right: -.16em;
  left: -.08em;
  z-index: -1;
  height: .28em;
  background: var(--color-brand);
  -webkit-mask: var(--mask-brush-line) center / 100% 100% no-repeat;
  mask: var(--mask-brush-line) center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-normal) var(--ease-out);
}


.global-menu__ja {
  grid-column: 2;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .64);
}

.global-menu__link[aria-current="page"] .global-menu__num { color: var(--color-brand); }

.global-menu__side {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.global-menu__tagline {
  font-size: 14px;
  letter-spacing: .14em;
}

.global-menu__address {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .72);
}

.global-menu__address a {
  text-decoration: underline 1px;
  text-underline-offset: .25em;
}

.global-menu__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
}

.global-menu__legal a {
  display: inline-block;
  padding: 6px 0;
}

@media (min-width: 768px) {
  .global-menu__inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
    grid-template-rows: auto 1fr;
    column-gap: 5vw;
    padding-bottom: 48px;
  }

  .global-menu__bar { grid-column: 1 / -1; }

  .global-menu__nav { padding-left: clamp(0px, 3vw, 96px); }

  .global-menu__link {
    grid-template-columns: 3.4em auto auto;
    column-gap: 22px;
  }

  .global-menu__ja { grid-column: 3; }

  .global-menu__en { font-size: clamp(40px, 5.2vw, 96px); }

  .global-menu__side {
    align-self: end;
    padding-bottom: 6vh;
  }

  .global-menu__brush {
    right: -10vw;
    bottom: -22vh;
    width: min(80vw, 1440px);
  }

  .global-menu__words {
    top: 50%;
    right: var(--gutter);
    bottom: auto;
    font-size: clamp(90px, 12.5vw, 240px);
    transform: translateY(-50%);
  }
}

/* ---------- footer (mock: navy band, 3062–3263 on the 1920 grid) ---------- */

.site-footer {
  --focus: var(--color-white);
  position: relative;
  container-type: inline-size;
  background: var(--color-footer);
  color: var(--color-white);
}

.site-footer__inner {
  --u: calc(100cqw / 1920);
  display: grid;
  gap: 22px;
  padding: 48px 20px 36px;
}

.site-footer__brand {
  justify-self: start;
}

.site-footer__brand .brand__img {
  height: 30px;
}

.site-footer__tagline {
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .88);
}

.footer-nav__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.footer-nav a,
.footer-legal a {
  display: inline-block;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .92);
}

.footer-nav a[aria-current="page"],
.footer-legal a[aria-current="page"] {
  text-decoration: underline 1px;
  text-underline-offset: .35em;
}

.footer-sns {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-sns__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 -8px;
  color: var(--color-white);
}

.footer-sns__link svg {
  width: 26px;
  height: auto;
}

.footer-sns__item--youtube svg {
  width: 32px;
}

.site-footer__copy {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .78);
}

.footer-legal {
  display: flex;
  align-items: center;
}

.footer-legal li + li::before {
  content: "|";
  margin: 0 18px;
  color: rgba(255, 255, 255, .5);
}

.footer-legal a {
  font-size: 12px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .78);
}

@media (min-width: 768px) and (max-width: 1279px) {
  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px 48px;
    padding: 44px var(--gutter) 36px;
  }

  .footer-nav { grid-column: 1 / -1; }

  .footer-nav__list { display: flex; flex-wrap: wrap; gap: 0 36px; }

  .footer-sns { grid-column: 3; grid-row: 1; }

  .site-footer__copy { grid-column: 1 / 3; }

  .footer-legal { grid-column: 3; justify-self: end; }
}

/* Desktop: the mock band, 201 units tall. Each item is centred on its measured line. */
@media (min-width: 1280px) {
  .site-footer__inner {
    position: relative;
    display: block;
    height: calc(201 * var(--u));
    padding: 0;
  }

  .site-footer__inner > * {
    position: absolute;
    transform: translateY(-50%);
  }

  .site-footer__brand {
    top: calc(65 * var(--u));
    left: calc(116 * var(--u));
  }

  .site-footer__brand .brand__img { height: calc(30 * var(--u)); }

  .site-footer__tagline {
    top: calc(66 * var(--u));
    left: calc(350 * var(--u));
    font-size: max(12px, calc(17.5 * var(--u)));
    line-height: 1.5;
    letter-spacing: .04em;
    white-space: nowrap;
  }

  .footer-nav {
    top: calc(70 * var(--u));
    left: calc(653 * var(--u));
  }

  .footer-nav__list {
    display: flex;
    gap: calc(59 * var(--u));
  }

  .footer-nav a {
    padding: calc(8 * var(--u)) 0;
    font-size: max(12px, calc(16 * var(--u)));
    line-height: 1.5;
    letter-spacing: .14em;
  }

  .footer-sns {
    top: calc(66 * var(--u));
    left: calc(1627 * var(--u));
    gap: calc(42 * var(--u));
  }

  .footer-sns__link {
    width: calc(28 * var(--u));
    height: calc(28 * var(--u));
    margin: 0;
  }

  .footer-sns__link svg { width: calc(28 * var(--u)); }

  .footer-sns__item--youtube .footer-sns__link,
  .footer-sns__item--youtube svg { width: calc(35 * var(--u)); }

  /* Keep a 44px hit area without moving the drawn icon. */
  a.footer-sns__link { position: relative; }

  a.footer-sns__link::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }

  .site-footer__copy {
    top: calc(148 * var(--u));
    left: calc(120 * var(--u));
    font-size: max(11px, calc(14.5 * var(--u)));
    line-height: 1.5;
    white-space: nowrap;
  }

  .footer-legal {
    top: calc(148 * var(--u));
    right: calc(120 * var(--u));
  }

  .footer-legal a {
    padding: calc(6 * var(--u)) 0;
    font-size: max(11px, calc(14 * var(--u)));
    line-height: 1.5;
  }

  .footer-legal li + li::before {
    margin: 0 calc(25 * var(--u));
  }
}
