/* =============================================================================
   OGATA Lech — Places detail page (page-ogata-lech.php)
   Everything is scoped under .lech; the header tweaks below apply only while a
   .lech page is on screen.
   ========================================================================== */

/* White page: the shared header needs the same treatment as the Places page. */
body:has(.lech) .header  { mix-blend-mode: difference; }
body:has(.lech) .menuDot { background: #000; }

.lech {
  --lech-ink: #1a1a1a;
  --lech-copy: #2b2b2b;
  --lech-muted: #6b6b6b;
  --lech-ph: #e9e6e1;
  --lech-gutter: clamp(16px, 4vw, 64px);
  --lech-ease: cubic-bezier(.22, .61, .36, 1);

  color: var(--lech-ink);
  background: #fff;
  /* Tracking follows the editorial detail pages (.lp in lp-editorial.css):
     .05em for running text, .06em for headings, buttons and links. */
  letter-spacing: .05em;
  padding-top: clamp(64px, 7vw, 96px);
}

/* header.php sets a global `img,video { width:100%; height:100%; object-fit:cover }`. */
.lech img { height: auto; }


/* -----------------------------------------------------------------------------
   Reveal
   -------------------------------------------------------------------------- */
/* A slow, soft rise: opacity plus a few pixels of lift. lech.js only adds
   .is-visible once the picture has loaded, so the fade never plays over an
   empty frame. */
.lech.lech-js .lech-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.6s var(--lech-ease), transform 1.6s var(--lech-ease);
}
.lech.lech-js .lech-reveal.is-visible { opacity: 1; transform: none; }
/* Inside a slider the pictures only fade: the 14px lift would hang below the
   strip and give it room to move up and down. */
.lech.lech-js .lech-slider__viewport .lech-reveal { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .lech.lech-js .lech-reveal { opacity: 1; transform: none; transition: none; }
}


/* -----------------------------------------------------------------------------
   Teaser hero
   -------------------------------------------------------------------------- */
.lech-hero {
  padding: 0 var(--lech-gutter);
}

.lech-hero__media {
  position: relative;
  aspect-ratio: 12 / 5;
  max-height: calc(100vh - 140px);
  width: 100%;
  overflow: hidden;
  background: #1d2420;
  transition: aspect-ratio .6s var(--lech-ease);
}

.lech-hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: 50% 55%;
}

/* The whole picture is the click target; the button itself matches the
   NOMAD × OGATA page (.lp-video__play in lp-editorial.css). */
.lech-hero__play {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.lech-hero__play:focus-visible { outline: 1px solid #fff; outline-offset: -8px; }

.lech-hero__circle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(51, 51, 51, .1);
  border-radius: 50%;
  background: #fff;
  color: #333;
}
.lech-hero__circle svg { width: 20px; height: 20px; }

/* Once playing, the film runs edge to edge at its own 16:9: the side gutters
   and the height cap drop away, so there are no black bars beside it. */
.lech-hero:has(.is-playing) { padding: 0; }
.lech-hero__media.is-playing {
  aspect-ratio: 16 / 9;
  max-height: none;
  background: #000;
}
.lech-hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  background: #000;
}


/* -----------------------------------------------------------------------------
   Page title
   -------------------------------------------------------------------------- */
.lech-title {
  padding: clamp(40px, 5vw, 72px) var(--lech-gutter) clamp(36px, 4vw, 60px);
  text-align: center;
}

.lech-title__name {
  margin: 0;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  color: #000;
}
.lech-title__name .ogata { letter-spacing: .5em; margin-right: -.2em; }
.lech-title__place { letter-spacing: .08em; }

.lech-title__sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--lech-copy);
}


/* -----------------------------------------------------------------------------
   Centred intro + outlined button (OGATA Arts Residency page)
   -------------------------------------------------------------------------- */
.lech-intro {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 5vw, 72px) var(--lech-gutter) clamp(100px, 10vw, 160px);
  text-align: center;
}

