/* Gallery lighting and tactile controls. Artwork colors are not filtered. */
:root{
  --wall:#1c1c19;--wall-light:#dcd4c5;--frame-edge:#665b4866;
  --frame-shadow:0 2px 0 #090a0877,0 12px 28px #0005,0 0 0 1px #a7977110;
  --light-duration:360ms;
}
html.stone{--muted:#62594d;--frame-edge:#a69a87;--frame-shadow:0 2px 3px #5c4c2820,0 14px 28px #5c4c2825}
body{isolation:isolate;background:var(--wall);transition:background-color var(--light-duration) ease,color var(--light-duration) ease}
html.stone body{background:var(--wall-light)}
body::before{z-index:-1;opacity:.4}
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:-2;background:radial-gradient(ellipse at 45% 12%,#d0b78a14,transparent 65%);opacity:1;transition:opacity var(--light-duration) ease}
html.stone body::after{opacity:0}
.gallery .card{border-color:var(--frame-edge);box-shadow:var(--frame-shadow);transition:background-color var(--light-duration) ease,border-color var(--light-duration) ease,box-shadow var(--light-duration) ease,transform .3s ease}
html.stone .gallery .card{box-shadow:var(--frame-shadow)}
.gallery .card-img,.gallery .card-body,.gallery .card-title,.gallery .spec-chip,.gallery .card-footer,.section-head,.body-intro,.body-nav,.marquee-wrap{transition:background-color var(--light-duration) ease,border-color var(--light-duration) ease,color var(--light-duration) ease}
.gallery .card:hover{border-color:var(--orange);box-shadow:var(--frame-shadow),0 0 0 1px var(--orange)}

/* Selected comet: black left, crystal right, with a 20% longer original trail. */
#theme-toggle{
  --sol-size:38px;--sol-travel:46px;
  display:block;width:94px;height:48px;min-height:44px;padding:0;
  top:20px;right:24px;border:1px solid #85786580;border-radius:999px;
  background:linear-gradient(180deg,#11120ff2,#302e26ed);
  box-shadow:inset 0 2px 5px #0006,0 1px 0 #d7cbb71a;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  transition:background-color var(--light-duration) ease,border-color .2s ease,box-shadow var(--light-duration) ease;
}
html.stone #theme-toggle{background:linear-gradient(180deg,#b9af9d,#cec5b4);border-color:#93867099;box-shadow:inset 0 2px 4px #64553833,0 1px 0 #ffffff66}
#theme-toggle:focus-visible{outline:2px solid #c8beaa;outline-offset:4px}
html.stone #theme-toggle:focus-visible{outline-color:#62594d}
#theme-toggle:hover{border-color:#a79d8a99}
html.stone #theme-toggle:hover{border-color:#84796599}
#theme-toggle .theme-thumb{position:absolute;top:4px;left:4px;width:var(--sol-size);height:var(--sol-size);border-radius:50%;transform:translateX(0);transition:none;pointer-events:none;z-index:2}
#theme-toggle .theme-thumb::before{content:"";position:absolute;inset:5px;border-radius:50%;background:#d2c5aa55;box-shadow:0 0 8px #d2c5aa22}
html.stone #theme-toggle .theme-thumb{transform:translateX(var(--sol-travel))}
html.stone #theme-toggle .theme-thumb::before{background:#eeeae077;box-shadow:0 0 8px #fff2}
#theme-toggle .theme-forms{display:block;position:relative;width:100%;height:100%;transition:transform 180ms ease}
#theme-toggle .theme-form{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 1px 1px #0006)}
#theme-toggle .theme-form-black{filter:drop-shadow(0 0 1px #e0d4bbaa) drop-shadow(0 1px 1px #0006)}
#theme-toggle .theme-form-clear{filter:drop-shadow(0 1px 1px #433c3180)}
#theme-toggle:not([data-sol]) .theme-form-black{opacity:1}
html.stone #theme-toggle:not([data-sol]) .theme-form-black{opacity:0}
html.stone #theme-toggle:not([data-sol]) .theme-form-clear{opacity:1}
#theme-toggle[data-sol="black"] .theme-form-black{opacity:1}
#theme-toggle[data-sol="blue"] .theme-form-blue{opacity:1}
#theme-toggle[data-sol="green"] .theme-form-green{opacity:1}
#theme-toggle[data-sol="yellow"] .theme-form-yellow{opacity:1}
#theme-toggle[data-sol="orange"] .theme-form-orange{opacity:1}
#theme-toggle[data-sol="red"] .theme-form-red{opacity:1}
#theme-toggle[data-sol="pink"] .theme-form-pink{opacity:1}
#theme-toggle[data-sol="clear"] .theme-form-clear{opacity:1}
#theme-toggle.is-pressed .theme-forms{transform:scale(.92)}
#theme-toggle.is-cycling{border-color:#bbaa8280}
#theme-toggle .theme-trail{position:absolute;top:4px;left:4px;width:var(--sol-size);height:var(--sol-size);object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none;opacity:0;visibility:hidden;z-index:1;filter:drop-shadow(0 1px 1px #0006);transform-origin:50% 50%;transition:none}

/* Keep the opening statement clear with open space beside it. */
.hero{display:flex;align-items:flex-start;height:auto;min-height:660px;padding:112px max(170px,12%) 66px 10%;overflow:visible}
.hero-content{min-width:0;width:100%;max-width:620px}
.hero h1{font-size:clamp(88px,14vw,200px);margin-bottom:24px;transform:scaleY(1.2)}
.hero p{margin-top:20px;font-size:12px;line-height:1.85;color:var(--muted)}
.hero-archive-title{font-size:clamp(22px,2.8vw,42px);white-space:nowrap}
.hero-stats{margin-top:28px;gap:32px}
html.stone .hero-archive-title{color:#ac4712}

/* Original sectional marks; one reveal, then a quiet divider. */
.gallery .section-line{height:36px;background:none;min-width:50px}
.section-line svg{display:block;width:100%;height:100%;fill:none;stroke:var(--muted);stroke-width:1;transition:clip-path .75s ease;clip-path:inset(0)}
.section-line svg .motif-accent{stroke:var(--orange)}
.section-line.motif-ready:not(.is-visible) svg{clip-path:inset(0 100% 0 0)}
@media(max-width:1200px){.coord-bar{display:none}}
@media(max-width:1100px){
  .hero{padding-left:7%;padding-right:170px}
  .hero h1{font-size:clamp(88px,14vw,164px)}
}
@media(max-width:768px){
  #theme-toggle{--sol-size:34px;--sol-travel:40px;right:12px;top:12px;width:84px;height:44px}
  .hero{min-height:0;padding:112px 7% 40px;overflow:hidden}
  .hero h1{font-size:clamp(88px,20vw,144px);margin-bottom:24px}
  .hero-archive-title{font-size:clamp(25px,6vw,38px)}
  .hero p{max-width:450px;font-size:12px}
}
@media(max-width:560px){
  .gallery .section-head .section-line{display:block;grid-row:3;grid-column:1/-1;height:28px;margin-top:8px}
  .hero-stats{gap:28px}.stat-num{font-size:30px}.stat-label{font-size:8px}
}
@media(max-width:360px){
  .logo-fixed .logo-main-img{height:17px}.logo-fixed{gap:6px}.logo-fixed .logo-img{width:28px;height:28px}
  .logo-fixed .logo-sub-text{font-size:7px;letter-spacing:.2em}
  #theme-toggle{right:10px}
}
@media(prefers-reduced-motion:reduce){
  body,body::after,.gallery .card,.gallery .card-img,.gallery .card-body,.gallery .card-title,.gallery .spec-chip,.gallery .card-footer,.section-head,.body-intro,.body-nav,.marquee-wrap,#theme-toggle,#theme-toggle *,.section-line svg{transition:none!important;animation:none!important}
  .section-line.motif-ready:not(.is-visible) svg{clip-path:none}
  #theme-toggle.is-pressed .theme-forms{transform:none}
}

/* Fit photographed works to their physical edges without rewriting the source images. */
.artwork-crop{position:relative;isolation:isolate;contain:paint;overflow:hidden;width:100%;max-width:var(--art-card-max);margin-inline:auto}
#modal .modal-img .artwork-crop--modal{max-width:min(var(--art-modal-max),var(--art-modal-viewport-max))}
.gallery .card-img .artwork-crop > img,#modal .modal-img .artwork-crop > img{
  position:absolute;display:block;left:var(--art-photo-left);top:var(--art-photo-top);
  width:var(--art-photo-width)!important;height:auto!important;max-width:none!important;max-height:none!important;
  clip-path:var(--art-photo-clip);transform:none!important;transition:none!important;
}
@media(max-width:768px){.gallery .artwork-crop{max-width:var(--art-phone-max)}}
