/* v2: theme labels, background media and transitions */
.theme-tabs button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;line-height:1.1;letter-spacing:.06em}
.theme-tabs button span{font-weight:700;font-size:11px}
.theme-tabs button small{font-size:10px;letter-spacing:.02em}
#main{opacity:1;transition:opacity .18s ease}
#main.theme-fading{opacity:0}
.hero-identity .name-ja{font-size:clamp(20px,2vw,28px);font-weight:600;line-height:1.5}
.terminal-hero,.workshop-scene{position:relative;isolation:isolate;overflow:hidden}
.hero-video,.video-shade{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.hero-video{object-fit:cover;opacity:0;transition:opacity .6s ease}
.hero-video.is-playing{opacity:1}
.video-shade{background:linear-gradient(90deg,#14242a99,transparent 85%),linear-gradient(0deg,#111b20aa,transparent 75%);opacity:0;transition:opacity .6s ease}
.hero-video.is-playing + .video-shade{opacity:1}
.terminal-hero .hero-video{z-index:-2}.terminal-hero .video-shade{z-index:-1}
.ghibli-hero .hero-video{z-index:0}.ghibli-hero .video-shade{z-index:1;background:linear-gradient(0deg,#244d3a88,transparent 65%),linear-gradient(90deg,#25556755,transparent)}
.ghibli-hero .landscape-note,.ghibli-hero .scene-label{z-index:3}
.workshop-scene .photo-veil{z-index:2}.workshop-scene .hero-vertical,.workshop-scene .scene-caption{z-index:3}
.baseball-hero .stadium-photo{z-index:-3}.baseball-hero .hero-video{z-index:-2}.baseball-hero .video-shade{z-index:-1}
.dallas-hero .hero-video{z-index:-2}.dallas-hero .video-shade{z-index:-1}
.dallas-hero:has(.hero-video.is-playing) .dallas-night{opacity:0!important;animation:none}
@media(max-width:760px){
 .theme-tabs button{padding-inline:4px!important}.theme-tabs button span{font-size:9px}.theme-tabs button small{font-size:9px}
 .hero-identity .name-ja{font-size:20px;letter-spacing:.2em}
}
@media(max-width:359px){.theme-tabs button span{font-size:8px}.theme-tabs button small{font-size:8px}}
@media(prefers-reduced-motion:reduce){.hero-video,.video-shade{display:none}#main{transition:none}}

/* v3: life timeline and ancient forest */
.theme-tabs button small{letter-spacing:0}
.ghibli-world{background:#e9ede2;color:#263a30}
.ghibli-mast{background:#142b22df;color:#eaf0df;border:1px solid #d5e1c02b;padding:10px 20px}
.ghibli-mast b{font-family:'Noto Serif JP',serif;font-size:17px}
.ghibli-hero{background:linear-gradient(90deg,#0b1e16a8,#10281f52 50%,#0c201a88),linear-gradient(0deg,#10271dd9,transparent 65%),url('assets/ghibli-forest.webp') center/cover;}
.ghibli-hero:before{display:none}
.ghibli-hero .hero-video{z-index:0}
.ghibli-hero .video-shade{background:linear-gradient(90deg,#0b1e16a8,#10281f70 50%,#0c201a88),linear-gradient(0deg,#10271dcc,transparent 75%)}
.forest-mist,.forest-lights{position:absolute;inset:0;pointer-events:none;z-index:2}
.forest-mist{background:radial-gradient(ellipse at 70% 65%,#b8d1c32e,transparent 40%),linear-gradient(0deg,#adccb124,transparent 45%)}
.forest-lights{background:radial-gradient(circle at 72% 35%,#d2f6edb0 0 2px,transparent 5px),radial-gradient(circle at 80% 49%,#c3efe69c 0 2px,transparent 6px),radial-gradient(circle at 22% 62%,#d4f7e98c 0 2px,transparent 5px),radial-gradient(circle at 67% 72%,#d4f7e98c 0 1px,transparent 5px)}
.ghibli-intro{width:100%;max-width:790px;padding:150px 24px 100px}
.ghibli-hero h1{font-size:clamp(55px,6.5vw,94px);color:#f4f5e7;text-shadow:0 3px 22px #07170f}
.ghibli-hero .eyebrow,.ghibli-hero .name-ja,.ghibli-hero .hero-lead,.ghibli-hero .hero-description{color:#f2f3e7;text-shadow:0 2px 12px #07170f}
.ghibli-hero .name-ja{font-family:'Noto Serif JP',serif;font-size:clamp(20px,2vw,28px);letter-spacing:.2em}
.ghibli-hero .hero-lead{font-family:'Noto Serif JP',serif}
.wood-sign{transform:none;background:#294739df;border-color:#abc4a26b;box-shadow:none}
.wood-sign:before,.wood-sign:after{background:#a5583d}
.ghibli-journal .letter-main{transform:none;clip-path:none;background:#f5f6ed;border-color:#c7d3c1}
.letter-main:before{border-color:#8faaa0;color:#637f6d;transform:none}
.ghibli-journal .profile-prose{background:none}
.ghibli-journal .companies .entry,.ghibli-journal .companies .entry:nth-child(2n),.ghibli-journal .services .entry{background:#f5f6ed;border-color:#c8d4c4;transform:none;box-shadow:0 8px 24px #1a382414}
.ghibli-journal .companies .entry:before{background:#9c6049;opacity:.8;border:0;width:32px;height:3px;top:0;left:30px;transform:none}
.ghibli-journal h2{font-family:'Noto Serif JP',serif}
@media(max-width:760px){
 .design-switch{padding:0!important;position:sticky}
 .theme-tabs{overflow-x:auto;justify-content:flex-start;scrollbar-width:thin;scrollbar-color:#7b8c7d #e9ece6;overscroll-behavior-x:contain}
 .theme-tabs button{flex:0 0 auto;min-width:110px;padding:0 12px!important}
 .theme-tabs button span{font-size:10px}.theme-tabs button small{font-size:10px}
 .ghibli-mast{left:16px;right:16px;top:72px}
 .ghibli-hero{height:auto;min-height:780px;max-height:none}
 .ghibli-intro{padding:155px 20px 120px;max-width:100%}
 .ghibli-hero h1{font-size:clamp(42px,12vw,60px);overflow-wrap:normal}
 .ghibli-hero .hero-description,.ghibli-hero .hero-lead{max-width:100%;overflow-wrap:anywhere}
 .ghibli-journal .companies .entry:nth-child(n){transform:none;margin-left:0;margin-right:0}
}
@media(max-width:760px){
 .design-switch.tabs-have-more:after{content:'›';position:absolute;right:0;top:0;height:100%;width:25px;display:flex;align-items:center;justify-content:flex-end;padding-right:4px;background:linear-gradient(90deg,transparent,#f9f8f0 45%);color:#344d3d;font-size:22px;pointer-events:none}
}

/* v3c: compact, balanced theme tabs */
.theme-tabs{gap:2px}
.theme-tabs button{min-width:76px;padding:0 16px;border-bottom:0;gap:4px;color:#68746b}
.theme-tabs button span{font-size:12px;letter-spacing:.06em}
.theme-tabs button small{font-size:10px;letter-spacing:.08em}
.theme-tabs button[aria-selected=true]{color:#263e30}
.theme-tabs button[aria-selected=true]:after{left:22%;right:22%;bottom:5px;height:2px}
@media(max-width:760px){
 .theme-tabs{overflow-x:hidden;justify-content:stretch;gap:0}
 .theme-tabs button{flex:1 1 0;min-width:0;padding:0 2px!important}
 .theme-tabs button span{font-size:11px;letter-spacing:.02em}
 .theme-tabs button small{font-size:10px}
 .design-switch.tabs-have-more:after{display:none}
}

/* Company identities and service illustrations */
.company-logo{width:min(100%,260px);padding:8px 12px;margin:0 0 16px;background:#f5f6ef;border:1px solid #d2d9cc;border-radius:4px}
.company-logo img{width:100%;height:40px;object-fit:contain;object-position:left center}
.provided-services ul{min-width:0}
.provided-services li,.lineup-detail .provided-services li{display:flex;align-items:center;gap:10px;min-width:0;padding-left:0;line-height:1.7}
.provided-services li:before{content:none}
.service-image{flex:0 0 44px;width:44px;height:44px;border-radius:10px}
.service-copy{min-width:0;overflow-wrap:anywhere}
.terminal-output .companies .company-logo,.baseball-content .companies .company-logo{grid-column:1}
.terminal-output .companies .provided-services,.baseball-content .companies .provided-services{grid-row:1 / span 10}
.terminal-output .company-logo{background:#dce7df;border-color:#668779;border-radius:2px}
.ghibli-journal .company-logo{background:#edf2e7;border-color:#c2d1bd}
.carpenter-content .company-logo{background:#f0e1c3;border-color:#b4996c;border-radius:0}
.baseball-content .company-logo{background:#eef0dc;border-color:#aab995;border-radius:0}
.dallas-content .company-logo{background:#eee8d9;border-color:#bba679;border-radius:0}
@media(max-width:760px){.terminal-output .companies .provided-services,.baseball-content .companies .provided-services{grid-row:auto}.company-logo{width:min(100%,240px)}.service-image{flex-basis:40px;width:40px;height:40px}}

/* Official identities retain their original colors and proportions. */
.company-logo,.terminal-output .company-logo,.ghibli-journal .company-logo,.carpenter-content .company-logo,.baseball-content .company-logo,.dallas-content .company-logo{background:#fff;border:1px solid #deded8;border-radius:8px}
.company-logo-icon{display:flex;align-items:center;gap:10px;color:#24332c;font:600 13px/1.35 sans-serif;overflow-wrap:anywhere}
.company-logo-icon img{width:48px;height:48px;flex:0 0 48px;object-position:center}
.company-logo-icon span{min-width:0}
.service-logo{display:block;width:fit-content;max-width:160px;margin-top:6px;padding:5px 8px;background:#fff;border:1px solid #e4e5df;border-radius:6px}
.service-logo img{display:block;width:auto;max-width:100%;height:auto;max-height:32px;object-fit:contain}
.forest-spirits{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none}
.forest-spirit{position:absolute;width:clamp(20px,3vw,34px);filter:drop-shadow(0 0 6px #e9ffe5aa);animation:spirit-appear 9s ease-in-out infinite}
.forest-spirit svg{display:block;width:100%;height:auto;transform-origin:50% 90%;animation:spirit-tilt 5s ease-in-out infinite alternate}
.spirit-1{left:6%;bottom:8%;animation-delay:-1s}.spirit-2{left:4%;top:17%;width:24px;animation-delay:-4s}.spirit-3{left:40%;bottom:10%;width:22px;animation-delay:-6s}.spirit-4{right:24%;top:12%;width:20px;animation-delay:-2s}.spirit-5{right:12%;bottom:9%;animation-delay:-7s}.spirit-6{right:4%;top:36%;width:22px;animation-delay:-5s}
.spirit-2 svg,.spirit-5 svg{animation-delay:-2s}.spirit-3 svg,.spirit-6 svg{animation-delay:-4s}
@keyframes spirit-appear{0%,100%{opacity:.32}35%,65%{opacity:.9}}
@keyframes spirit-tilt{from{transform:rotate(-9deg)}to{transform:rotate(9deg)}}
@media(prefers-reduced-motion:reduce){.forest-spirit,.forest-spirit svg{animation:none}.forest-spirit{opacity:.75}}

/* v3h: company highlights, client logos and social links */
.company-highlight,.client-list,.company-branch{grid-column:1/-1;min-width:0;margin-top:20px}
.company-highlight{padding:14px;border-left:3px solid currentColor;font-size:13px;line-height:2;overflow-wrap:anywhere}
.company-highlight strong{font-size:clamp(18px,2vw,25px);white-space:nowrap}
.company-branch{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.client-list>b{display:block;font-size:13px;margin-bottom:10px}
.client-strip{background:#fff;overflow:hidden;padding:10px 0;max-width:100%}
.client-track{display:flex;width:max-content;animation:client-scroll 50s linear infinite}
.client-track img{display:block;flex:none;width:auto;height:36px;max-width:none;margin-right:35px}
.client-strip:nth-child(3) .client-track img{height:48px}
.client-strip:focus .client-track,.client-strip:hover .client-track{animation-play-state:paused}
@keyframes client-scroll{to{transform:translateX(-50%)}}
.united-logo{display:block;max-width:min(180px,100%);max-height:80px;object-fit:contain;object-position:left;margin:14px 0}
.social-groups{margin-top:32px;display:flex;flex-wrap:wrap;gap:22px 30px}
.social-group{min-width:0}.social-group>span{display:block;font-size:11px;letter-spacing:.04em;margin-bottom:9px}.social-group>div{display:flex;gap:8px;flex-wrap:wrap}
.social-personal{flex-basis:100%}.social-group a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid currentColor;border-radius:50%;color:inherit;transition:opacity .2s}.social-group a:hover{opacity:.65}.social-group svg{width:18px;height:18px}.social-official a{width:30px;height:30px}.social-official svg{width:15px;height:15px}
.company-logo-icon{white-space:nowrap;overflow-wrap:normal;gap:6px;padding-inline:7px}.company-logo-icon span{font-size:clamp(9px,2.7vw,13px);letter-spacing:-.02em}.company-logo-icon img{width:38px;height:38px;flex-basis:38px}
.forest-spirit{width:clamp(22px,2.8vw,36px);animation:spirit-appear 11s ease-in-out infinite;filter:drop-shadow(0 0 7px #e9ffe5b0)}
.forest-spirit svg{animation:none}.forest-spirit .spirit-head{transform-origin:20px 35px;animation:spirit-rattle 7s ease-in-out infinite}
.forest-spirit.spirit-1{left:auto;right:8%;bottom:10%;top:auto;width:30px}.forest-spirit.spirit-2{left:auto;right:13%;bottom:9%;top:auto;width:22px}.forest-spirit.spirit-3{left:auto;right:18%;bottom:11%;top:auto;width:26px}.forest-spirit.spirit-4{left:6%;right:auto;top:auto;bottom:8%;width:25px}.forest-spirit.spirit-5{left:12%;right:auto;top:auto;bottom:7%;width:19px}
.spirit-2 .spirit-head,.spirit-5 .spirit-head{animation-delay:-2s}.spirit-3 .spirit-head{animation-delay:-4s}
@keyframes spirit-rattle{0%,65%,100%{transform:rotate(0)} 68%,72%,76%{transform:rotate(-12deg)} 70%,74%,78%{transform:rotate(12deg)} 81%{transform:rotate(0)}}
@media(max-width:760px){.client-strip{overflow-x:auto}.client-track{animation:none}.client-track img:nth-child(2){display:none}.forest-spirit.spirit-1{right:5%;bottom:5%}.forest-spirit.spirit-2{right:14%;bottom:4%}.forest-spirit.spirit-3{right:23%;bottom:5%}.forest-spirit.spirit-4{left:5%;bottom:4%}.forest-spirit.spirit-5{left:13%;bottom:4%}}
@media(prefers-reduced-motion:reduce){.forest-spirit,.forest-spirit .spirit-head,.client-track{animation:none}.forest-spirit{opacity:.75}.client-strip{overflow-x:auto}.client-track img:nth-child(2){display:none}}

/* Other service identities */
.other-service-logo{box-sizing:border-box;display:flex;align-items:center;width:min(100%,260px);max-width:100%;min-width:0;min-height:58px;padding:8px 12px;margin:0 0 16px;background:#fff;border:1px solid #deded8;border-radius:8px}
.other-service-logo img{display:block;width:100%;height:40px;object-fit:contain;object-position:left center}
.sumifilm-logo{display:block;max-width:100%;white-space:nowrap;font:800 clamp(20px,7vw,30px)/1 Arial,sans-serif;letter-spacing:0;color:#192846}
.sumifilm-logo span:last-child{color:#4071f7}

/* 街を、とぶ。 */
.soramachi-logo{display:block;width:180px;max-width:100%;color:#315d73}
.soramachi-logo>span{display:block;font:600 22px/1.25 serif;letter-spacing:.12em;white-space:nowrap}
.soramachi-logo svg{display:block;width:100%;height:20px;fill:none;stroke:currentColor;stroke-width:1;stroke-linecap:round;stroke-linejoin:round}

/* v3k: transparent identities and a static client grid */
.company-logo,.terminal-output .company-logo,.ghibli-journal .company-logo,.carpenter-content .company-logo,.baseball-content .company-logo,.dallas-content .company-logo,.service-logo,.other-service-logo{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0}
.company-logo-icon{color:inherit}
.terminal-output .company-logo img,.terminal-output .service-logo img,.terminal-output .other-service-logo img,.terminal-output .united-logo,.dallas-content .company-logo img,.dallas-content .service-logo img,.dallas-content .other-service-logo img,.dallas-content .united-logo,.terminal-output .client-logo img,.dallas-content .client-logo img{filter:drop-shadow(0 0 2px rgba(255,255,255,.85))}
.client-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:14px 18px;align-items:center}
.client-logo{min-width:0;display:flex;align-items:center;justify-content:center}
.client-logo img{display:block;width:auto;max-width:100%;height:auto;max-height:46px;object-fit:contain}
@media(max-width:760px){.client-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}}

/* v3l: dark logos stay legible without an opaque backdrop. */
.terminal-output .company-logo img[src$="03-realtybank-trimmed.png"],
.terminal-output .company-logo img[src$="04-kawakamiasset.png"],
.terminal-output .company-logo img[src$="capital.png"],
.terminal-output .company-logo img[src$="07-tomakomaichitosereo.png"],
.terminal-output .client-logo img[src$="client-sanko.png"],
.dallas-content .company-logo img[src$="03-realtybank-trimmed.png"],
.dallas-content .company-logo img[src$="04-kawakamiasset.png"],
.dallas-content .company-logo img[src$="capital.png"],
.dallas-content .company-logo img[src$="07-tomakomaichitosereo.png"],
.dallas-content .client-logo img[src$="client-sanko.png"]{filter:brightness(0) invert(1)}
.terminal-output .sumifilm-logo,.terminal-output .sumifilm-logo span:last-child,.terminal-output .soramachi-logo,.dallas-content .sumifilm-logo,.dallas-content .sumifilm-logo span:last-child,.dallas-content .soramachi-logo{color:#fff}

/* v3n: keep the moving image visible while protecting the text. */
.terminal-hero .video-shade{background:linear-gradient(90deg,#101b23b8 0%,#101b2370 60%,#101b231a 100%),linear-gradient(0deg,#101b2355,transparent 50%)}
.terminal-hero:has(.hero-video.is-playing){text-shadow:0 1px 4px #081018,0 0 12px #081018}
.carpenter-hero{isolation:isolate;overflow:hidden}
.carpenter-hero .hero-video{z-index:-2}
.carpenter-hero .video-shade{z-index:-1;background:linear-gradient(90deg,#21180c55,transparent 60%)}
.carpenter-hero:has(.hero-video.is-playing) .workshop-scene .photo,
.carpenter-hero:has(.hero-video.is-playing) .photo-veil,
.carpenter-hero:has(.hero-video.is-playing) .scene-caption{opacity:0}
.carpenter-hero:has(.hero-video.is-playing) .carpenter-title{background:linear-gradient(110deg,#ead4add9,#f1dfb5d9);box-shadow:inset 7px 0 12px #32271833}
.dallas-hero:has(.hero-video.is-playing) .dallas-skyline{opacity:0}
.dallas-hero:has(.hero-video.is-playing) .video-shade{background:linear-gradient(90deg,#0c1b1ba8,transparent 80%)}
.dallas-hero:has(.hero-video.is-playing) .dallas-vignette{background:linear-gradient(90deg,#0d1b1a80,transparent 75%),linear-gradient(0deg,#101d1dc2,transparent 65%)}
@media(max-width:760px){
 .carpenter-hero:has(.hero-video.is-playing) .carpenter-title{background:linear-gradient(180deg,#ead4add9,#f1dfb5e3)}
 .dallas-hero:has(.hero-video.is-playing) .dallas-vignette{background:linear-gradient(0deg,#101d1dd9,transparent 70%),linear-gradient(90deg,#101d2166,transparent)}
}