.lech-intro__title {
  margin: 0 0 clamp(24px, 2.4vw, 36px);
  font-size: clamp(26px, 2.3vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .06em;
}

.lech-intro__copy p {
  margin: 0 0 2.2em;
  text-wrap: pretty;
  font-size: 16px;
  line-height: 1.55;
  color: var(--lech-copy);
}
.lech-intro__copy p:last-child { margin-bottom: 0; }

/* OGATA Nomadic, the concept for the whole page, sits centred at the top
   (Lech page). The HausW section below brings its own top spacing. */
.lech-intro--nomadic { padding-bottom: 0; }

/* Names in the OGATA font (OGATA Nomadic, OGATA Arts Residency, ...). The
   font is light and capitals only, so the headings around it drop the bold
   and the name gets a little air between letters. */
.lech-intro__title { font-weight: 400; }
.lech-intro--nomadic { padding-top: clamp(72px, 8vw, 120px); }
/* The Nomadic intro is long: a wider measure on desktop so it reads as a
   few long lines rather than a tall block (roughly half the line count). */
.lech-intro--nomadic { max-width: 1180px; }
.lech-intro__title .ogata { font-size: .8em; letter-spacing: .2em; margin-right: -.2em; }
/* Sized so the OGATA capitals stand as tall as the serif capitals beside
   them (the OGATA caps are ~9% taller at the same font size). */
.lech-heading .ogata { font-size: .92em; letter-spacing: .08em; margin-right: .15em; }

.lech-button {
  display: inline-flex;
  align-items: baseline;
  gap: .5em;
  margin-top: clamp(56px, 6vw, 88px);
  padding: 14px 34px;
  border: 1px solid rgba(0,0,0,.25);
  font-size: 15px;
  letter-spacing: .06em;
  color: #222;
  transition: border-color .4s var(--lech-ease), background-color .4s var(--lech-ease);
}
.lech-button:hover { border-color: #000; background: rgba(0,0,0,.03); }


/* -----------------------------------------------------------------------------
   Text + picture column
   -------------------------------------------------------------------------- */
.lech-section {
  display: grid;
  /* Pictures get the wider column so the portrait pairs read larger. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  column-gap: clamp(40px, 6vw, 120px);
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(80px, 9vw, 150px) var(--lech-gutter) 0 clamp(16px, 6vw, 100px);
}

/* The copy keeps pace with the pictures beside it. */
.lech-section__text {
  position: sticky;
  top: 110px;
  max-width: 620px;
}

.lech-heading {
  margin: 0 0 clamp(28px, 3vw, 48px);
  font-size: clamp(20px, 1.75vw, 26px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .06em;
}
/* Regular weight throughout: the OGATA-font names are light, and bold words
   beside them looked heavy. */
.lech-heading__at { white-space: nowrap; }
.lech-heading__sub { display: block; white-space: nowrap; }
/* The serif parts ("at HausW", "— Shingo Oka Exhibition") sit a step below
   the OGATA name so the name leads the heading. */
.lech-heading__at,
.lech-heading__sub { font-size: .8em; }

.lech-copy p {
  margin: 0 0 1.3em;
  text-wrap: pretty;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--lech-copy);
}
.lech-copy p:last-child { margin-bottom: 0; }

.lech-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: fit-content;
  margin: 28px 0 0 auto;
  font-size: 15px;
  letter-spacing: .06em;
  color: #444;
  transition: color .4s var(--lech-ease);
}
.lech-cta:hover { color: #000; }
.lech-cta__arrow {
  width: 28px;
  height: 12px;
  transition: transform .5s var(--lech-ease);
}
.lech-cta:hover .lech-cta__arrow { transform: translateX(5px); }

/* Pictures */
.lech-stack {
  display: grid;
  gap: 14px;
}
.lech-stack__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lech-stack > img,
.lech-stack .lech-ph,
.lech-stack__pair img {
  width: 100%;
  height: auto !important;
  object-fit: cover;
}
.lech-stack__main  { aspect-ratio: 3 / 4; }
.lech-stack__wide  { aspect-ratio: 3 / 2; }
.lech-stack__half  { aspect-ratio: 3 / 4.4; }

.lech-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  background: var(--lech-ph);
  text-align: center;
}
.lech-ph__note {
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: #8a857d;
}


/* -----------------------------------------------------------------------------
   Slider — three across on desktop, scrolled sideways (swipe / trackpad /
   mouse drag). No arrows.
   -------------------------------------------------------------------------- */
.lech-slider {
  --slide-w: 23vw;
  --slide-gap: 5vw;
  position: relative;
  padding: clamp(90px, 10vw, 170px) 0 0;
}

.lech-slider__frame { position: relative; }

/* Thin < > in the side gutters, centred on the pictures. */
.lech-slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--lech-gutter);
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: #333;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity .4s var(--lech-ease), color .3s var(--lech-ease);
}
.lech-slider__arrow--prev { left: 0; }
.lech-slider__arrow--next { right: 0; }
.lech-slider__arrow svg { width: 12px; height: 24px; transition: transform .4s var(--lech-ease); }
.lech-slider__arrow:hover { color: #000; }
.lech-slider__arrow--prev:hover svg { transform: translateX(-3px); }
.lech-slider__arrow--next:hover svg { transform: translateX(3px); }
.lech-slider__arrow:disabled { opacity: 0; pointer-events: none; }
.lech-slider__arrow:focus-visible { outline: 1px solid #999; outline-offset: -4px; }

/* Desktop: the strip stops at the gutters so the arrows sit on white. */
.lech-slider__viewport {
  margin: 0 var(--lech-gutter);
  overflow-x: auto;
  /* Sideways only. The fade-in nudges pictures 14px down, which otherwise made
     the strip scrollable up and down by that much and wobble during swipes. */
  overflow-y: hidden;
  touch-action: pan-x pan-y;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.lech-slider__viewport.is-wheeling { scroll-snap-type: none; }
.lech-slider__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.lech-slider__viewport.is-dragging img { pointer-events: none; }
.lech-slider__viewport img { -webkit-user-drag: none; }
.lech-slider__viewport::-webkit-scrollbar { display: none; }
.lech-slider__viewport:focus-visible { outline: 1px solid #999; outline-offset: 4px; }

.lech-slider__track {
  display: flex;
  gap: var(--slide-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lech-slider__slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: start;
}
.lech-slider__slide img,
.lech-slider__slide .lech-ph {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}


/* -----------------------------------------------------------------------------
   Related stories
   -------------------------------------------------------------------------- */
.lech-related {
  margin-top: clamp(110px, 12vw, 200px);
  padding: 0 var(--lech-gutter);
}

.lech-related__inner {
  background: #f3f3f3;
  padding: clamp(56px, 6vw, 100px) clamp(16px, 4vw, 64px) clamp(72px, 8vw, 130px);
}

.lech-related__title {
  max-width: 980px;
  margin: 0 auto 36px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .06em;
}

.lech-related__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

.lech-card { display: block; color: inherit; }
.lech-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.lech-card__media img,
.lech-card__media .lech-ph {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: 62% 50%;
  transition: transform 1.2s var(--lech-ease);
}
.lech-card__media .lech-ph { background: #e4e1dc; }
a.lech-card:hover .lech-card__media img { transform: scale(1.03); }
/* Beats the reveal's `transform: none` once the card has faded in. */
.lech.lech-js a.lech-card:hover .lech-card__media img.is-visible { transform: scale(1.03); }

.lech-card__label {
  display: inline-block;
  margin-top: 22px;
  font-size: 15px;
  letter-spacing: .06em;
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--lech-ease);
}
a.lech-card:hover .lech-card__label { border-color: currentColor; }


/* -----------------------------------------------------------------------------
   Tablet / phone
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .lech-hero { padding: 0; }
  .lech-hero__media { aspect-ratio: 4 / 3; max-height: none; }

  .lech-section {
    grid-template-columns: 1fr;
    row-gap: 40px;
    padding: 80px var(--lech-gutter) 0;
  }
  .lech-section__text { position: static; max-width: none; }
  .lech-heading__sub { white-space: normal; }

  /* Phones: the next picture already peeks in, and the gutter is too narrow. */
  .lech-slider__arrow { display: none; }
  /* …and the strip runs edge to edge again. */
  .lech-slider__viewport { margin: 0; scroll-padding-inline: var(--lech-gutter); }
  .lech-slider__track { padding: 0 var(--lech-gutter); }

  .lech-slider {
    --slide-w: 78vw;
    --slide-gap: 12px;
    padding-top: 64px;
  }

  .lech-related { padding: 0; }
  .lech-related__grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 600px) {
  /* Phones: slightly smaller and tighter so "OGATA NOMADIC RESTAURANT"
     stays on one line above "at Restaurant Klösterle". */
  .lech-heading { font-size: clamp(16px, 5vw, 19px); }
  .lech-heading .ogata { letter-spacing: .05em; }
  .lech-copy p { font-size: 15px; }
  .lech-stack, .lech-stack__pair { gap: 8px; }
  .lech-cta { margin-top: 22px; }
}
